MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Running bat files during installation through MSI

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> C Sharp
Author Message
Mohit



Joined: 11 Dec 2007
Posts: 3

PostPosted: Thu Dec 13, 2007 11:44 am    Post subject: Running bat files during installation through MSI Reply with quote

Hi All,
I have some batch files which needs to be executed when installer
is running. How can I achieve this functionality using .Net MSI
installers. I didn't found any option where I can include all my
executables(here it is .bat) so that they can be run at the time of
installation.
Thanks in advance!!!

Archived from group: microsoft>public>dotnet>languages>csharp
Back to top
View user's profile Send private message
zacks



Joined: 08 Aug 2007
Posts: 4

PostPosted: Thu Dec 13, 2007 12:32 pm    Post subject: Re: Running bat files during installation through MSI Reply with quote

On Dec 13, 9:44 am, Mohit wrote:
> Hi All,
> I have some batch files which needs to be executed when installer
> is running. How can I achieve this functionality using .Net MSI
> installers. I didn't found any option where I can include all my
> executables(here it is .bat) so that they can be run at the time of
> installation.
> Thanks in advance!!!

Did you check out the PreBuildEvent and PostBuildEvent Setup Project
properties?
Back to top
View user's profile Send private message
Mohit



Joined: 11 Dec 2007
Posts: 3

PostPosted: Fri Dec 14, 2007 4:47 am    Post subject: Re: Running bat files during installation through MSI Reply with quote

Thanks a lot for your reply.

> Did you check out the PreBuildEvent and PostBuildEvent Setup Project
> properties?

Well I have checked them and done some googling on them. But I found
(I may be wrong..correct me if so) that these will run the batch files
when the deployment project is built on the development machine. (Here
is a brief excerpt taken from msdn docs regarding PreBuildEvent
property - "Specifies a command line to be executed before the
deployment project is built.")

I wanted to run the batch files on the target machine on which
installation is done and those batch files should be run during the
time when installation is going on the target machine.
Back to top
View user's profile Send private message
Family Tree Mike



Joined: 28 Sep 2007
Posts: 17

PostPosted: Fri Dec 14, 2007 10:46 am    Post subject: RE: Running bat files during installation through MSI Reply with quote

"Mohit" wrote:

> Hi All,
> I have some batch files which needs to be executed when installer
> is running. How can I achieve this functionality using .Net MSI
> installers. I didn't found any option where I can include all my
> executables(here it is .bat) so that they can be run at the time of
> installation.
> Thanks in advance!!!
>

You will need to create a custom action to do this. You can include the
files/executables as part of your installer package. Though not exactly what
you are trying, I just bundled some zip files loosly in the installer and the
custom action uses ICSharpZipLib to extract them. I bundled ICSharpLib as
part of the installer and it worked well. I believe you will bundle your bat
file, then call it from your custom action.
Back to top
View user's profile Send private message
Mohit



Joined: 11 Dec 2007
Posts: 3

PostPosted: Mon Dec 17, 2007 9:37 am    Post subject: Re: Running bat files during installation through MSI Reply with quote

> You will need to create a custom action to do this. You can include the

Thanks a lot.
Custom action worked for me.

Now I have another problem - I have added custom action in Commit
therefore it runs the bat file at the end of the setup. What should I
do in order to run the batch file at the start of the installer or in
middle at some step???

Thanks again!

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Installation Package - Running Utility Programs How do you run a utility program like regasm.exe against your files during installation? I'd like to register a .tlb file or create a new .tlb file during installation. How do you do something like this from the standard installation package? TIA! Jerry

AMD installation Hi, Did anyone tried installing DOT NET 2003 on AMD , I am facing a problem , while installing i got a alert saying error 25003 , I am installing on WINDOWS XP professional edition . TIA Veresh

VB.Net Installation We had developed a vb.net application using .Net 2003 installed in windows 2000 professional. The application is working well on windows 2000. When the application is running on windows 98, when ever a form is closed (me.close()) the system stops respondi

VB.Net Installation We had developed a vb.net application using .Net 2003 installed in windows 2000 professional. The application is working well on windows 2000. When the application is running on windows 98, when ever a form is closed (me.close()) the system stops respondi

error during SDK 1.1 installation error 1335. The cabinet file required for this installation is corrupt and cannot be used. Anyone received this error?
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> C Sharp All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group