Link to home
Start Free TrialLog in
Avatar of schilste
schilsteFlag for United States of America

asked on

VBS script copying files from server is changing path path

Part of the our login script copies a folder located on a share on the %logonserver% server and copies it down to the end users desktop. The copy is working fine. One of the files is the folder share is a shortcut that points it back to the logonscript. The file is called "re-login". The user could run this if for some reason their drive mappings did not map, as that is part of the logon script.

On 3% of our computers it is changing the target file from C:\Windows\system32\wscript.exe "%LOGONSERVER%\NETLOGON\companylogon.vbs to C:\WINNT\system32\wscript.exe "%LOGONSERVER%\NETLOGON\companylogon.vbs

When the user tries to run the shortcut it tells them that it is an invalid directory as C:\WINNT does not exist on their computer.

I understand that WINNT used to be the system root directory on computers with windows version < 2000. This is not the case as all of our computers are windows 7. When I check SET at the command prompt it gives me the proper variables for windir and systemroot.

The problem is intermittent on 3% of our computers and hard to reproduce. I would like to understand why this is happening as it is working correctly on all of our other computers.

logon.txt User generated imagesetOutput.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 schilste

ASKER

Just to be clear we are currently using wscript.

Changing the hard path to %windir%\system32\wscript.exe will be the solution we want - correct?
SOLUTION
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