homepage Welcome to WebmasterWorld Guest from 23.22.173.58
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
vbscript to launch exe file on network drive
or launch a local shortcut
Purple Martin

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2293 posted 1:27 am on Nov 12, 2004 (gmt 0)

I'm writing an intranet-only browser based application. I need to launch either a SETUP.EXE that is on a network drive or a shortcut on a local drive that points to the exe on the network drive.

I already know how to launch a local exe, for example:
Set objApp = CreateObject("WScript.Shell")
objApp.Run "cmd /C CD C:\ & Program Files & SomeFolder & SETUP"

How can I launch a network exe?

 

duckhunter

10+ Year Member



 
Msg#: 2293 posted 5:30 am on Nov 12, 2004 (gmt 0)

Have you tried the UNC path with a shared folder in place? \\ServerNameOrIP\ShareName\Setup.exe

Purple Martin

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2293 posted 12:05 am on Nov 15, 2004 (gmt 0)

Yes, however the cmd window can't switch drives to a network.

duckhunter

10+ Year Member



 
Msg#: 2293 posted 3:51 am on Nov 15, 2004 (gmt 0)

Try creating a batch file (Setup.bat) and place the UNC call in it. Then run the cmd /c path to batch file

[edit]doh! this is client side. that won't work! Do your intranet users have a network drive that's always mapped when logged in, like a public drive where the batch file could live? Or make a call to map a network drive before calling the cmd[/edit]

Purple Martin

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 2293 posted 9:51 pm on Nov 15, 2004 (gmt 0)

Thanks for the suggestions.
Do your intranet users have a network drive that's always mapped when logged in, like a public drive where the batch file could live?

Yes, but I don't quite understand how this would help. I'm having trouble launching a network .exe, so how would a network .bat be any easier?

jamesnylen

10+ Year Member



 
Msg#: 2293 posted 11:45 pm on Nov 15, 2004 (gmt 0)

objApp.Run "cmd /C net use z: \\comp\path\ [password] & z: & setup"

The "net use" command is what you are looking for.

Type "net use /?" in CMD for more help.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved