fire a VBS from ASP.NET

  • Thread starter Thread starter mike
  • Start date Start date
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
 
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
 
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...
 
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
 
Back
Top