PDA

View Full Version : Exit script doesn't



NewsArchive
03-21-2017, 03:17 AM
Hi Friedrich,

In a very simple script that checks for file existence and if they
exists, creates appropriate shortcut, I have this at the top of my script:

Set Variable %BROKER_OFFICE_PATH% to "C:\BrokerOffice"
If %BROKER_OFFICE_PATH%\DBSERV11.EXE "File or Folder doesn't exist" Then
Display Message Box ("The DBSERV11.EXE file could not be found in
the C:\BrokerOffice folder.", "Required file does not exist")
Exit Installation ("99") [Cancel Wizard]
End
If %BROKER_OFFICE_PATH%\BROKERPARAMETERS.PM "File or Folder doesn't
exist" Then
Display Message Box ("The BrokerParameters.pm file could not be
found in the C:\BrokerOffice fold...", "Required file does not exist")
Exit Installation ("99") [Cancel Wizard]
End

When I run the installer exe with both files missing, I get both errors
and then it continues. If the first one exists but not the second, it
shows just the one message and then continues. It's like the "Exit
Installation" is not working at all!

I have used it before in other installs and it worked fine. This is SB
build 10.0.5452 downloaded and installed this morning.

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
03-21-2017, 03:18 AM
Hi Friedrich,

> Set Variable %BROKER_OFFICE_PATH% to "C:\BrokerOffice"
> If %BROKER_OFFICE_PATH%\DBSERV11.EXE "File or Folder doesn't exist" Then
> Display Message Box ("The DBSERV11.EXE file could not be found in the
> C:\BrokerOffice folder.", "Required file does not exist")
> Exit Installation ("99") [Cancel Wizard]
> End
> If %BROKER_OFFICE_PATH%\BROKERPARAMETERS.PM "File or Folder doesn't
> exist" Then
> Display Message Box ("The BrokerParameters.pm file could not be found
> in the C:\BrokerOffice fold...", "Required file does not exist")
> Exit Installation ("99") [Cancel Wizard]
> End

This is what happens when I run the script, with both files missing:

https://www.screencast.com/t/nTtJHQQvM3Q

This stuff is at the top of a wizard created script:

https://www.screencast.com/t/gW4D33QcH7V

Nothing fancy, it just checks if those files exist and if they do it
creates couple of shortcuts.

Am I missing something?

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
03-21-2017, 03:18 AM
Hi Friedrich,

>> Exit Installation ("99") [Cancel Wizard]

Found it! It was the [Cancel Wizard] - if I uncheck it, the exit
happens instantly. I must have checked it, but shouldn't it work
regardless if the Exit is outside of the wizard loop?

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
03-21-2017, 03:20 AM
Hi Arnor,

> Found it! It was the [Cancel Wizard] - if I uncheck it, the exit
> happens instantly. I must have checked it, but shouldn't it work
> regardless if the Exit is outside of the wizard loop?

The "Cancel Wizard" checkbox option is there to "cancel" the Loop Wizard.
This option posts an IDCANCEL event to the dialog. It is ignored outside
the Loop Wizard.

http://www.lindersoft.com/forums/showthread.php?28639-How-to-set-a-cancel-situation&p=51854#post51854

By the way, IMO this option is broken (don't know why and when, but think in
late 7.x). I'll check this.

But "Cancel Wizard" will never work outside the "Loop Wizard".

Friedrich

NewsArchive
03-21-2017, 03:20 AM
Hi Friedrich,

> The "Cancel Wizard" checkbox option is there to "cancel" the Loop Wizard.
> This option posts an IDCANCEL event to the dialog. It is ignored outside
> the Loop Wizard.
>
> http://www.lindersoft.com/forums/showthread.php?28639-How-to-set-a-cancel-situation&p=51854#post51854
>
> By the way, IMO this option is broken (don't know why and when, but think in
> late 7.x). I'll check this.
>
> But "Cancel Wizard" will never work outside the "Loop Wizard".

Understood, but should it not still terminate the script, even if the
"Cancel Wizard" is accidentally checked? To me it sounds like it should
just be ignored if you are not inside the loop.

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
03-21-2017, 06:25 AM
Hi Arnor,

> But "Cancel Wizard" will never work outside the "Loop Wizard".
>
> Understood, but should it not still terminate the script, even if the
> "Cancel Wizard" is accidentally checked? To me it sounds like it should
> just be ignored if you are not inside the loop.

No, in this case it should not terminate the script if it is not inside a
"Loop Wizard".

The "Exit Installation..." script function with the "Cancel Wizard" option
*UN*checked terminates the script processing immediately. But the "Exit
Installation..." script function with "Cancel Wizard" checked does not
really terminate the script. Instead, it posts (sends) an event to the
dialog to "simulate" a clicked 'Cancel' button (IDCANCEL message). This
event cancels the installation and (optionally) displays the "final" wizard
dialog(s) (e.g. "install has been canceled yada"). [note: this seems to be
broken].

Friedrich

NewsArchive
03-21-2017, 06:25 AM
I'll post an example to demonstrate the difference between 'Exit
Installation ("1234")' and 'Exit Installation ("1234") [Cancel Wizard]' when
I have fixed it in SB.

Friedrich

NewsArchive
03-22-2017, 03:20 AM
Hi Friedrich,

> No, in this case it should not terminate the script if it is not inside a
> "Loop Wizard".
>
> The "Exit Installation..." script function with the "Cancel Wizard" option
> *UN*checked terminates the script processing immediately. But the "Exit
> Installation..." script function with "Cancel Wizard" checked does not
> really terminate the script. Instead, it posts (sends) an event to the

Understood. Could the compiler throw a warning IF it encounters a
"Exit" WITH the "Cancel Wizard" checked OUTSIDE of a LOOP?

I must have checked this accidentally and it completely failed to do
what I expected it to do. It would be nice if the compiler could help out:)

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
03-22-2017, 03:21 AM
"WARNING: If you do this again, you'll lose one month of subscription
time"<g>

>Understood. Could the compiler throw a warning IF it encounters a
>"Exit" WITH the "Cancel Wizard" checked OUTSIDE of a LOOP?

Jeff Slarve
www.jssoftware.com
Twitter free since Jan 11, 2016
I'll search help files & Google for you.

Grammar troll's, are the worse.

NewsArchive
03-22-2017, 12:53 PM
> "WARNING: If you do this again, you'll lose one month of subscription
> time"<g>

<G> ;-)

Friedrich

NewsArchive
03-22-2017, 12:54 PM
Hi Arnor,

> Understood. Could the compiler throw a warning IF it encounters a "Exit"
> WITH the "Cancel Wizard" checked OUTSIDE of a LOOP?
>
> I must have checked this accidentally and it completely failed to do what
> I expected it to do. It would be nice if the compiler could help
> out:)

I have changed it in the SB runtime. If no dialog is active (e.g. "Exit"
WITH the "Cancel Wizard" checked OUTSIDE of a LOOP) then it will terminate
immediately.

Friedrich

NewsArchive
03-23-2017, 09:27 AM
Friedrich,

> then it will terminate immediately.

The developer, the script or the user?!

Lee White

NewsArchive
03-24-2017, 02:46 AM
Hi Friedrich,

> I have changed it in the SB runtime. If no dialog is active (e.g. "Exit"
> WITH the "Cancel Wizard" checked OUTSIDE of a LOOP) then it will terminate
> immediately.

Excellent! :)

Best regards,


--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
03-27-2017, 04:13 AM
Hi Arnor,

> Instead, it posts (sends) an event to the dialog to "simulate" a
> clicked 'Cancel' button (IDCANCEL message). This event cancels
> the installation and (optionally) displays the "final" wizard
> dialog(s) (e.g. "install has been canceled yada"). [note: this
> seems to be broken].

It's fixed in the latest internal build now. This was a very low-level bug.
Thanks for opening this thread :-)

Friedrich

NewsArchive
03-29-2017, 11:19 PM
Hi Friedrich,

> It's fixed in the latest internal build now. This was a very low-level bug.
> Thanks for opening this thread :-)

Happy to help - I can find bugs in everybody's code except mine!<g>

Best regards,


--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
03-29-2017, 11:19 PM
>I can find bugs in everybody's code except mine!<g>

That is the truest statement I have seen by a programmer this year.
I know it applies to me too <g>.

JohnG

NewsArchive
03-29-2017, 11:20 PM
Definitely applies to you and Arnor. Not me.<g>

Jeff Slarve
www.jssoftware.com
Twitter free since Jan 11, 2016
I'll search help files & Google for you.

Grammar troll's, are the worse.

NewsArchive
03-29-2017, 11:20 PM
>Definitely applies to you and Arnor. Not me.<g>

Go to your corner and stay there for 30 minutes. Bad boy.

John Griffiths

NewsArchive
03-29-2017, 11:21 PM
That was a bug in my keyboard.

Jeff Slarve
www.jssoftware.com
Twitter free since Jan 11, 2016
I'll search help files & Google for you.

Grammar troll's, are the worse.

NewsArchive
03-30-2017, 03:42 AM
LOL

Andre Labuschagne