Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VBS script copying files from server is changing path path

Posted on 2015-02-17
3
Medium Priority
?
198 Views
Last Modified: 2015-02-17
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 Shortcut propertiessetOutput.txt
0
Comment
Question by:schilste
3 Comments
 
LVL 84

Accepted Solution

by:
David Johnson, CD, MVP earned 1700 total points
ID: 40614866
change the hard path from c:\windows\system32\cscript.exe to %windir%\system32\cscript.exe
0
 

Author Comment

by:schilste
ID: 40615170
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?
0
 
LVL 3

Assisted Solution

by:Rossano Praderi
Rossano Praderi earned 300 total points
ID: 40615250
Yes, the hard path %windir%\system32\wscript.exe is correct!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question