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
- :
- Re: determine if an options file is passed as an argument
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
‎Oct 25, 2006
04:44 AM
determine if an options file is passed as an argument
Hi,
I need to determine if an options file is passed as an argument to the installer or not. How do I achieve this.
Thanx,
Vikas
I need to determine if an options file is passed as an argument to the installer or not. How do I achieve this.
Thanx,
Vikas
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
10:30 AM
Can you be more specific as to why you need this info? May be easier to help you out! If I were to guess, is it because you are setting default values for Variables and when they use an options file, the values in the options file do not get used!
If you are defaulting values in the Events section OnBeginInstall those will always be used! You may want to remove all your default variable settings from the events and add them to the Property Manager and default the values there! Whatever values that are in the options file will be used and the variables they do not put in the options file will still be defaulted!
Hope this is what your looking for!
Regards,
Tom
If you are defaulting values in the Events section OnBeginInstall those will always be used! You may want to remove all your default variable settings from the events and add them to the Property Manager and default the values there! Whatever values that are in the options file will be used and the variables they do not put in the options file will still be defaulted!
Hope this is what your looking for!
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 26, 2006
02:09 AM
Thanks for the reply Tom. What you said is correct, I am setting default values for the variables and when I use the options file, the values in the options file dont get used.
This project is migrated from ISMP 5.03. We are not using the events etc. What I want to do is to write a custom bean which will detect if an options file was supplied or not and set a variable to indicate that. Then I will use a string comparison condition for the sequence where I am setting the default values.
I already have the code in place where I detect the silent mode and do the same thing, but the issue is that the user might use the options file without going into the silent mode and in that case, it fails.
Thanx,
Vikas
This project is migrated from ISMP 5.03. We are not using the events etc. What I want to do is to write a custom bean which will detect if an options file was supplied or not and set a variable to indicate that. Then I will use a string comparison condition for the sequence where I am setting the default values.
I already have the code in place where I detect the silent mode and do the same thing, but the issue is that the user might use the options file without going into the silent mode and in that case, it fails.
Thanx,
Vikas
enanrum wrote:
Can you be more specific as to why you need this info? May be easier to help you out! If I were to guess, is it because you are setting default values for Variables and when they use an options file, the values in the options file do not get used!
If you are defaulting values in the Events section OnBeginInstall those will always be used! You may want to remove all your default variable settings from the events and add them to the Property Manager and default the values there! Whatever values that are in the options file will be used and the variables they do not put in the options file will still be defaulted!
Hope this is what your looking for!
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 27, 2006
10:52 AM
Hmmm...I'm not aware of any way to know if the options file is passed, (I'm sure there is), but like I said before it maybe easier to just add all the variables and default them to what you want in the 'Additional Tools'->'Property Manager' (PM) and if they pass an options file - the vars in the options file is used first!
Also - if you do the way you want to - what happens if they only set 2 variables and you have 15? Using the PM those 2 will be updated and the other 13 will still have it's default values! Doing it your way you will have to check each var to make sure it has a valid value! (Just keep that in mind)
You can even use variables for the Value in the PM!
Name -> Value
VAR1 -> path
VAR2 -> $V(VAR1)/file ==> resolve to path/file
I just think this is easier than adding a Custom Action to set the vars!
Good luck in whatever you chose!
Regards,
Tom
Also - if you do the way you want to - what happens if they only set 2 variables and you have 15? Using the PM those 2 will be updated and the other 13 will still have it's default values! Doing it your way you will have to check each var to make sure it has a valid value! (Just keep that in mind)
You can even use variables for the Value in the PM!
Name -> Value
VAR1 -> path
VAR2 -> $V(VAR1)/file ==> resolve to path/file
I just think this is easier than adding a Custom Action to set the vars!
Good luck in whatever you chose!
Regards,
Tom