PDA

View Full Version : Make users click my visual basic setup.exe



mcf184
11-10-2003, 04:52 PM
I find it pretty cool how, with a standard project, clicking directly on the .msi file displays a message saying that the installation cannot be launched by clicking the msi file, you must click setup.exe.

I would like to do this with my InstallShield setup.exe. I actually have another setup.exe bootstrapper, created with visual basic, that is set to run as an autoplay and displays an installation menu (this is kind of like my own DemoShield, I guess you could say).

But recently, I have migrated some code from Installscript to my vb project, so I would like to make it so users have to run my vb setup.exe, which will perform some tasks, then call the InstallShield setup.exe.

I know this must be possible, but I'm not sure how to implement this the best way. Does anyone know what InstallShield might have done to incorporate this functionality? Or, if not, does anyone have any ideas of foolproof ways to implement this? And should I add this functionality/code to the vb or InstallShield project?

Thanks!!

luke_s
11-11-2003, 01:20 AM
It is not possible to change the install shield exe to have this logic. To do this you would have to rebuld the complete setup.exe provided by install shield with your changed code in and since install shield do not provide this code, you cannot achieve this.

The only way to possibly achieve this would be to change your msi and make it detect what process kicked the install of.

mcf184
11-11-2003, 09:19 AM
Thanks for the reply, although I wasn't meaning to change any of InstallShield's code. I was wanting to write some InstallScript, or vb code of my own to mimic their same functionality.

Your recommendation of determining what process kicked the install off is what I'm looking for, I just don't know how to implement this. Where, and what do I look for (in code) to determine what process kicked off my application?

Can anyone help? Thanks.

TsungH
11-11-2003, 07:27 PM
Are you using InstallScript MSI or Basic MSI project?

mcf184
11-12-2003, 09:37 AM
InstallScript MSI (Standard Project)
InstallShield Developer 7.0.4

InstallScript would be the first option, but I'm thinking of eventually converting to Basic MSI, so both methods would be nice to know, if you have any ideas.

Thanks.

luke_s
11-12-2003, 05:10 PM
Im not too sure on how to achieve this using Install Script, but maybe TsungH has an idea?

Using a basic msi, you could probably code up a c/c++ action that will find this out.

TsungH
11-12-2003, 05:40 PM
You will have to write your custom action to check for your VB bootstrarpper, and schedule it as the first action in sequence. InstallScript engine may not be on all machines, hence InstallScript custom action will not be a perfect choice.

An easier way is to set up a launch condition to check for a property, and have your VB bootstrapper supply that property to setup.exe at launch.

There is no foolproof way, people can always edit MSI and remove your custom action. Some may want to have the ability to deploy your app in silent mode, unattended.

mcf184
11-12-2003, 06:09 PM
The launch condition sounds like a good idea... I'll see if I can get my vb bootstrapper to supply setup.exe with a property.

Thanks again to everyone.