/build/static/layout/Breadcrumb_cap_w.png

Script will not run

Hello,

 I have a VBS script I'm trying to run. Doe not run on remote PC.

zajnyq.jpeg

Log come back

CJM17q.jpeg

 

Another script log is

n8qm4k.jpeg 

Please help

 


3 Comments   [ + ] Show comments
  • Running as: pcadmin
    Directory DOES exist: c:\windows
    Launched Process: cscript.exe
    Activity Log
    Checking if directory exists: c:\windows

    Better picture of the log.
    This is second log.
    Launching program: '$(kace_sys_dir)\cscript.exe' 'C:\ProgramData\Dell\KACE\tmp\oxv7lilj\packages\kbots\345\vbscript.vbs' wait='false' - Kdebiasse 9 years ago
  • First log
    Output Log
    Running as: pcadmin
    Directory DOES exist: c:\windows
    Launched Process: cscript.exe
    Activity Log
    Checking if directory exists: c:\windows
    Launching program: '$(kace_sys_dir)\cscript.exe' 'C:\ProgramData\Dell\KACE\tmp\oxv7lilj\packages\kbots\345\vbscript.vbs' wait='false' - Kdebiasse 9 years ago
  • I don't know what is wrong:
    1) I see the VBS file is in the kbot folder
    2) The VBS file will run if copy to desktop and open. But not through kace..
    3) tried it as administrator and local user account kace account and still nothing. - Kdebiasse 9 years ago

Answers (7)

Answer Summary:
Posted by: EdT 9 years ago
Red Belt
3
I do not believe printer installs will work in SYSTEM mode as the printer information has to be stored in the user profile, to which the SYSTEM account has no access.

Comments:
  • that could be what is throwing the error. they can try to run the script as logged in user and see if that fixes it - SMal.tmcc 9 years ago
    • So sorry. I re-read all the comments and try to run as logged on user and it WORKS!!!!!.
      Thank you so much - Kdebiasse 9 years ago
Posted by: SMal.tmcc 9 years ago
Red Belt
2
you posted in
http://www.itninja.com/blog/view/how-to-hide-running-a-batch-file-from-a-kscript-with-version-5-5
 "I tried this and getting "printer connection cannot be removed. double click the printer name and make sure that the printer is connected to the network."
It sounds like the script is now running and is throwing the error, can you post the script.
I tried this and getting "printer connection cannot be removed. double click the printer name and make sure that the printer is connected to the network." - See more at: http://www.itninja.com/blog/view/how-to-hide-running-a-batch-file-from-a-kscript-with-version-5-5#sthash.U1lk7MaR.dpuf
Posted by: BHC-Austin 9 years ago
4th Degree Black Belt
1

It looks like there is a problem with your replacement variables. As you can see in the first log, it has replaced $(KACE_DEPENDENCY_DIR) with the correct path, but $(KACE_SYS_DIR) was not replaced. In the second log, it didn't replace either one. Try putting them in all caps, as indicated in the documenation. Also, you may want to make sure the PCs these are running on are on the latest Agent for the version of KBOX you're on. Additionally, you may also want to enclose the path to the script in quotes, in case the $(KACE_DEPENDENCY_DIR) is a folder w/ spaces or long filenames.


Comments:
  • Tried it and I'm getting this now in log:
    Output Log
    Running as: SYSTEM
    Launched Process: cscript.exe
    Activity Log
    Launching program: 'C:\Windows\System32\cscript.exe' ' 'C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\345\printer_install_remove.vbs'' wait='false'
    and nothing happens - Kdebiasse 9 years ago
Posted by: SMal.tmcc 9 years ago
Red Belt
1
run it this way:

http://www.itninja.com/blog/view/how-to-hide-running-a-batch-file-from-a-kscript-with-version-5-5

I use a vb script to call a batch and have a screen shot of the vbs call

Comments:
  • make sure you use the double qoutes for the file name - SMal.tmcc 9 years ago
Posted by: Kdebiasse 9 years ago
9th Degree Black Belt
1

tatus screen shots

 

 

Posted by: Kdebiasse 9 years ago
9th Degree Black Belt
1

tatus screen shots

 

 


Comments:
  • are these 64bit machines? - SMal.tmcc 9 years ago
    • Virtual PC running 32 bit. Main system is windows 8.1 64 bit. - Kdebiasse 9 years ago
      • try using the following with wscript vs cscript, make sure to include the " " in the file name.

        Launch a program...

        directory: $(KACE_DEPENDENCY_DIR)
        file: "c:\windows\system32\wscript.exe"
        parameters : printer_install_remove.vbs - SMal.tmcc 9 years ago
    • could you show where
      Dir: C:\windows\system32
      File"wscript
      Paramete: $(kace_dep_Dir)\printer_install

      Sorry I'm new to script writing - Kdebiasse 9 years ago
Posted by: SMal.tmcc 9 years ago
Red Belt
1
UOhwRG.jpeg
 
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