472,352 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

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

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. %>
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
1 2144
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

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

Similar topics

by: LRW | last post by:
Sorry to crosspost, but I have no idea if this is more a PHP question of general Linux question. I have a script that makes changes to image...
by: Danny | last post by:
I am able to read the contents of our dynamic pages, but how can I create these html files on the fly on our server using asp. THe code below is a...
by: Andi B | last post by:
Hi folks, Wondering if anyone can help me - I have recently set up a website on our work intranet, which allows staff members in our team to...
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows...
by: Martin Knopp | last post by:
Anybody here can shed some light on this issue? Is it at all possible to call out-of-proc COM objects from ASP.NET? If yes, what configuration...
by: TdarTdar | last post by:
Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied. Failed to initialize the...
by: Bala | last post by:
Hi, After installing Win2K3 SP1, ASP.NET pages are not being rendered at all. I get a Access Denied error (BC31019: Unable to write to output...
by: Corey B | last post by:
I have a web server running IIS 6. The network security team here has completely locked down the server. They have installed an application...
by: shamirza | last post by:
When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a...
by: Peter Michaux | last post by:
I have a Perl script that I want to run as a set-user-ID program. Many OSes don't allow scripts run as set-user-ID. To make this script portable,...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.