This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Tried something else . . .
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2009
04:32 AM
MAINTENANCE is 1, even on first install!
I've been trying to get an installscript working, that copies three files to another application and deletes them again, when uninstalling by doing this:
if MAINTENANCE then
delete files
endif;
The copying works fine, but it deletes them immedeately after, because MAINTENANCE is set to 1 - how can this be?
I tried uninstalling and then installing, as well as installing on a virgin VPC to no avail . . .
Anyone got an idea?
Edit:
I found that when uninstalling, MAINTENANCE is set to 0 - isn't it supposed to be the other way around?
if MAINTENANCE then
delete files
endif;
The copying works fine, but it deletes them immedeately after, because MAINTENANCE is set to 1 - how can this be?
I tried uninstalling and then installing, as well as installing on a virgin VPC to no avail . . .
Anyone got an idea?
Edit:
I found that when uninstalling, MAINTENANCE is set to 0 - isn't it supposed to be the other way around?
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2009
01:01 PM
Is this an InstallScript project, or an MSI project with InstallScript actions?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2009
08:12 PM
This is an MSI Project with Installscript Actions . . .
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2009
10:14 PM
To detect maintenance mode in a Basic MSI project, you might consider using the same condition as MaintenanceWelcome on your custom action, instead of the MAINTENANCE variable in your script...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2009
10:39 PM
So I basically make a function (DeleteDLLs) and instead of checking for MAINTENANCE, I simply put it in a Custom Action that runs after MaintenanceWelcome, which should only exist in an uninstallation - I'll try that straight away 🙂
That didn't work - it runs the deletion of files in both the installation and the uninstallation, albeit before the copying of the files. However, since it also runs the copying in both the installation and uninstallation, in the uninstallation it then first delets them and then copies them back - what the . . .
Although if I uninstall by double clicking the MSI package (as opposed to going through control panel -> programs and features) and choosing remove, it only deletes them, without copying them back . . .
However, there should be some kind of condition that would allow me to do this properly...
That didn't work - it runs the deletion of files in both the installation and the uninstallation, albeit before the copying of the files. However, since it also runs the copying in both the installation and uninstallation, in the uninstallation it then first delets them and then copies them back - what the . . .
Although if I uninstall by double clicking the MSI package (as opposed to going through control panel -> programs and features) and choosing remove, it only deletes them, without copying them back . . .
However, there should be some kind of condition that would allow me to do this properly...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2009
10:59 PM
Since the installation folder of the 3 files I need to copy (and then delete on uninstallation) is inside another application:
[MSCRM installation path]/CRMWeb/bin
I made a script that reads this path from the registry and puts it in a global CRMINSTALLDIR, however, I don't know how to put this global (path) as a directory in the Files and Folders view - figured if I could create a predefined folder named [CRMINSTALLDIR] and then simply create the /CRMWeb/bin structure underneath, but haven't figured out how to do this just yet . . .
[MSCRM installation path]/CRMWeb/bin
I made a script that reads this path from the registry and puts it in a global CRMINSTALLDIR, however, I don't know how to put this global (path) as a directory in the Files and Folders view - figured if I could create a predefined folder named [CRMINSTALLDIR] and then simply create the /CRMWeb/bin structure underneath, but haven't figured out how to do this just yet . . .