Execute MSICode between dialogs

Got a problem you cannot solve? Try here.
Post Reply
ctusch
Posts: 3
Joined: Thu Aug 05, 2010 2:55 am

Execute MSICode between dialogs

Post by ctusch »

Hello,

after the user has entered the install path I want to check if a specific file exists within that path and if not terminate the installation. My problem is that it seems like the MSICode within the dialog loop doesn't execute. Here is the snippet:

Code: Select all

  Display Dialog: destination, wait for dialog to return (modal)
  Does File Exist $TARGETDIR$\bin\Gops20.exe (get result into variable GOPS20EXEEXISTS)
  MessageBox: , $GOPS20EXEEXISTS$
  if Variable GOPS20EXEEXISTS not Equals TRUE
    MessageBox: Fehler, Um das Setup auszuführen, muss zuerst GOPS2 installiert werden.
    Terminate Installation
  end
  Comment: Display Dialog: startmenu, wait for dialog to return (modal)
  [compiler end]
  Display Dialog: startinstallation, wait for dialog to return (modal)
Not even the message box that should output the value of the variable shows up. How can I achieve my goal?
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: Execute MSICode between dialogs

Post by alibaba »

Firstly I would use Camelot Plugin (writelog function) to see where the script stops and what values the variables have.

Gruß
ctusch
Posts: 3
Joined: Thu Aug 05, 2010 2:55 am

Re: Execute MSICode between dialogs

Post by ctusch »

All dialogs appear as they should but the code in between the 'Display Dialog' commands doesn't seem to execute.

EDIT: I think I've found the cause of the problem. From the help: The wizard loop may only contain Display Dialog commands inside it and must be closed with an End command.

So how can I execute something after the user has specified a target directory?

EDIT2: I stumbled upon this post http://www.installaware.com/forum/viewt ... p?=&p=3182 and adjusted my project to use the more verbose version of the dialog logic. It works now.
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Execute MSICode between dialogs

Post by mills »

Great! I'm glad you were able to resolve this.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Post Reply