I have a function 'shareExists()' that returns 1 of a specific (hardcoded) network share exists, and 0 otherwise. I need to check this before installation can continue. If it returns false, I need to abort installation. I'm used to use InstallScript for setup.exe projects, but now I need to use MSI, and I can't figure it out.
What I think it should be is:
- add a new property to the installation that will hold the result of the dll function
- add an installscript function that calls the DLL function and returns it's value
- set this property from the installscript function : HOW??
- add a custom action that calls this function
- put this action in the sequence : WHERE ????
- abort if the property is false, after the previous custom action was called : HOW ???
Help is appreciated ! Thx in advance !
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Abort installation when DLL function returns 0
Started by
IceMan
, Jun 03 2003 15:41
3 replies to this topic
Posted 04 June 2003 - 08:37
Can installscript call an extrenal dll?
if yes then you should use that, if not then you will need to create a custom action.
Your custom action will call your dll function and check its return value, and then return either an error or set a property.
You can then place the custom action to run in the User Interface sequence and have it abort if the custom action fails.
How does that sound?
if yes then you should use that, if not then you will need to create a custom action.
Your custom action will call your dll function and check its return value, and then return either an error or set a property.
You can then place the custom action to run in the User Interface sequence and have it abort if the custom action fails.
How does that sound?
Posted 04 June 2003 - 09:14
Okay, thx. It confirms what I was thinking... Another issue related to this : how do I abort an installation (basic MSI project?)
Posted 10 June 2003 - 05:46
In what sense do you mean abort the installation? Can you provide some more information?
You can use
MsiProcessMessage, or you can go to the error dialog
You can use
MsiProcessMessage, or you can go to the error dialog