Script fails
I have a very simple script that copies a file to a folder in windows. Here is the contents of the batch file.
copy ultravnc.ini "C:\Program Files\UltraVNC\ultravnc.ini" /y
When it runs I get the error "Error creating process: c:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\1954\UVNC.cmd\ : (5) Access is denied. "
I can run the script successfully from “c:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\1954\"
My launch statement is "c:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\1954\UVNC.cmd\ ". I changed it from $(KACE_DEPENDENCY_DIR) because I have seen that sometimes it is better to put the path to the file.
So what is wrong?
Thanks
Jane
copy ultravnc.ini "C:\Program Files\UltraVNC\ultravnc.ini" /y
When it runs I get the error "Error creating process: c:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\1954\UVNC.cmd\ : (5) Access is denied. "
I can run the script successfully from “c:\
My launch statement is "c:\
So what is wrong?
Thanks
Jane
3 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
SMal.tmcc
10 years ago
are you on kace 6? I am having trouble with xcopy working in a offline kscript, need to trouble shoot more, but my rename and move commands worked within the same script I was running. A quick workaround I found was to use the move command vs xcopy
- Launch “$(KACE_SYS_DIR)\
cmd.exe ” with params “/c move /y c:\ ”.users\ default\ prezi c:\ users\ public - Launch “$(KACE_SYS_DIR)\
cmd.exe ” with params “/c move /y $(KACE_DEPENDENCY_DIR)\ ”.copyredirector.bat c:\ windows\ w2d - Launch “$(KACE_SYS_DIR)\
cmd.exe ” with params “/c move /y $(KACE_DEPENDENCY_DIR)\ ”.redirector.vbs C:\ Windows\ System32\ GroupPolicy\ Machine\ Scripts\ Shutdown - Launch “$(KACE_SYS_DIR)\
cmd.exe ” with params “/c move /y $(KACE_DEPENDENCY_DIR)\ ”.scripts.ini C:\ Windows\ System32\ GroupPolicy\ Machine\ Scripts
Comments:
-
I uploaded the files within a zip with a run.bat that failed. But it works fine as above - SMal.tmcc 10 years ago
Here is what is in the script from the XML:
<launch_program path="$(KACE_SYS_DIR)\cmd.exe" program="" wait="true" parms="/c move /y $(KACE_DEPENDENCY_DIR)\ultravnc.ini "C:\Program Files\UltraVNC"" /> - jfrasier 10 years ago
The program is cmd.exe
Try that and let us know how you get on. - EdT 10 years ago
Error Code: 0"
I copied the command and ran it from the cmd prompt manually and it said that the syntax was incorrect.
Any ideas?
Thanks. - jfrasier 10 years ago