By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,470 Members | 994 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,470 IT Pros & Developers. It's quick & easy.

Run .VBS script from ASP: (yes, permissions are set correctly)

P: 2
I am trying to run the code below, but it doesnt give me a message either way that the code executed:

Expand|Select|Wrap|Line Numbers
  1. <%
  2. dim w
  3. set w = Server.CreateObject("WScript.Shell")
  4. w.run "cmd.exe /c cscript c:\runme.vbs"
  5. set w = Nothing
  6. %>
  7.  
I need to be able to run a .vbs from the server side to install a printer on the user's pc. Thanks for your help in advance!
Feb 28 '07 #1
Share this Question
Share on Google+
1 Reply


P: 2
oh yeah, here is my vbscript:

Expand|Select|Wrap|Line Numbers
  1. Set objNetwork = CreateObject("Wscript.Network")
  2. objNetwork.AddWindowsPrinterConnection "\\servername\printer"
  3. objNetwork.SetDefaultPrinter "\\servername\printer"
Feb 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.