Win32_Process.Create doesn't work on Win2K3

Joined
Sep 30, 2005
Messages
1
Reaction score
0
Hi, I'm a system administrator for a school board and I'm trying to write a script that will create a directory on a remote computer. I copied some code from Microsoft (http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept04/hey0901.mspx) that is supposed to do just that. It works when I run the script against a machine running XP, 2000 Pro, or 2000 Server but not against a machine running Server 2003. I added a line to there code to echo the errReturn variable and I get a 3 which indicates "Insufficient privilege" according to TechNet. I've tried changing the permissions in WMI, the Windows\System32\WBEM folder and it's files, and on cmd but nothing seems to work. Any suggestions on how to get this script working. Running this script on the Win2k3 server gives the same results. Here is the code I'm using:

Code:
strComputer = "server"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process")
errReturn = objWMIService.Create("cmd.exe /c md c:\newfolder", Null, Null, intProcessID)
 
Back
Top