sfumar
Posts: 2
Joined: Wed Dec 07, 2005 10:01 pm

NewBie Questions

I'm new with building MSI and have couple of questions:

1.) Is there a way that I can replace an existing .exe file seating on the root of C:\ We are planning to re-use the shortcuts that are seating on the C: drive. So, we'd like to replace the target .exe(of the shortcuts so it will work for our new software).

2.) Can I automatically ran a .bat file thru the MSI? If so, how?


Thanks,
Sheila
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi Sheila,

1. Please see the following thread for details on replacing files:
http://www.advancedinstaller.com/forums ... .php?t=826

2. To execute a BAT file, follow the steps below:
a. Include the BAT file in your project using the Files and
Folders page of Advanced Installer.
b. Switch to the Custom Actions page and select a Standard Action
after which the BAT file will be executed. Because the file is included
with the application it has to be installed before it is executed.
Therefore you must select a Standard Action after the
InstallFiles stage. One such action is Commit. If you need to
select another stage of the installation process, use the Show Standard
Action toolbar button.
c. Right click on the Commit item (or the one you require) and
select Add Predefined Custom Action -> Launch File or Open URL.
d. In the Command Line field, type:

Code: Select all

[#your_file_name.bat]
e. Alternatively, you could use the Edit button at the right to
select the BAT file you have included in step 2.a above.
f. Make sure that the Execution Option is set to "Deferred" or "Commit".
g. If necessary, set the Execution Condition to something appropriate.

Hope this helps.

Regards,
Denis
Last edited by Ionut on Mon Feb 13, 2006 2:19 pm, edited 1 time in total.
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
sfumar
Posts: 2
Joined: Wed Dec 07, 2005 10:01 pm

Hi Denis,

Thank you for all the info. :) I will try and see how it works.


Sheila

Return to “Common Problems”