fire a VBS from ASP.NET

M

mike

I have a VBS (old fashioned VBS that is) that installs a network
printer via WMI on any PC.

I can pass in the PC's name via a command line argument.

The question is, how can I execute this VBS from a web page. Passing
in the user's PC name is the easy part (I think). Ulitmately, I need
to make a call something like
installprinter.vbs mypcname

Yes, I'm sure I could use the .NET wrapper for WMI but the script
already exists and I don't understand how to use it. Whereas, I know
VBS pretty well.

Thanks
Mike
 
M

mike

Are you trying to install this printer on the server or the client...?

Hi Mark

I want to install the printer on the client that calls the script. The
VBS will run on the server but connect to the WMI service on the
client.

Just a thought - will the security surrounding HTTP actually prevent
this from happening? While the script itself doesn't use HTTP, I
wonder if the fact that it has been called from HTTP will prevent
execution.

Thanks
Mike
 
M

Mark Rae [MVP]

I want to install the printer on the client that calls the script.
Ah...

The VBS will run on the server but connect to the WMI service on the
client.

That's not possible... Server-side script cannot *UNDER ANY CIRCUMSTANCES*
interact directly with the client due to the disconnected nature of the web.
Server-side script can send client-side script down to the client, but
that's all...
Just a thought - will the security surrounding HTTP actually prevent
this from happening? While the script itself doesn't use HTTP, I
wonder if the fact that it has been called from HTTP will prevent
execution.

Security will certainly be your main problem here...
 
M

mike

I was hoping this wouldn't be the case but it does make sense.

Looks like Remote WMI is the way to go here.

Thanks Mark.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top