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

 

Answer Summary:
Cancel
3 Comments   [ + ] Show Comments

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'
  • 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'
  • 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.
    • This content is currently hidden from public view.
      Reason: Removed by member request
      For more information, visit our FAQ's.
Please log in to comment

Community Chosen Answer

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.
Answered 10/23/2014 by: EdT
Red Belt

  • 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
    • So sorry. I re-read all the comments and try to run as logged on user and it WORKS!!!!!.
      Thank you so much
Please log in to comment

Answers

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
Answered 10/22/2014 by: SMal.tmcc
Red Belt

Please log in to comment
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.

Answered 10/22/2014 by: BHC-Austin
Fourth Degree Black Belt

  • 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
Please log in to comment
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
Answered 10/22/2014 by: SMal.tmcc
Red Belt

  • make sure you use the double qoutes for the file name
Please log in to comment
1

tatus screen shots

 

 

Answered 10/23/2014 by: Kdebiasse
Sixth Degree Black Belt

Please log in to comment
1

tatus screen shots

 

 

Answered 10/23/2014 by: Kdebiasse
Sixth Degree Black Belt

  • are these 64bit machines?
    • Virtual PC running 32 bit. Main system is windows 8.1 64 bit.
      • 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
    • could you show where
      Dir: C:\windows\system32
      File"wscript
      Paramete: $(kace_dep_Dir)\printer_install

      Sorry I'm new to script writing
Please log in to comment
1
UOhwRG.jpeg
Answered 10/23/2014 by: SMal.tmcc
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity