jvbeardsley
Posts: 1
Joined: Tue Aug 28, 2007 9:45 pm

Newb - question about source files

Hello all. This may be more of a general MSI question than a Advanced Installer question but I'll give it a shot. I have some source files and a vbs script that uses the source files to uninstall the old version of the software and then install the new version. I had it configured before to call on some source files that are on a network drive but then I'm relying on the user to have the network drive mapped so I'm wanting to package all of the source files up with the script into one neat little MSI. I'm new to this AI program, which looks great so far, but I'm having trouble understanding how to package this up.

Here's the deal. I have two source folders with some .msi files in them that are used to uninstall the old versions (if exist). Then the script moves on to install the new version but I'm confused about how I enter the path to the source files in my script. When you run the .msi, does it "unzip" everything into a temp folder and then delete the temp folder when its complete? Would I then point my script to the .msi files in the temp folder? If so, what is the path to the temp folder?

This may help a bit. The file structure looks like this:

[IDEA] (this folder containts the .vbs script)
-- [IDEA70]
---- IDEA70.msi
-- [IDEA71]
---- IDEA71.msi
-- [IDEA72]
---- IDEA72.msi

So should my script look like this?

msiexec /x \IDEA\IDEA70\IDEA70.msi
msiexec /x \IDEA\IDEA71\IDEA71.msi
msiexec /i \IDEA\IDEA72\IDEA72.msi

Or is there some way to reference the temporary folder that it "unzips" everything into? (ie: msiexec /x %temp%\IDEA\IDEA70\IDEA70.msi)

Obviously, theres a more to the script than that but like I said, I'm just having trouble with the source paths. Any help is appreciated.

THANKS!
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

The approach you are using does not conform with the Windows Installer guidelines. If you want the package that you create in AI to remove any previous versions (if they exist on the user's machine), use the Upgrades page (click the "New" button and select the MSI packages).

If the option "Find and remove products" is selected in the "Upgrade Action" tab of the "New Upgrade" dialog, the package will be automatically removed by WI when the "RemoveExistingProducts" Standard Action runs.

http://www.advancedinstaller.com/user-g ... rades.html

===

Note also that the original MSI package is not required in order to uninstall an application, because a command line such as the following can be used:

Code: Select all

msiexec /X ProductCode
where "ProductCode" is the ProductCode GUID and it can be found in the Property table inside the MSI database (you can use Orca to open the package).

If you need more details about using the Upgrades page, please let me know.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”