Page 1 of 1

Run Program ignored

Posted: Tue Jan 23, 2007 7:14 pm
by arafangion
I'm still learning InstallAware, and I realise that certain commands only work in certain places, never-the-less, I need to do a "Run Program" during the setupsql2005 script.

Just before the final 'end' of that script, I insert the commands:

Set Variable PROG_PATH to
Define File Bag : C:\\Prog.exe, get runtime location of files into variable PROG_PATH
Run Program $PROG_PATH$\\Prog.exe (WAIT)

However, when single-stepping in the IDE, Prog.exe, which should display a dialog of its own, appears to be completely ignored! I see the lines get highlighted in turn as I hit the "Step through code" button - but NOTHING happens!

I need to run the Prog.exe if and only if the sql server instance needed to be installed.

I want:
1) To know why the lines were completely and silently ignored, despite all appearances of stepping over them correctly.
2) To know how to make it work.
3) To know of any better solutions to this problem.

Thankyou.

Posted: Tue Jan 23, 2007 8:42 pm
by CandiceJones
Plug-ins are loaded differently when debugging, than at actual runtime execution. If you run the setup without debugging, you will see that this item works.

Posted: Tue Jan 23, 2007 9:11 pm
by arafangion
Hmm, indeed that is the case, but other commands still appear to be ignored.

Eg:
(Where the Foo.ini file doesn't exist, and I use TMP because I haven't yet determined a suitable variable to use)

Edit INI File C:\\TMP\\Foo.ini, [Settings] Server=Example.com

How do I debug InstallAware scripts when there is so much stuff ignored?

Posted: Tue Jan 23, 2007 9:16 pm
by arafangion
Oh, and by that ini file example, in my case:

C:\\TMP exists
And, after execution, either as a debug execution or, as per your suggestion, running it without debugging, C:\\TMP\\Foo.ini does not exist.

Posted: Tue Jan 23, 2007 11:01 pm
by CandiceJones
Edit INI File is not a plug-in. It will be applied when Apply Install is called. It is not ignored. Click the link titled "Drag-Drop or Type MSIcode" on top of the MSIcode command palette for more information. Read the MSIcode whitepaper for full details on why this is so and how it helps you.

Posted: Tue Jan 23, 2007 11:50 pm
by arafangion
Ok, that's why it wasn't working :)

Sorry if I'm being a bit slow - learning alot here (Used to Debian Linux development)

Thankyou for the quick responses.