Solved

VBS script copying files from server is changing path path

Posted on 2015-02-17
3
193 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 81

Accepted Solution

by:
David Johnson, CD, MVP earned 425 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 2

Assisted Solution

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

Featured Post

Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

Question has a verified solution.

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

Suggested Solutions

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

734 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