Variation of the MSI Wrapper example - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

debian69
Posts: 9
Joined: Mon May 02, 2011 3:57 pm

Variation of the MSI Wrapper example

Hi everybody,
I have to create a variation of the MSI Wrapper example included in your help files.
The MSI I have to install consists of two files: 'setup.msi' and 'setup1.cab'. I don't want to use the Temporary Files directory to store these files, because they are really huge and the partitions of the computers of our customers are sometimes to small to hold them. So I created a folder based on a property for them called 'Temp'Inst'. A vbscript should do the following job:

1st: install the software (like the wrapper function does)
2nd: delete the installation files

How can I achieve this goal? I tried to extend the wrapper function and changed the line
'Wsh.Run x86,1,false' into
'Wsh.Run x86,1,true'
and dropped some lines for deleting the directory in. Doing this, the MSI Installer complains, that a second instance is running. The wrapper does not finish quick enough before the second installer is starting.

Any suggestions?
I am using AI 8.1.3.

Thanks for your help,
Thorsten Baumeister
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Variation of the MSI Wrapper example

Hi Thorsten,

If the setup files are placed next to your MSI wrapper, you can use the SOURCEDIR property. It's automatically set to the MSI folder path.

Regarding the custom action, since you don't need temporary files, you can move it after InstallExecuteSequence -> InstallFinalize action. If the error is still shown, you can try one of the following approaches:
1. Add a sleep mechanism which uses a small delay before launching the package:
http://www.advancedinstaller.com/forums ... f=2&t=4849

or

2. Write a DLL custom action which uses a delay, launches the MSI and performs the cleanup.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”