Happy Monday morning everyone,
I am using a copy is IS Windows Installer Edition 2.3. (IS 11 is on order.)
This is a basic MSI installation.
When, for any reason, my MSI installation program is cancelled or otherwise fails to go to, a successful completion, I want to write an error file(containing some kind of failure message) on to the hard drive.
So, I wrote a little InstallScript function to "do the task"
Then based on my limited understanding(I'm still very much a newbe at this) of "rollback" custom actions, I .......
Created a custom action named "WriteErrorFile" that calls an InstallScript "script" of the same name, that writes the error file as described above. (The InstallScript code works. I've tested it.)
Created a "Rollback" custom action named "WriteErrorFile"
Inserted the "Rollback" custom action into the Execute sequence right before the "InstallFinalize" standard action.
In order to "test" the above, my plan was to start the MSI installation and then click on the cancel button during various parts of the installation process, hopping to be rewarded, by seeing my "error file" on the hard drive.
Using the above coding approach and testing technique, I haven't had much luck.
My "error file" fails to materialize on the hard drive.
Any ideas as to ................
What I might be doing incorrectly ?
How I might accomplish my goal of generating an error file if the installation is cancelled or otherwise fails to install successfully ?
Thanks in advance for any and all suggestions.
Ray in Wisconsin
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.
Rollback custom action advice needed
Started by
RayKode
, Aug 01 2005 16:28
2 replies to this topic
Posted 01 August 2005 - 20:24
Some hints:
1) Execute with logging, check the log file whether your CA was called or not.
2) Place the CA immediatly after InstallInitialize, not just before InstallFinalize. When rollback starts, only the rollback CAs passed so far will be executed.
But I doubt that you can use InstallScript for Rollback: a rollback CA has no access to the installer database. I don't know how InstallScript is implemented, but I assume that the InstallScript Engine tries to load the script from a custom table. Implementations like that cannot be used for rollbacks.
I guess you should try, if it doesn't work you can still use VBScript or DLL code.
1) Execute with logging, check the log file whether your CA was called or not.
2) Place the CA immediatly after InstallInitialize, not just before InstallFinalize. When rollback starts, only the rollback CAs passed so far will be executed.
But I doubt that you can use InstallScript for Rollback: a rollback CA has no access to the installer database. I don't know how InstallScript is implemented, but I assume that the InstallScript Engine tries to load the script from a custom table. Implementations like that cannot be used for rollbacks.
I guess you should try, if it doesn't work you can still use VBScript or DLL code.