Using XCopy via K1000
- “sys\cmd.exe” mit Parameter “/c ”xcopy \\***SERVER***\mdtbuildlab$\Applications\sap guilogon\sapqe4_ini\saplogon.ini %userprofile%\appdata\roaming\sap\common\ /e /c /y“” starten.
what the hell is wrong with this script?
the kace send it but nothing happend....but manually its works perfect..o_O wtf?
Answers (5)
create a online script, upload the file, run as logged in user from the kace dependancy directory
you are making your life hard. create a online script, upload the file, run as logged in user from the kace dependancy directory
Comments:
-
thx to you too and the pic ;) - blackbyte 11 years ago
-
running it as anything but the user makes the user type varibles useless
for a list of varibles see
http://www.itninja.com/link/environment-variables-in-windows-vista-windows-7-and-windows-8
http://www.itninja.com/link/list-of-windows-and-dos-command-prompt-environment-variables - SMal.tmcc 11 years ago
What user are you running the script as? By default it will run as system which probably doesn't have access to network resources.
Comments:
-
runas administrator... -_- - blackbyte 11 years ago
-
XX - gcarpenter 11 years ago
-
Administrator won't have access to the network, most likely. Also, the %userprofile% environment variable will be the administrator profile, which probably isn't where you want the file to go. Try changing the script to an online kscript and setting the run as option to run as the logged in user. - chucksteel 11 years ago
I tried this before, but then I just straight gave up. Might work for you.
The current workaround would to pre append the start /wait command in front of the xcopy command.
For example:
xcopy \\printsvr\installs\ABC c:\Drivers\ABC\
Use the following instead:
start /wait xcopy \\printsvr\installs\ABC c:\Drivers\ABC\
http://www.kace.com/support/resources/kb/article/Unable-to-execute-xcopy-command-in-script-using
Comments:
-
Ahem brother... - gcarpenter 11 years ago