narco4
Messages postés32Date d'inscriptionsamedi 23 février 2008StatutMembreDernière intervention23 août 2009
-
11 nov. 2008 à 13:54
gillardg
Messages postés3275Date d'inscriptionjeudi 3 avril 2008StatutMembreDernière intervention14 septembre 2014
-
12 nov. 2008 à 13:53
Bonjour,
j'ai un soucie avec un vbs
moi je suis sous vista mon script marche sans soucis, un ami sous xp erreu ligne 18, alors que le fichier est present
voici le script
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}\" _
& strComputer &"\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'cmd.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Set objWMIService = Nothing
Set colProcessList = Nothing
Next
If MsgBox (""&VbCrLf&"Une ou plusieurs infections détectées!"&VbCrLf&" "& _
VbCrLf&" Merci d'avoir utilisé GenProc"&VbCrLf&" "& _
VbCrLf&"-Cliquez sur Oui si vous vous faîtes aider sur un forum." & _
VbCrLf&"-Cliquez sur Non si vous vous debrouillez tout seul.",vbYesNo+ Vbquestion,"GenProc") = vbYes Then
dim WShshell
Set WShshell = WScript.CreateObject("WScript.Shell")
Wshshell.Run "C:\Users\***\Desktop\GenProc\outil\GenProc14.txt",3,true
Set WShshell = Nothing
Dim oFSO
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.CopyFile ("C:\Users\***\Desktop\GenProc\outil\GenProc14.txt") , ("C:\Users\***\Desktop\GenProc14.txt") , true
Set oFSO = Nothing
else
Dim IE
Set IE = Wscript.CreateObject("InternetExplorer.Application")
IE.navigate"C:\Users\***\Desktop\GenProc\Page\GenProc.html"
IE.Visible = 1
Set IE = Nothing
Dim Shell, DesktopPath, URL
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
Set URL = Shell.CreateShortcut(DesktopPath & "\GenProc.URL")
URL.TargetPath = "C:\Users\***\Desktop\GenProc\Page\GenProc.html"
URL.Save
Set Shell = Nothing
End If
dopeko
Messages postés2Date d'inscriptionlundi 20 octobre 2008StatutMembreDernière intervention12 novembre 2008 12 nov. 2008 à 12:42
Salut,
J'ai aussi créer un petit programme en C# par contre et j'ai pu remarquer que la classe Win32_Process ne fonctionne pas sous XP !! Etant donné que tu l'utilise ici il y a de fortes chances que c'est de là que vient le problème. Je me promène en ce moment dans les catacombes du net pour trouver la solution