You are not logged in.

#1 31 Oct 2012 21:45

britter440
Member
Registered: 31 Oct 2012
Posts: 3

Cannot modify file on network share via vbs

This process works on 2 new win7 machines regardless of user ID, but fails on 2 other new win7 machines regardless of user ID.

Using the filesystemobject, I check for existence of file on network share, then delete the file if it exists.

myFile = "\\myServer\data\test.txt"
fileChk = fso.FileExists(myFile)
if fileChk then
   fso.DeleteFile myFile
end if


My code passes the fileChk but then returns the error "file not found" when attempting the delete.

I can go directly to the network share and delete the file with the right-click option, so I've got permissions....

I'm new to the Win7 changes to vb script so I'm not sure exactly which setting are actually affecting my script behavior, but I've dug thru and found multiple registry keys.

Default scripting namespace is set to root/cimv2 for script execution on all machines
UAC is enabled on all machines.
standard user has same impersonation lvl on all machines.

Does anyone have any clues I can start researching to find out why some machines work and some don't?

Offline

#2 09 Nov 2012 23:16

britter440
Member
Registered: 31 Oct 2012
Posts: 3

Re: Cannot modify file on network share via vbs

What a basket of weeble sh!t.

The problem was the McAfee Endpoint Encryption was capturing all of the returning UDP packets and making the script think that the file wasn't found because there was no return.

If you have similar problems, look for encryption software on your machines that operate as a service and are constantly trying to encrypt things.

Offline

Board footer

Powered by