Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

fire a VBS from ASP.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mike - 21 Aug 2007 02:42 GMT
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
Mark Rae [MVP] - 21 Aug 2007 08:47 GMT
> Yes, I'm sure I could use the .NET wrapper for WMI

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

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

mike - 21 Aug 2007 23:21 GMT
> Are you trying to install this printer on the server or the client...?
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net

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
Mark Rae [MVP] - 22 Aug 2007 00:09 GMT
> 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...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

mike - 24 Aug 2007 04:50 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.