/build/static/layout/Breadcrumb_cap_w.png

vbs script not running

Hi

I have a vbs script to install a printer and make it the default and i am trying to deploy it via the kbox but it wont run. Everything set in the parameters etc seems to be ok and the vbs file will run when i run it from a command prompt but not when it is run from the kbox.
I have also set it to run the vbs file in a batch file and again this makes no difference.

Thanks

0 Comments   [ + ] Show comments

Answers (9)

Posted by: airwolf 14 years ago
Red Belt
0
Call the vbs file using CScript.exe.
Posted by: mattygarland 14 years ago
Third Degree Blue Belt
0
Hi

Yes thats what i was doing. In verify under launch Program i had $(KBOX_SYS_DIR) running cscript.exe with parameters $(KACE_DEPENDENCY_DIR)\PrinterReception.vbs

But it doesnt work
Posted by: airwolf 14 years ago
Red Belt
0
Sounds like you've got it configured properly to me. It could be an issue with the parameter being passed to CScript since there is a space in 'Program Files'. Try wrapping $(KACE_DEPENDENCY_DIR)\PrinterReception.vbs in quotes in the parameter field.
Posted by: mattygarland 14 years ago
Third Degree Blue Belt
0
yep done that as well.
Posted by: airwolf 14 years ago
Red Belt
0
I just noticed you said you've got the vbs set to run in the Verify stage. I've never tried that, although I suppose it should work. However, proper configuration is to run scripts, etc. in the Remediation stage. Without a proper verification stage, the script will run over and over.

As for the script not launching, it could be something the script itself is doing that won't allow it to run properly under the SYSTEM account (which is what everything runs as from the KBOX agent). Other than that, I'm out of ideas. Can you get a very simple vbs to run using the same configuration? Just write something simple that writes a registry key and try it out. This will at least confirm whether it is a KBOX problem or a problem with the script itself.
Posted by: GillySpy 14 years ago
7th Degree Black Belt
0
The scripting logs will show what it tried to do. Look at those in the inventory of your test machine.

Also make sure you test your script outside of kbox using this technique
Posted by: neil.levien 14 years ago
Yellow Belt
0
What kind of printer are you trying to install? a local printer or network printer?

I had major issues trying to get one of my install scripts to work installing a local printer.

However I managed to get it to work using the following batch file.

NET STOP SPOOLER
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" /v "PortName" /t REG_SZ /d 1 /f
NET START SPOOLER
rundll32.exe printui.dll,PrintUIEntry /if /b "Driver Name" /f "Path to driver" /r "PortName" /m "Driver Name"
Posted by: KevinG 14 years ago
Red Belt
0
The script is run by the KBOX agent using the "Local System" account.
Confirm that your script runs using the "Local Ssyetm" account after you have verified that it runs from the command line when login as a local user.
http://www.kace.com/support/customer/faq/index.php?action=artikel&cat=5&id=731&artlang=en
Posted by: brucegoose03 13 years ago
5th Degree Black Belt
0
Here's what I've done:

http://itninja.com/question/silent-uninstall-oracle-8-cilent1858&mpage=1&key=𑢲

I had tried several different ways to get the VBS to run, when I was successfull with the following method:

Directory: $(KBOX_SYS_DIR)
File: cscript.exe
Parameters: "$(KACE_DEPENDENCY_DIR)\vbsscript.vbs"
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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