Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute a Setup.exe from a Button 1

Status
Not open for further replies.

thermalman

Technical User
Aug 26, 2003
89
GB
Hi, I am fairly new to using Visual Basic.net.

I have created a form with 7 buttons on it that indicate 7 Drivers that a Customer can load when they need to. I thought of creating the program as an .exe and putting it on to a CD along with a main folder named drivers and then sub folders for say Graphics, Network, Chipset etc....

The problem that I face is that I everybodies CD Rom drive is different so
Question 1: How can I program the buttons to call the relevant .exe when I don't know where to call it from. I have read a few forums and some people talk about using the Shell command? Can anybody give me an example of say calling a setup.exe using the Shell command.

Question 2: How can I get the form to know when the setup program has finished and come back to the main screen.

Regards
Thermalman
 

Put your app in the root of the CD and put all the drivers in their folders. Then call them like this:

System.Diagnostics.Process.Start(Application.StartupPath & "\<folder name>\Setup.exe")

Put the actual folder name in place of <folder name>.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top