Jump to content


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.
Photo

InstallShield Script with SdShowMsg or MessageBox


4 replies to this topic

Gig52

Gig52
  • Members
  • 6 posts

Posted 11 November 2003 - 21:23

I create a custom action to call the function SetupCopyOEMInfA at the end of my setup. The code below is the InstallShield script that is called by the custom action. I tried different approach for the custom action (Immediate, Deferred) and set it in different places in the sequence. But I never saw any messages displayed, either with MessageBox or SdShowMsg.

Is there any reason why the MessageBox or SdShowMsg would not work either in User Interface sequence or Execute Sequence?

I tried different approach, deferred execution, Immediate execution at different location in the sequence without any success? (No messages were ever shown). The log file always showed that the action was executed with success.

What, Where and How would be the best method to perform an action once the files are copied on the target machine and you need access to variable like TARGETDIR?

Is there a better method for debugging a custom action than displaying message box in a Basic MSI project?

CODE

function InstallDriver_CS12XX()
STRING svPath;
STRING SourceInfFileName;
begin            

svPath = TARGETDIR;
StrRemoveLastSlash(svPath);
SourceInfFileName = svPath ^ "\\Driver\\" ^ "Cs12xx.inf";
SdShowMsg (SourceInfFileName, TRUE);
 
UseDLL("Setupapi.dll");
SetupCopyOEMInfA(&SourceInfFileName, NULL, 1, NULL, NULL, 0, NULL, NULL);
UnUseDLL("Setupapi.dll");

end;


charlies

charlies
  • Members
  • 2 posts

Posted 31 December 2003 - 01:59

I'm experiencing the same behavior in a W2K/InstallShield 8.0 environment. I've tried various options and sequencing without success.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 31 December 2003 - 03:11

Hi guys, I experience this problem in a different context. I was trying to dim a button in the SetupCompleteSuccess dialog box. After testing a lot of different options I concluded that the Installscript engine must be shut down before you get to the InstallCompleteSuccess dialog. I suspect you are experiencing the same problem. Try to use a VBScript custom action or a custom action that calls a DLL instead of using Installscript.
Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 31 December 2003 - 03:13

One more thing: I also tried to add the custom action at the end of the user interface sequence instead of at the end of the execute sequence. This made no difference, the Installscript engine seemed to be inaccessible anyway.
Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 31 December 2003 - 09:20

That's true: the InstallScrit engine get's shut down near the end of the execute sequence, and therefore is not running in the UI sequence after the execute action. You can however re-start the engine. I believe there's a KB article that describes this.