I'm tring to copy a file to 'All Users\Start Menu\Programs\Startup' folder. I keep getting an error telling me it can't find the file specified. The file is definitely in the 'd:\scripts' folder and it is definitely named 'JoinDomain.vbs'.
I'm sure the problem is syntax related, but I can't seem to find the answer. Please help!
Thanks in advance.
Set oShell = CreateObject("Wscript.Shell")
strAllUser = oShell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%")
DestAllStart = strAllUser & "\Start Menu\Programs\Startup"
ScriptPath = "d:\Scripts"
JDScript = ScriptPath & "\JoinDomain.vbs"
ShellCMD = "copy " & JDScript & " " & CHR(34) & DestAllStart & CHR(34) & " /Y"
Const OverwriteExisting = True
'Set objFSO = CreateObject("Scripting.FileSystemObject")
set WshShell = CreateObject("WScript.Shell")