/build/static/layout/Breadcrumb_cap_w.png

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



3 Comments   [ + ] Show comments
  • I made changes I think like you have suggested but the error has changed to (2) The system cannot find the file specified

    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 &quot;C:\Program Files\UltraVNC&quot;" /> - jfrasier 9 years ago
    • The file ultravnc.ini is definitely in the dependency dir. - jfrasier 9 years ago
  • The program path is $(KACE_SYS_DIR)
    The program is cmd.exe
    Try that and let us know how you get on. - EdT 9 years ago
  • This worked great, on our Windows 7 computers. However we have a lot of computers STILL on XP and it doesn't. This is what the log shows: "Error creating process: C:\WINDOWS\System32\cmd /c move /y C:\Documents and Settings\All Users\Dell\KACE\kbots_cache\packages\kbots\1954\ultravnc.ini "C:\Program Files\UltraVNC": (0) The operation completed successfully.
    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 9 years ago
    • We have the same issue since either upgrading to 6 or an unrelated change somewhere. All of a sudden we have what looks like UAC issues. I'm at a loss as to the cause. - AndyH 9 years ago

Answers (1)

Posted by: SMal.tmcc 9 years ago
Red Belt
0
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

  1. Launch $(KACE_SYS_DIR)\cmd.exe with params /c move /y c:\users\default\prezi c:\users\public.
  2. Launch $(KACE_SYS_DIR)\cmd.exe with params /c move /y $(KACE_DEPENDENCY_DIR)\copyredirector.bat c:\windows\w2d.
  3. Launch $(KACE_SYS_DIR)\cmd.exe with params /c move /y $(KACE_DEPENDENCY_DIR)\redirector.vbs C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown.
  4. 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 9 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ