View Full Version : sdFinish called implicitly

08-01-2005, 05:38 PM
I created an install package and in the OnEnd function I explicitly call the sdFinishReboot using the following command.

SdFinishReboot ( "", "", SYS_BOOTMACHINE, "", 0 );

For some reason the sdFinish Dialog is being called right before it but I cannot find a reference to the sdFinish dialog anywhere in the script.

Does anyone know why sdFinish is being implicitly called or how I can shut it off?


08-02-2005, 11:11 AM
Have you looked in the other events? Until you replace them they use default code. I'd start looking with OnFirstUIAfter.

08-02-2005, 12:10 PM
sdFinish is not in the script anywhere.


08-03-2005, 09:05 AM
Have you ran it through a debug session?

I had deleted a .rul once, with it's corresponding functions, and added a new one which was similar. IS11 has a wicked bug in this regard.

I had a LAAW calling an MSI file that wasn't launching. Code looked perfect. When I ran it through a debug, I saw it executing code that wasn't even IN the script, from the old .rul.

This isn't your problem, but I'm just letting on that the debugger shows what's really going down behind the scenes.

08-03-2005, 10:08 AM
The sdFinish dialog pops up right after the 'return 0' from the OnUIFirstBefore. There is no explicit call to it in the debugger.

Then of course, my sdFinishReboot pops up after the sdFinish dialog because I have sdFinishReboot in my OnEnd script.


08-04-2005, 08:00 AM
Do you have all the major events revealed in your setup.rul file? I know that by default these are not revealed when creating a new setup script and are only shown if I select them from the events drop down-lists above the script panel in the InstallShield IDE.

Make sure you have all these events revealed. They get executed with default settings if you do not have them revealed in your script which would explain the finish dialog coming up.

Based on what I have read so far, it sounds as if you just have OnFirstUIBefore and OnEnd revealed in your setup.rul file.

08-04-2005, 08:21 AM
You're right, there is a bunch of unrevealed code in there. I found the sdFinish in AfterMoveDate>>OnFirstUIAfter.

Would you recommend I comment that out and leave my sdFinishReboot in OnEnd or should I replace the sdFinish with my sdFinishReboot?


08-04-2005, 08:28 AM
The technically correct method is to call the dialog in OnFirstUIAfter. However, I have exposed this dialog in OnEnd on one occasion as well.

So, I would remove it from OnEnd - unless there is a specific reason for having it there, and put it where other IS developers would expect to find it (in case someone inherits you code years from now) :)

If you choose to keep the dialog in OnEnd event then comment the process really well in OnFirstUIAfter and the reason why you placed the dialog in the OnEnd event. In my case we put it in the OnEnd event because we were calling a seperate setup after this one - by placing the dialog inside the OnEnd event we were minimizing the delay time between starting the setup and prompting for the next CD - particularly on slower systems.

If you keep the dialog in the OnEnd event, remember that you may have to distinguish between MAINTENANCE and !MAINTENANCE mode - I am sure you would want to present a different dialog to the end user when they try to uninstall the program.

08-04-2005, 08:44 AM
Little weirdness now. As I was walking through the dropdown to find the sdFinish I revealed I revealed Initization>>OnSetTargetDir. Now if I do a compile (I have not changed any code yet) I get an error 'no definition found for function SQLRTGetLastError'.

Not sure why this is happening as I have not changed any code.


08-04-2005, 08:48 AM
I meant the OnSQLServerInitialize function. =-)

08-04-2005, 11:08 AM
Worst case if you haven't edited the function since you inserted it with the dropdown, it's safe to completely delete that function from your setup.rul. It will then fall back to the default implementation.