Solved

VBS script copying files from server is changing path path

Posted on 2015-02-17
3
188 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 78

Accepted Solution

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

Author Comment

by:schilste
Comment Utility
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 2

Assisted Solution

by:Rossano Praderi
Rossano Praderi earned 75 total points
Comment Utility
Yes, the hard path %windir%\system32\wscript.exe is correct!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
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.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now