Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


opening a url from a cd

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,485
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> opening a url from a cd
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 opening a url from a cd - 11/13/2001 2:19:05 PM   
  dmnes

 

Posts: 1
Score: 0
Joined: 11/13/2001
From: USA
Status: offline
We are giving a client CDs for thier promotional use. I need to write a .vbs file or something that, when someone clicks on it, causes their default browser to open and load a url, like "http://www.CompanyName.com". This .vbs file is going to be on the CDs, so it has to be windows commands that will execute opening the url. Can anyone help?

jim bender
 
 
Post #: 1
 
 Re: opening a url from a cd - 11/13/2001 4:20:50 PM   
  imav8n

 

Posts: 95
Score: 0
Joined: 7/3/2001
From: USA
Status: offline
You could do something like this:

Set WSHShell = WScript.CreateObject("WScript.Shell")

WSHSHell.run("http://www.yahoo.com")

This has the same effect in windows as START -> RUN -> http://www.yahoo.com

This will open up the site in whatever the users default browser is...and will probably return an error if they don't have any browser installed at all (rare, but I've seen it happen before).


~imav8n
Failure is not an option.....it comes bundled with the software.

(in reply to dmnes)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> opening a url from a cd Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts