473,396 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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. %>
  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
1 2239
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

7
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 files, montages them into a jpg, and creates a Web...
6
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 test to see if I can read the html and then save...
8
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 attach a photo of themselves to their profile on the...
9
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 security to manage the permissions. Why reinvent...
3
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 settings are required? I played around many...
9
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 AppDomain:/LM/W3SVC/5/Root Exception:...
4
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 file) OR a Page Cannot Be Displayed (PCBD) error...
3
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 called Cisco Security Agent (CSA). What CSA does is...
0
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 number of sessions on .NET technology, and...
24
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, it seems I need to write a C wrapper program that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.