Advertisement

10.08.2008 at 02:51AM PDT, ID: 23796670 | Points: 500
[x]
Attachment Details

VBScript, Error 3 - Insufficient Privilege, Win32_Process.Create

Asked by Freshandeasy in VB Script

Tags: ,

I'm trying to execute a VBscript program which creates a folder on remote computer and then copies few files from the local computer to the remote computer, I'm using WMI Win32_Process.Create method to create the folder. The script executes fine on certain computers but fails on certain others with the Error Code: 3 and the description given on the MSDN site states as 'Insufficient Privilege'

I have a domain account which has Local administration rights on all the machines, so the privilege issue doesn't make sense to me.

We have a mixed environment of Windows XP and Windows 2000 Professional computers. The script executes fine on both the OS, so I guess it is nothing to do with OS architecture.

I have been trying to find a good solution to this problem but not successful. I have tried all sorts of things suggested like disabling firewall, firewall services, re-starting WMI service, enabling Remote administration etc. on few remote machines but still without success.

The aim of my actual script is to execute a Batch program which removes all corrupted installation of AV's on the remote computers and thats the reason I'm copying certain files needed for the uninstallation.

Any help would be much appreciated and also please suggest me any other means with which we could create folders on remote computers. The ai

Attached is the piece of code I'm trying to execute:
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
strComputer = "USDT923077"
 
   Set objFSO = CreateObject("Scripting.FileSystemObject")
	
   Set objWMIService = GetObject("winmgmts:" & _
		"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2:Win32_Process")
 
   errReturn = objWMIService.Create("cmd.exe /c md C:\WINNT\Temp\AvTmp", Null, Null, intProcessID)
 
 
   If errReturn <> 0 Then
 
	Wscript.Echo "Cannot create Tmp directory on: " & strComputer & " Error Code: " & errReturn
 
	Wscript.quit
		
   Else
			
        Wscript.sleep 5000
 
        objFSO.CopyFile "C:\AV_Removal_Tool\Removal_Tools\*.*", "\\" & strComputer & "\C$\WINNT\Temp\AvTmp", OverwriteExisting
 
   End If
[+][-]10.08.2008 at 06:56AM PDT, ID: 22669024

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.09.2008 at 02:06AM PDT, ID: 22676609

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.09.2008 at 02:22AM PDT, ID: 22676672

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.09.2008 at 05:39AM PDT, ID: 22677660

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.09.2008 at 05:50AM PDT, ID: 22677746

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.09.2008 at 07:22AM PDT, ID: 22678662

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628