This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to cancel setup using InstallScript?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 07, 2009
04:41 PM
How to cancel setup using InstallScript?
Hello,
My InstallScript has an check included to check for an installation. If it doesn't exist, it must cancel the setup. How do I do this?
Kind regards,
Flitskikker
My InstallScript has an check included to check for an installation. If it doesn't exist, it must cancel the setup. How do I do this?
Kind regards,
Flitskikker
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 07, 2009
05:24 PM
For a pure InstallScript project, the abort keyword should do it. For InstallScript in a custom action, returning ERROR_INSTALL_FAILURE from the action is a way to do it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 07, 2009
11:39 PM
You can use abort to terminate the setup. It will redirect to the Finish Dialog box.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2009
05:10 AM
Thank you! I tried a lot of words (end, stop, quit, break; but I didn't think about abort 😛 ).
Now I have one other question, how to use my ID strings for messages?
This doesn't work. Putting { } around it neather.
Again thanks in advance!
Kind regards,
Flitskikker
Now I have one other question, how to use my ID strings for messages?
MessageBox (ID_STRING_FILENOTFOUND, SEVERE);
This doesn't work. Putting { } around it neather.
Again thanks in advance!
Kind regards,
Flitskikker
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2009
05:19 AM
Put the @ before ID String variable.
e.g. : MessageBox (@ID_STRING_FILENOTFOUND, SEVERE);
e.g. : MessageBox (@ID_STRING_FILENOTFOUND, SEVERE);
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2009
02:14 PM
Thank you very much, again! 😄
One last question... :rolleyes:
During my setup, two AskDestPath dialogs are displayed. One for TARGETDIR, the other for my string sBackupDir.
I want to run a backup progress during the installation, so I chose BackupMyFiles at OnInstalling for the DefaultFeature.
Here am I stuck. How do I get my sBackupDir value in this function? Just placing it as ' sBackupDir ^ "Settings.ini" ' doesn't work. :confused:
Thanks in advance!
Kind regards,
Flitskikker
One last question... :rolleyes:
During my setup, two AskDestPath dialogs are displayed. One for TARGETDIR, the other for my string sBackupDir.
I want to run a backup progress during the installation, so I chose BackupMyFiles at OnInstalling for the DefaultFeature.
export prototype BackupMyFiles();
function BackupMyFiles()
NUMBER nResult;
begin
nResult = CopyFile (TARGETDIR ^ "Settings.ini", ?????);
end;
Here am I stuck. How do I get my sBackupDir value in this function? Just placing it as ' sBackupDir ^ "Settings.ini" ' doesn't work. :confused:
Thanks in advance!
Kind regards,
Flitskikker
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 10, 2009
04:50 AM
Aren't you aware of the concepts of local & globel variables, scopes, etc. etc.?!
2 ways to solve this:
1. Pass sBackupDir as a function parameter to BackUpMyFiles(), be sure that the variable in available in the calling function.
2. make sBackupDir global, the you can use it the way you mentioned (Just placing...)
More people may answer, when you start a new thread for a new question.
Greetings,
Johannes
2 ways to solve this:
1. Pass sBackupDir as a function parameter to BackUpMyFiles(), be sure that the variable in available in the calling function.
2. make sBackupDir global, the you can use it the way you mentioned (Just placing...)
More people may answer, when you start a new thread for a new question.
Greetings,
Johannes
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)