473,761 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running bat files during installation through MSI

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(her e it is .bat) so that they can be run at the time of
installation.
Thanks in advance!!!
Dec 13 '07 #1
3 5170
On Dec 13, 9:44 am, Mohit <mohitscj...@gm ail.comwrote:
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(her e 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?
Dec 13 '07 #2
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.
Dec 14 '07 #3


"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(her e 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.

Dec 14 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
5637
by: MAK | last post by:
Hello everyone, I know how to add images and icons etc to dll file. What I would like to know is there is a way to add those icons on the forms during the run time from the dll or to reference it to the dll during the design time, then when I compile the project and install it, then all the images still inside the dll file. not to be installed into winnet, or system or system32 or any directory, 1) is it possible ? and how ? link or...
2
3023
by: Dave A | last post by:
I have an application that runs in the system tray (taskbar notification area) and it runs at startup. Occasionally I need to release a new version. I have created a deployment project in .Net. With the MSI it detects whether a current version is installed and requests that the user uninstalls it prior to installing the new version. Also, MSI detects a running instance of the application during the uninstall and requests that it be closed...
0
1467
by: Michał Januszczyk | last post by:
Hello. I've got the following problem: I created a windows installer project that installs my application. The application works with some files. I want to include some example files with the installation package. These files by no means are critical for the application itself. They are included only to help application user to get aquaintanced with the app.
2
2151
by: faktujaa | last post by:
Hi, I have created an application that uses IIS to host remote components. All the remote components are listed in app.config in client and web.config in server. Now the app.config can contain either localhost name/IP address to point to remote component like <wellknown type="XYZ, XYZ" url="http://localhost:80/XYZ" />. Remoting configuration is done using RemotingConfiguration.Configure("XYZ.exe.config") in application's main method....
24
3719
by: Thom Little | last post by:
During an uninstall, how can I check to see if the application I an uninstalling is currently running? -- -- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd. --
6
3671
by: Juggler | last post by:
Hi all I've written a program in VB.NET that allows the user to build quotes for installing shower enclosures. As part of the program, I've included a blank Access database. I've provided them with an interface where they can add their own clients to the database When the user upgrades to a newer version of my program, I don't want the installer to overwrite the Access database file with my blank one again. How can I tell VB.NET to check...
4
6433
by: Shiraz | last post by:
Hi I'm using Visual Studio Installer to make my installer, and have not as yet figured out a straightforward way to use it to set environmental variables. Amongst the various things I tried, I'm thinking the following might help. I would appreciate if someone could comment on this idea and possibly suggest a better one: The environement variable in question is 'Path' in the HKCU registry folder's Environment key. I want to add some...
1
1374
by: Dica | last post by:
i'm primarily a web developer, so this is probably a pretty stupid question to ask, but i'm trying to figure out how to run an installation package i'm writing in a VS setup project. as far as i've been able to tell, the VS setup template is only responsible for copying my installation EXE to the users's computer and do other misc things like add registry keys, but i need to have my installation EXE actually run during the set up process....
1
3775
by: bogdan.taru | last post by:
Hello, I have had a lot of problems installing a DB2 v8.1 Personal Edition on a RHEL4. Solved most of them by using a JDK-1.4.1 instead of the default 1.3.1, which comes with DB2. But I still have two problems, and I think they have something in common: 1) an instance was created during the installation. I am trying to add a new instance by using: "/opt/IBM/db2/V8.1/instance/db2icrt -d -a server -s ese -u db2fenc1 db2inst2", and this...
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9925
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.