Those are the parameters that I am using to run the script. It works fine until it gets to step number 2. It will not run it. If I check the directory both the zipped and unzipped file are in there. The script works fine if I run it from there. Please help! 

8 Comments   [ + ] Show Comments

Comments

  • How about changing the Directory in step number 2 into C:\windows\system32?
  • should be $(KACE_SYS_DIR) in step 2 to use the kace variables for the directory, parameters is OK.
  • Change step 2 to wscript.exe and just put uninstallkiosk2.vbs as the parameters. Also, are you uploading this script as a dependency? Another thing, does the zip file just contain the vbs or are there other things inside?
  • Isn't the unzip step redundant? Doesn't the KACE agent automatically unzip a zip file that's uploaded as a dependency? That said, I agree with everyone else's observation - Step 2 directory should be $(KACE_SYS_DIR) or you can just abbreviate as SYS.
  • Thanks for the suggestions guys. I tried changing the directory as suggested, but still ran the script without success. Also aeiner the zip file only contains he vb script and it is uploaded as a dependency.
    • Just upload the VBS and not the zip file:

      launch a program

      location $(kace_dependency_dir)
      file wscript.exe
      wait for completion
      yourscript.vbs

      I use this exact method for all of my simple scripts and it works without issue. Also are you using Run Now or scheduling? What errors are you getting in the logs?
  • Output Log
    Running as: SYSTEM
    Error creating process: C:\Windows\System32\wscript.exe uninstallkiosk.vbs: (1) Incorrect function.

    Activity Log
    Checking if file exists: C:\windows\system32\msiexec.exe
    Launching program: 'C:\Windows\System32\wscript.exe' 'uninstallkiosk.vbs' wait='true'

    those are the errors I am getting.
  • I think you'll have to give it the full path to the .vbs file otherwise it won't know where to find it.
  • Using the full path worked it ran the script without issue. However when the computer restarts the program is still installed. When I manually go to the folder and double click the vbs script that KACE copied it runs and uninstalls the software fine. I do not know what I am missing.
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity