IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Vos Contributions VBScript Discussion :

Configuration total d'un pc [Sources]


Sujet :

Vos Contributions VBScript

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    14
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 14
    Points : 12
    Points
    12
    Par défaut Configuration total d'un pc
    Voici Un Script Vbs qui nous permet de savoir la config Total d'un Pc. Attendez 1 minute environ après exécution du Script ( il se formera un fichier txt dans C:\inventaire.txt)

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
     
    on error resume Next
     
    Set oShell = CreateObject("wscript.Shell")
    Set env = oShell.environment("Process")
    strComputer = env.Item("Computername")
    Const HKEY_LOCAL_MACHINE = &H80000002
    Const UnInstPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
    ".\root\default:StdRegProv")
     
    report = report & "******************************************" & vbCrLf
    report = report & " - Inventaire de l'ordinateur " & strComputer & " - " & vbCrLf
    report = report & "******************************************" & vbCrLf & vbCrLf
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)
     
    report = report & vbCrLf & "******************************************" & vbCrLf
    report = report & "Informations sur Windows" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objItem in colItems
        report = report &  "- Nom du poste: " & strComputer  & vbCrLf
        report = report &  "- Description de l'ordinateur: " & objItem.Description & vbCrLf
        report = report &  "- Utilisateur possédant la licence Windows: " & objItem.RegisteredUser & vbCrLf
        report = report &  "- Organisation possédant la licence Windows: " & objItem.Organization & vbCrLf
        report = report & "******************************************" & vbCrLf
        report = report &  "- Nom du système d'exploitation: " & objItem.Caption & vbCrLf
        If (objItem.OSProductSuite <> "")Then
            report = report &  "- Système d'exploitation de la suite " & objItem.OSProductSuite & vbCrLf
        End If
        report = report &  "- Version: " & objItem.Version & vbCrLf
        report = report &  "- Date de son installation: " & objItem.InstallDate & vbCrLf
        report = report &  "- Numéro de série de " & objItem.Caption & ": " & objItem.SerialNumber & vbCrLf
        report = report & vbCrLf
        report = report & "******************************************" & vbCrLf
        report = report & "Détails techniques sur Windows"& vbCrlf
        report = report & "******************************************" & vbCrLf
        report = report &  "- Numéro du dernier Service Pack majeur installé: "
        report = report & objItem.ServicePackMajorVersion & vbCrLf
        If (objItem.ServicePackMinorVersion<>0) AND (objItem.ServicePackMinorVersion<>"") Then
            report = report &  "- Numéro du dernier Service Pack mineur installé: " & objItem.ServicePackMinorVersion & vbCrLf
        End If
        report = report &  "- - - - - -" & vbCrLf
        report = report &  "Les Service Pack et les mises-à-jour de sécurité de Windows sont disponibles sur:" & vbCrLf
        report = report &  "===> http://windowsupdate.microsoft.com <===" & vbCrLf
        report = report &  "- - - - - -" & vbCrLf & vbCrLf
        'report = report &  "- Emplacements du système d'exploitation sur l'ordinateur: " & vbCrLf & objItem.Name & vbCrLf
        report = report &  "- Répertoire où Windows est installé: " & objItem.WindowsDirectory & vbCrLf
        report = report &  "- Niveau d'encryption des données: " & objItem.EncryptionLevel & " bits" & vbCrLf
        If (objItem.MaxNumberOfProcesses="-1") Then
            report = report &  "- Maximum de processus pouvant être ouvert: Aucune limite fixée" & vbCrLf
        Else
            report = report &  "- Maximum de processus pouvant être ouvert: " & objItem.MaxNumberOfProcesses & vbCrLf
        End If
    Next
     
    Set colBaseBoards =  objWMIService.ExecQuery _
        ("Select * from Win32_BaseBoard")
    report = report & vbCrLf & "******************************************" & vbCrLf
    report = report & "Carte-mère" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objBaseBoard in colBaseBoards
     
            report = report & "- Nom: " & objBaseBoard.Name & vbCrLf
            report = report & "- Modèle: " & objBaseBoard.Model & vbCrLf
            report = report & "- Manufacturier: " & objBaseBoard.Manufacturer & vbCrLf
            report = report & "- Numéro de série: " & objBaseBoard.SerialNumber & vbCrLf
            report = report & "- Numéro d'inventaire (SKU): " & objBaseBoard.SKU & vbCrLf
            report = report & vbCrLf
    Next
     
    Set colOnBoardDevices =  objWMIService.ExecQuery _
        ("Select * from Win32_OnBoardDevice")
    report = report & "******************************************" & vbCrLf
    report = report & "Périphériques inclus sur la carte-mère (OnBoard)" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objOnBoardDevice in colOnBoardDevices
     
            report = report & "- Nom du périphérique: " & objOnBoardDevice.Name & vbCrLf
            report = report & "- Nom secondaire du périphérique: " & objOnBoardDevice.Caption & vbCrLf
            report = report & "- Type de périphérique: " & objOnBoardDevice.DeviceType & vbCrLf
            report = report & "- Modèle: " & objOnBoardDevice.Model & vbCrLf
            report = report & "- Manufacturier: " & objOnBoardDevice.Manufacturer & vbCrLf
            report = report & "- Numéro de série: " & objOnBoardDevice.SerialNumber & vbCrLf
            report = report & "- Numéro d'inventaire (SKU): " & objOnBoardDevice.SKU & vbCrLf
            report = report & vbCrLf
    Next
     
    Set colBIOS =  objWMIService.ExecQuery _
        ("Select * from Win32_BIOS")
    report = report & "******************************************" & vbCrLf
    report = report & "BIOS - Utilitaire de détection des disques et" & vbCrLf
    report = report & " de gestion des composantes internes" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objBIOS in colBIOS
     
            report = report & "- Nom: " & objBIOS.Name & vbCrLf
            report = report & "- Code d'identification: " & objBIOS.IdentificationCode & vbCrLf
            report = report & "- Manufacturier: " & objBIOS.Manufacturer & vbCrLf
            report = report & "- BIOS primaire: " & objBIOS.PrimaryBIOS & vbCrLf
            report = report & "- Date de création: " & objBIOS.ReleaseDate & vbCrLf
            report = report & "- Numéro de série: " & objBIOS.SerialNumber & vbCrLf
            report = report & "- Version: " & objBIOS.Version & vbCrLf
            report = report & "- Version (SMBIOS): " & objBIOS.SMBIOSBIOSVersion & vbCrLf
            report = report & vbCrLf
    Next
     
    Set colSettings = objWMIService.ExecQuery _
        ("Select * from Win32_ComputerSystem")
    report = report & "******************************************" & vbCrLf
    report = report & "Mémoire vive (RAM) et processeur" & vbCrLf & "******************************************" & vbCrLf
    For Each objComputer in colSettings
            'report = report & objComputer.Name & vbcrlf
            report = report & "- Vous avez actuellement " & objComputer.TotalPhysicalMemory /1024\1024+1 & " Mo de mémoire vive(RAM) au total." & vbcrlf
    Next
    report = report & "- - - - - -" & vbcrlf
    report = report & "À titre de comparaison :" & vbcrlf
    report = report & "Si vous avez Windows NT, 95 ou 98 vous devriez avoir au moins 64 Mo" & vbcrlf
    report = report & " de mémoire vive pour une utilisation confortable" & vbcrlf
    report = report & "Si vous avez Windows 2000, vous devriez avoir au moins 128 Mo de" & vbcrlf
    report = report & " mémoire vive pour une utilisation confortable" & vbcrlf
    report = report & "Si vous avez Windows XP ou 2003, vous devriez avoir au moins 256 Mo" & vbcrlf
    report = report & " de mémoire vive pour une utilisation confortable" & vbcrlf
    report = report & "- - - - - -" & vbcrlf & vbCrLf
     
    Set colSettings = objWMIService.ExecQuery _
        ("Select * from Win32_Processor")
    For Each objProcessor in colSettings
     
            report = report & "- Type de processeur: "
            If objProcessor.Architecture = 0 Then
                    report = report & "x86" & vbCrLf
            ElseIf objProcessor.Architecture = 1 Then
                    report = report & "MIPS" & vbCrLf
            ElseIf objProcessor.Architecture = 2 Then
                    report = report & "Alpha" & vbCrLf
            ElseIf objProcessor.Architecture = 3 Then
                    report = report & "PowerPC" & vbCrLf
            ElseIf objProcessor.Architecture = 6 Then
                    report = report & "ia64" & vbCrLf
            Else
                    report = report & "inconnu" & vbCrLf
            End If
     
            report = report & "- Nom du processeur: " & objProcessor.Name & vbCrLf
            report = report & "- Description du processeur: " & objProcessor.Description & vbCrLf
            report = report & "- Vitesse actuelle du processeur: " & objProcessor.CurrentClockSpeed & " Mhz" & vbCrLf
            report = report & "- Vitesse maximale du processeur: " & objProcessor.MaxClockSpeed & " Mhz" & vbCrLf
     
            report = report & vbCrLf
    Next
     
    report = report & "******************************************" & vbCrLf
    report = report & "Disque(s) dur(s) et autres lecteurs actuellement " & vbCrLf
    report = report & "en usage" & vbCrLf & "******************************************" & vbCrLf
     
    Dim oFSO
    Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
     
    Dim oDesLecteurs
    Set oDesLecteurs = oFSO.Drives
     
    Dim oUnLecteur
    Dim strLectType
     
    For Each oUnLecteur in oDesLecteurs
            If oUnLecteur.IsReady Then
                    Select Case oUnLecteur.DriveType
                            Case 0: strLectType = "Inconnu"
                            Case 1: strLectType = "Amovible (Disquette, clé USB, etc.)"
                            Case 2: strLectType = "Fixe (Disque dur, etc.)"
                            Case 3: strLectType = "Réseau"
                            Case 4: strLectType = "CD-Rom"
                            Case 5: strLectType = "Virtuel"
                    End Select
     
                    report = report & "- Lettre du lecteur: " & oUnLecteur.DriveLetter & vbCrLf
                    report = report & "- Numéro de série: " & oUnLecteur.SerialNumber & vbCrLf
                    report = report & "- Type de lecteur: " & oUnLecteur.strLectType & vbCrLf
                    If (oUnLecteur.FileSystem <> "") Then
                            report = report & "- Système de fichier utilisé: " & oUnLecteur.FileSystem & vbCrLf
                    End If
     
                    Set objWMIService = GetObject("winmgmts:")
                    Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='" & oUnLecteur.DriveLetter & ":'")
                    report = report & "- Il y a " & objLogicalDisk.FreeSpace /1024\1024+1 & " Mo d'espace restant sur ce lecteur/disque" & vbCrLf
                    report = report & "- Il y a " & objLogicalDisk.Size /1024\1024+1 & " Mo d'espace au total sur ce lecteur/disque" & vbCrLf
     
            End If
            report = report & vbCrLf
    Next
     
    Set colCartesVideo = objWMIService.ExecQuery _
        ("Select Description From Win32_VideoController")
    report = report & "******************************************" & vbCrLf
    report = report & "Carte(s) vidéo" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objCarteVideo in colCartesVideo
     
            report = report & "- Nom de la carte: " & objCarteVideo.Description & vbcrlf
            report = report & vbCrLf
    Next
     
    Set colSoundDevices =  objWMIService.ExecQuery _
        ("Select * from Win32_SoundDevice")
    report = report & "******************************************" & vbCrLf
    report = report & "Carte(s) de son" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objSoundDevice in colSoundDevices
     
            report = report & "- Nom de la carte: " & objSoundDevice.Description & vbCrLf
            report = report & vbCrLf
    Next
     
    Set colInstalledPrinters =  objWMIService.ExecQuery _
        ("Select * from Win32_Printer")
    report = report & "******************************************" & vbCrLf
    report = report & "Imprimante(s) installée(s)" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objPrinter in colInstalledPrinters
     
            If objPrinter.Default = "True" Then
                    report = report & "- Nom de l'imprimante (par défaut): " & objPrinter.Name & vbCrLf
            Else
                    report = report & "- Nom de l'imprimante: " & objPrinter.Name & vbCrLf
            End If
            report = report & vbCrLf
    Next
     
    Set colAdapters = objWMIService.ExecQuery _
        ("Select * from Win32_NetworkAdapter")
    report = report & "******************************************" & vbCrLf
    report = report & "Carte(s) réseau(x)" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objAdapter in colAdapters
     
            If (objAdapter.Manufacturer<>"Microsoft") Then
                    'report = report & "- Nom de la carte/adapteur (Caption): " & objAdapter.Caption & vbcrlf
                    report = report & "- Nom de la carte/adapteur: " & objAdapter.Name & vbcrlf
                    report = report & "- Type de la carte/adapteur: " & objAdapter.AdapterType & vbcrlf
                    'report = report & "- État actuel: " & objAdapter.Availability & vbcrlf
                    report = report & "- Description: " & objAdapter.Description & vbcrlf
                    report = report & "- Adresse MAC: " & objAdapter.MACAddress & vbcrlf
                    'report = report & "- Adresse réseau de la carte: " & objAdapter.NetworkAddresses & vbcrlf
                    'report = report & "- Adresse préprogrammée: " & objAdapter.PermanentAddress & vbcrlf
                    report = report & "- Nom du fabricant: " & objAdapter.Manufacturer & vbcrlf
                    report = report & "- Nom du produit: " & objAdapter.ProductName & vbcrlf
                    report = report & "- Nom de service: " & objAdapter.ServiceName & vbcrlf
                    report = report & "- Vitesse maximale: " & objAdapter.MaxSpeed & vbcrlf
                    'If (objAdapter.Speed = 0) Or (objAdapter.Speed = "") Then
                    '        report = report & "- Bande passante actuelle: Non-disponible ou si faible qu'elle indique 0" & vbcrlf
                    'Else
                    '        report = report & "- Bande passante actuelle: " & objAdapter.Speed & vbcrlf
                    'End If
                    'report = report & "- Date de la dernière réinitialisation: " & objAdapter.TimeOfLastReset & vbcrlf
     
                    Set colAdaptersConf = objWMIService.ExecQuery _
                            ("Select * from Win32_NetworkAdapterConfiguration")
                    For Each objAdapterConf in colAdaptersConf
     
                            If (objAdapter.Manufacturer<>"Microsoft") AND (objAdapter.Caption = objAdapterConf.Caption) Then
                                    report = report & "==> Configurations de la carte réseau <==" & vbcrlf
     
                                    report = report & "- Adresse IP: " & objAdapterConf.IPAddress & vbcrlf
                                    report = report & "- Masque de sous-réseau: " & objAdapterConf.IPSubnet & vbcrlf
                                    report = report & "- Le DHCP (Attribution automatique d'une adresse IP par un serveur DHCP) est-il activé:" & vbCrLf
                                    report = report & objAdapterConf.DHCPEnabled & vbcrlf
                                    report = report & "- Serveur DHCP: " & objAdapterConf.DHCPServer & vbcrlf
                                    report = report & "- Serveur(s) DNS: " & objAdapterConf.DNSServerSearchOrder & vbcrlf
     
                            End If
     
                    Next
     
     
            End If
     
    Next
    report = report & "- - - - - -" & vbcrlf
    report = report & "Si vous ne pouvez naviguer et que les configurations IP semblent correctes," & vbcrlf
    report = report & "vous pouvez essayer l'utilitaire WinsockFix.exe =>" & vbcrlf
    report = report & "http://www.google.ca/search?hl=fr&rls=GGLD%2CGGLD%3A2004-30%2CGGLD%3Afr&q=winsockfix.exe+download&btnG=Rechercher&meta=" & vbcrlf
    report = report & "- - - - - -" & vbcrlf
    report = report & vbcrlf
     
    Set colPOTSModems =  objWMIService.ExecQuery _
        ("Select * from Win32_POTSModem")
    report = report & "******************************************" & vbCrLf
    report = report & "Modem(s)" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objPOTSModem in colPOTSModems
     
            report = report & "- Nom du modem: " & objPOTSModem.Description & vbCrLf
            report = report & vbCrLf
    Next
     
    Set colEcrans =  objWMIService.ExecQuery _
        ("Select * from Win32_Win32_DesktopMonitor")
    report = report & "******************************************" & vbCrLf
    report = report & "Écran(s)" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objEcran in colEcrans
     
            report = report & "- Nom de l'écran: " & objEcran.Name & vbCrLf
            report = report & "- Type d'écran: " & objEcran.MonitorType & vbCrLf
            report = report & "- Nom du fabricant: " & objEcran.MonitorManufacturer & vbCrLf
            report = report & "- Hauteur: " & objEcran.ScreenHeight & vbCrLf
            report = report & "- Largeur: " & objEcran.ScreenWeight & vbCrLf
            report = report & vbCrLf
     
    Next
     
     
    '    report = report & "******************************************" & vbCrLf
    '    report = report & "Listes des connexions réseaux"& vbCrlf
    '    report = report & "=> Cette section peut parfois être vide même s'il" & vbCrLf
    '    report = report & " existe des connexions réseaux <=" & vbCrLf
    '    report = report & "******************************************" & vbCrLf
     
    'Set colConnReseaux = objWMIService.ExecQuery _
    '    ("Select * from Win32_NetworkConnection")
     
    'For Each objConnReseau in colConnReseaux
     
    '        report = report & "- Nom de la carte/adapteur: " & objConnReseau.Name & vbcrlf
    '        report = report & "- Nom local: " & objConnReseau.LocalName & vbcrlf
    '        report = report & "- Nom d'utilisateur: " & objConnReseau.UserName & vbcrlf
    '        report = report & "- Type: " & objConnReseau.DisplayType & vbcrlf
    '        report = report & "- Description: " & objConnReseau.Description & vbcrlf
    '        report = report & "- État actuel de la connexion: " & objConnReseau.ConnectionState & vbcrlf
    '        report = report & "- Nom du fournisseur: " & objConnReseau.ProviderName & vbcrlf
    '        report = report & "- Nom de la ressource distante: " & objConnReseau.RemoteName & vbcrlf
    '        report = report & "- Type de ressource: " & objConnReseau.ResourceType & vbcrlf
    '        report = report & "- Commentaire du fournisseur: " & objConnReseau.Comment & vbcrlf
     
    '        report = report & vbcrlf
     
    'Next
     
    Set colUsagers = objWMIService.ExecQuery _
        ("Select * from Win32_Account")
    report = report & "******************************************" & vbCrLf
    report = report & "Utilisateurs et groupes d'utilisateurs de cet ordinateur" & vbCrLf & "******************************************" & vbCrLf
     
    For Each objUsager in colUsagers
     
            report = report & "- Nom de l'usager ou du groupe: " & objUsager.Name & vbcrlf
            report = report & "- Description: " & objUsager.Description & vbcrlf
            report = report & "- Domaine ou ordinateur auquel il appartient: " & objUsager.Domain & vbcrlf
            'report = report & "- Numéro d'identification (SID): " & objUsager.SID & vbcrlf
     
            report = report & vbcrlf
     
    Next
     
    oReg.EnumKey HKEY_LOCAL_MACHINE, UnInstPath, arrSubKeys
    software = "******************************************" & vbCrLf
    software = software & "Logiciels installés" & vbCrLf & "******************************************" & vbCrLf
    For Each subkey In arrSubKeys
            'MsgBox subkey
            If Left (subkey, 1) <> "{" Then
                    software = software & subkey & vbCrLf
            End If
    Next
    software = software & "- - - - - -" & vbCrLf
    software = software & "Assurez-vous d'avoir dans la liste ci-dessus:" & vbCrLf
    software = software & "- Un anti-virus => Si non, voir http://www.sogetel.net/virus/" & vbCrLf
    software = software & "- Un logiciel anti-espiogiciel => Si non, voir http://www.sogetel.net/espions/" & vbCrLf
    software = software & "- Certaines mises-à-jour de Windows (Elle commence fréquemment par KB#### ou bien par Q###)" & vbCrLf
    software = software & "- - - - - -" & vbCrLf
    software = software & vbCrLf
     
    Set fso = CreateObject("Scripting.FileSystemObject")
     
    'Détermine si le fichier texte existe déjà ou s'il doit le créer
    If Not fso.FileExists("C:\inventaire.txt") Then
            set ts = fso.CreateTextFile("C:\inventaire.txt")
     
    End If
     
    ts.write report
    ts.write software
    'MsgBox Report
    WScript.Exit

  2. #2
    Expert éminent sénior


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Points : 20 038
    Points
    20 038
    Par défaut
    pour cette contribution ... reste plus qu'as trouver des volontaires pour tester et nous dire ce qu'ils en pensent..!

  3. #3
    Rédacteur
    Avatar de omen999
    Profil pro
    Inscrit en
    Février 2006
    Messages
    1 296
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 1 296
    Points : 3 549
    Points
    3 549
    Par défaut
    ça fonctionne correctement en moins de cinq secondes...
    en dehors des difficultés habituelles de wmi pour lire certaines infos du hardware, pas de problème particulier
    nomen omen, nemo non omen - Consultez la FAQ VBScript et les cours et tutoriels VBScript
    le plus terrible lorsqu'une voiture renverse un piéton, c'est que ce sont les freins qui hurlent. (ramón)
    pas de questions techniques par mp

  4. #4
    Expert confirmé
    Avatar de ced600
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Août 2006
    Messages
    3 364
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France

    Informations professionnelles :
    Activité : Développeur .NET

    Informations forums :
    Inscription : Août 2006
    Messages : 3 364
    Points : 4 061
    Points
    4 061
    Par défaut
    chez moi cela prend 100% du cpu, est ce normal ?
    Pourquoi faire compliqué lorsque l'on peut faire encore plus compliqué.

  5. #5
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    14
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 14
    Points : 12
    Points
    12
    Par défaut Cpu
    Oula 100 % te sur que c'est le Script qui fait sa car moi en 5 seconde j'ai mon Inventraire.txt et cela prend 1 minnute pour les pc les plus vieux

  6. #6
    Expert confirmé
    Avatar de ced600
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Août 2006
    Messages
    3 364
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France

    Informations professionnelles :
    Activité : Développeur .NET

    Informations forums :
    Inscription : Août 2006
    Messages : 3 364
    Points : 4 061
    Points
    4 061
    Par défaut
    Certain, et en plus cel me bouffe pas mal de mémoire (99 376K).
    Pourquoi faire compliqué lorsque l'on peut faire encore plus compliqué.

  7. #7
    Expert confirmé
    Avatar de ced600
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Août 2006
    Messages
    3 364
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France

    Informations professionnelles :
    Activité : Développeur .NET

    Informations forums :
    Inscription : Août 2006
    Messages : 3 364
    Points : 4 061
    Points
    4 061
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    'Détermine si le fichier texte existe déjà ou s'il doit le créer
    If Not fso.FileExists("C:\WINDOWS\system32\inventaire.txt") Then
            set ts = fso.CreateTextFile("C:\inventaire.txt")
    Tu testes la présence du fichier à un endroit différent de l'endroit où tu le crées, est ce normal ? (La il sera toujours recréé).
    Je marque cela mais ce n'est pas la cause de mon problème.
    Pourquoi faire compliqué lorsque l'on peut faire encore plus compliqué.

  8. #8
    Expert confirmé
    Avatar de ced600
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Août 2006
    Messages
    3 364
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France

    Informations professionnelles :
    Activité : Développeur .NET

    Informations forums :
    Inscription : Août 2006
    Messages : 3 364
    Points : 4 061
    Points
    4 061
    Par défaut
    Bon je sais d'où viens le problème, le réseau. En débranchant mon cable réseau ton script marche. Tu as dut tester avec un réseau non entreprise. Je suis dérrière un réseau entreprise, cela pose peut être quelque problème.
    Soit à la détection de la configuration réseau, soit à la détection des disques réseau (que j'ai sur la machine)
    Pourquoi faire compliqué lorsque l'on peut faire encore plus compliqué.

  9. #9
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    14
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 14
    Points : 12
    Points
    12
    Par défaut
    J'ai remis le Script à jour non ce n'est pas normal car je utilisé pour mon programme je fessais differents tests donc dsl mais normalement sa marche bien car ce code était à l'origine en Vb

  10. #10
    Expert confirmé
    Avatar de ced600
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Août 2006
    Messages
    3 364
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France

    Informations professionnelles :
    Activité : Développeur .NET

    Informations forums :
    Inscription : Août 2006
    Messages : 3 364
    Points : 4 061
    Points
    4 061
    Par défaut
    Bon je l'ai essaye sur autre de mes machines et il pose le même problème.
    Cette machine est sur le même réseau que l'autre.
    Ca ne me gène pas, j'utilisais juste ton script par curiosité, je n'en ai pas besoin. Mais si je t'embete c'est pour te signaler qu'il y a peut être un bug sur le script. A moins que ce ne soit un objet WMI qui deconne.

    En tout cas merci pour le script.
    Pourquoi faire compliqué lorsque l'on peut faire encore plus compliqué.

  11. #11
    Expert éminent
    Avatar de ThierryAIM
    Homme Profil pro
    Inscrit en
    Septembre 2002
    Messages
    3 673
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 61
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Secteur : Industrie

    Informations forums :
    Inscription : Septembre 2002
    Messages : 3 673
    Points : 8 524
    Points
    8 524
    Par défaut
    J'aime pas trop la pub à la fin,
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    Assurez-vous d'avoir dans la liste ci-dessus:
    - Un anti-virus => Si non, voir <a href="http://www.sogetel.net/virus/" target="_blank">http://www.sogetel.net/virus/</a>
    - Un logiciel anti-espiogiciel => Si non, voir <a href="http://www.sogetel.net/espions/" target="_blank">http://www.sogetel.net/espions/</a>


    mais ça fonctionne sans soucis sur un XP Pro SP2
    Vous vous posez une question, la réponse est peut-être ici :
    Toutes les FAQs VB
    Les Cours et Tutoriels VB6/VBScript
    Les Sources VB6


    Je ne réponds pas aux questions techniques par MP. Utilisez les forums. Merci de votre compréhension

  12. #12
    Candidat au Club
    Homme Profil pro
    formateur
    Inscrit en
    Juillet 2017
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : formateur

    Informations forums :
    Inscription : Juillet 2017
    Messages : 7
    Points : 2
    Points
    2
    Par défaut
    Bonjour,
    Merci beaucoup pour ce script.
    Je me suis permis de l'épurer pour mes besoins et j'ai changé le chemin d'écriture.
    Les user n'ayant pas les droits sur la racine (W10) ou C:\WIndows.
    Merci

Discussions similaires

  1. [MySQL-5.5] Meme configuration mais perf totalement différentes
    Par quincyj dans le forum Administration
    Réponses: 0
    Dernier message: 30/04/2013, 10h38
  2. configurer sql pour envoyer des mails
    Par arwen dans le forum MS SQL Server
    Réponses: 6
    Dernier message: 29/07/2003, 15h28
  3. [configuration] lancer plusieurs serveurs Tomcat
    Par polo54 dans le forum JBuilder
    Réponses: 4
    Dernier message: 13/06/2003, 15h52
  4. Configurer OpenGL/Glut avec C++Bluider
    Par MiGoN dans le forum OpenGL
    Réponses: 2
    Dernier message: 13/09/2002, 23h18
  5. BDE : Configurer automatiquement le NETDIR
    Par Harry dans le forum Paradox
    Réponses: 10
    Dernier message: 29/07/2002, 11h33

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo