Voilà j'ai un prob avec un script VBS:
Code :
- strComputer = "PC"
- strUser = "Administrateur"
- strPassword = "bidule"
- strNamespace = "root\cimv2"
- Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator" )
- objWbemLocator.Security_.ImpersonationLevel = 3 'Impersonate
- objWbemLocator.Security_.authenticationLevel = 6 'Per Packet
- Set objWMIService = objwbemLocator.ConnectServer(strComputer, strNamespace, strUser, strPassword)
- Set objProcess = objWMIService.Get("Win32_Process" )
- Error = objProcess.Create("\\SERVEUR\TOOLS\TRUC.BAT",null,null,ID )
- If Error = 0 Then
- Wscript.Echo "Started with a process ID of " & ID & "."
- Else
- Wscript.Echo "Error: " & Error & "."
- End If
|
voilà, le script me retournes le code d'erreur 2 (accès refusé) lorsque j'utilises un partage (\\SERVEUR....), mais marche lorsque j'utilises un chemin local (C:\TOOLS\....)
j'ai essayé avec le niveau delegate (4) mais spamieux...
any ideas ?
Message édité par bjone le 04-02-2005 à 09:15:56