Link to home
Start Free TrialLog in
Avatar of Joel Armstrong
Joel Armstrong

asked on

machine\startup VBscript objFSO.CopyFile srvfileName, w7Path, true

On a windwos 2008 domain I have a GPO that executes a vbscript from the \\servername\sysvol\domain\policies\{policy}\machine\script\startup so it will run at system level privileges.

The scripts executes until it gets to objFSO.CopyFile srvfileName, w7Path, false      then appears to just stop an never completes the script.

I have turned off uac and the workstation has local admin rights and still the same result.

The script will run if ran manually after logon to the workstation.

This script checks file date and size and copy's the updated file.   It use to work.
file.txt
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Joel Armstrong
Joel Armstrong

ASKER

Thanks for looking at the code, however, I think I finally found the real issue.  The folder on one of the server did not have the SYSTEM listed under the security tab.  So, I assume since the script when executed from \\server\SYSVOL\Domain.Something\Policies\{904A92FE-11D6-4854-AE9D-6A30EA6E9AA3}\Machine\Scripts\Startup supposedly runs with SYSTEM level privileges could not access the file because of permissions.   I added the SYSTEM account back to the folder and everything went back to working.  

I did look at the code you modified and will probably clean it up with your suggestions especially since we no longer use windows XP.