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
- :
- Download cached msi and rollback
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
‎Jun 24, 2008
01:08 PM
Download cached msi and rollback
I was using the code I found in this thread:
http://community.installshield.com/showthread.php?t=163237&highlight=cached+msi
However for some reason I can't get the rollback to delete the download cache folder. I can't retrieve it in my CA nor will it work with a global variable even if I retrieved the package code in the beginning. I placed the custom action after the MoveFiles event and after the RemoveIniValues event. The happy path works fine if the user installs it and uninstalls it. I would love to get this rollback to work as well. I'm not too worried about getting it to remove old cached installs.
Thanks!
http://community.installshield.com/showthread.php?t=163237&highlight=cached+msi
However for some reason I can't get the rollback to delete the download cache folder. I can't retrieve it in my CA nor will it work with a global variable even if I retrieved the package code in the beginning. I placed the custom action after the MoveFiles event and after the RemoveIniValues event. The happy path works fine if the user installs it and uninstalls it. I would love to get this rollback to work as well. I'm not too worried about getting it to remove old cached installs.
Thanks!
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 24, 2008
02:19 PM
Part of it may have to do with when your installer is rolling back - I assume you're canceling the install to test the rollback?
Placing the action after MoveFiles seems like a pretty late time. If your rollback occurs before that point, then the action would never be written into the script and does not execute. I think I put my rollback action as quick after InstallInitialize as I could.
If you have a log file, that might be helpful, too - I can't tell from your question if the action isn't being run, if the package code isn't being retrieved, or exactly what might be going on.
- it's a start. 🙂
Placing the action after MoveFiles seems like a pretty late time. If your rollback occurs before that point, then the action would never be written into the script and does not execute. I think I put my rollback action as quick after InstallInitialize as I could.
If you have a log file, that might be helpful, too - I can't tell from your question if the action isn't being run, if the package code isn't being retrieved, or exactly what might be going on.
- it's a start. 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 24, 2008
03:36 PM
Thanks for responding and thanks for posting the code in the 11.5 forum!
Yes I'm testing the install rollback. I've canceled the install during the OnFirstUIBefore and while it was moving files. Both times when the RemoveCurrentPackage_Rollback runs it doesn't have nor can it retrieve the package code. So the cached msi file still remains. The function is running but the value of the package code is missing. I could input it in the registry but I'm trying to avoid doing that.
Return Process: Ignores Exit code
In Script Execute: Rollback Execution
Install UI Sequence: absent
Install Exec Sequ: After CostFinalize
Install Exec cond: NOT Installed
Like I said the code was executing just fine but it didn't have the package code. I'll admit to not having the best success with custom actions.
Thanks for your help!!
Yes I'm testing the install rollback. I've canceled the install during the OnFirstUIBefore and while it was moving files. Both times when the RemoveCurrentPackage_Rollback runs it doesn't have nor can it retrieve the package code. So the cached msi file still remains. The function is running but the value of the package code is missing. I could input it in the registry but I'm trying to avoid doing that.
Return Process: Ignores Exit code
In Script Execute: Rollback Execution
Install UI Sequence: absent
Install Exec Sequ: After CostFinalize
Install Exec cond: NOT Installed
Like I said the code was executing just fine but it didn't have the package code. I'll admit to not having the best success with custom actions.
Thanks for your help!!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 24, 2008
03:46 PM
What kind of project did you say you were using? I'm guessing an InstallScript MSI since you said something about OnFirstUIBefore...
If it's pure InstallScript, I wouldn't expect these functions to work since they make such heavy use of MSI calls
In fact, that may be the problem even with an InstallScript MSI...I really have no idea what parts of which beast THAT chimera inherits... Yeah, I'd start researching other ways of fetching a package code and hope someone who knows something about installscript chimes in. 🙂
Best wishes!
If it's pure InstallScript, I wouldn't expect these functions to work since they make such heavy use of MSI calls
MsiGetProperty(hMSI, "ProductCode", sProductCode, nBuff);
//MessageBox("Product Code: " + sProductCode, INFORMATION);
nBuffer = MAX_PATH + 1;
MsiGetProductInfo(sProductCode, INSTALLPROPERTY_PACKAGECODE, svOldPkgCode, nBuffer);
In fact, that may be the problem even with an InstallScript MSI...I really have no idea what parts of which beast THAT chimera inherits... Yeah, I'd start researching other ways of fetching a package code and hope someone who knows something about installscript chimes in. 🙂
Best wishes!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 24, 2008
03:50 PM
Thanks again. Yes its Installscript-MSI.
I'll try and come up with something as well.
I'll try and come up with something as well.