Copy files in login script to users profile desktop
- From: "Scrappy" <Scrappy@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 08:20:16 -0700
I am trying to copy some shortcuts (.lnk) files to the desktop of all users
when logging in. I am trying to copy them from the netlogon share. here is
an example of how it worked in a batch file.
xcopy /d /y "%LOGONSERVER%\netlogon\downtime forms.lnk"
"%ALLUSERSPROFILE%\desktop"
I know that I can use the ExpandEnvironment variable but I cannot get the
syntax of the copyfile correct. Here is what I have.
set fso = WScript.CreateObject("Scripting.FileSystemObject")
set WshShell = WScript.CreateObject("WScript.Shell")
strProfile = WshShell.ExpandEnvironmentStrings("%allusersprofile%")
strLogonServer = WshShell.ExpandEnvironmentStrings("%logonserver%")
fso.CopyFile "\\' & strLogonServer & "\netlogon\downtime forms.lnk",
strProfile & "\desktop\"
Any help would be greatly appreciated.
.
- Follow-Ups:
- RE: Copy files in login script to users profile desktop
- From: Umesh Thakur
- RE: Copy files in login script to users profile desktop
- Prev by Date: Printer Information
- Next by Date: Re: File system watch utility
- Previous by thread: Printer Information
- Next by thread: RE: Copy files in login script to users profile desktop
- Index(es):