Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBS script copying files from server is changing path path

Posted on 2015-02-17
3
Medium Priority
?
195 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 83

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 2

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
Suggested Courses

670 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