Click here to Skip to main content
15,908,166 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I need a method of running an Exe at the end of an install. I have assembled an installer that installs both exe's (One is the actual Application, the other checks to see if a driver is there or not) I need to Auto run the checker once the Application has installed automatically (I am using Visual Studio 2008 C#), The old method I have used in the path for this appears to have been blocked (this was VB6 times, virus, Trojans used it?). I have searched Google & friends asked people I know ,on boards and strangers,(the reaction is typically are you trying to write a virus or something nasty). I can't say I blame them but how do I check for driver MSDN does not really suggest a method of automatic checking just manual, somebody please point me in a correct-ish direction please.
Glenn
Posted
Updated 30-Jul-12 4:57am
v2
Comments
lewax00 30-Jul-12 11:08am    
It depends, what are you using to make the installer? A custom program, WiX, dotNetIntaller, something else?
glennPattonWork3 31-Jul-12 4:49am    
Sorry, I edited it for clarity.
Glenn

Well, the simple method would be to make an executable that works as the overall event controller, meaning that it launches the installer at the appropriate time, before or after it checks for the file.
 
Share this answer
 
Comments
glennPattonWork3 30-Jul-12 11:48am    
So you mean like my Version checking program which would check the version of the drivers and if correct launch the installer? This would seem to up the number of files, but allelse is failing I'll give it a go!
Glenn
Albert Holguin 30-Jul-12 13:19pm    
Yeah, I do a similar thing with one of my applications...
glennPattonWork3 31-Jul-12 5:56am    
Well just gave it a go and it works! I'll just have to supply a folder with all the bits hidden it it. Don't seem to be that professional though (mind you having an unknown user fiddle about with drivers seems less!)
Glenn
Albert Holguin 31-Jul-12 9:26am    
When you make your own application, it's as professional as you want it to be. In another words, the look and feel of it falls on your shoulders.
glennPattonWork3 31-Jul-12 11:11am    
So....if it an executable that uses other files to do/complete the installation its perfectly acceptable, somehow it fells dirty!
While creating setup file add installer class file and override appropriate events like install, after install etc.
In that event call your form with which you want to check your requirements.

Hope this will solve your problem.
 
Share this answer
 
Comments
glennPattonWork3 31-Jul-12 4:48am    
Hmm... How do you go about adding a class to installer, As right click on the installer does not give you the option, if I right click on the project will this give the correct position for the application to run, also will it run every time this application is run as I don't think it's really needed...
hari19113 2-Aug-12 12:19pm    
Don't add class to an installer add installer class in your application and if you look at its event you will find all events related to installations. From there you can call your desired exe and whenever you run the installer the particular event will be fired.

Hope this will help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900