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
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)
Please log in to answer
Posted by:
mattygarland
14 years ago
Posted by:
airwolf
14 years ago
Posted by:
airwolf
14 years ago
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.
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
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
Also make sure you test your script outside of kbox using this technique
Posted by:
neil.levien
14 years ago
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"
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
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
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
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"
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.
so that the conversation will remain readable.