cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 
kamsani1002
Level 4

How to pass a return status to the installer.

Jump to solution

Hi Team,

I have a requirement to execute setup.exe conditionally. Before running setup.exe, I'd like to run a script which validates presence of the hardware. If expected hardware is present in system, script returns success otherwise it will returns failure.

The setup.exe suppose to run for successful return status from application and it should stop for failure status.

Please let me know how to achieve this.

Best Regards,

Raj

0 Kudos
(1) Solution

Dear Raj,

Thank you for your reply.

Could you please clarify what you mean by script? What is the script written in? What type of script?

There's no built-in functionality for decrypting or decoding an INI file. But you could try using the InstallScript INI file functions for after the installer decrypts or decodes the INI file. However, you would need to implement the decryption and decoding functionality somehow, first.

Here is a link to the documentation about the InstallScript INI file functions:

https://docs.revenera.com/installshield26helplib/LangRef/LangrefInitialization_file_functions.htm#langref_functionsbycat_2562449762_1022498

Please give that a try. Does that work for you?

Please let us know if you have any questions or concerns. Thank you for your patience and cooperation.

Best Regards,
Ian

View solution in original post

0 Kudos
(3) Replies
Revenera_Ian
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi Raj (@kamsani1002 ),

You could try writing a Windows batch file that checks the hardware.

As far as the installer status, here is a link to documentation with the possible installer return codes:

https://docs.revenera.com/installshield26helplib/helplibrary/IHelpSetup_EXEErrors.htm 

If the installer returns successfully, the return code will be 0. I expect the environment variable %ERRORLEVEL% to be set to 0, specifically.

Please give these suggestions a try. Do they work for you?

Please let us know if you have any questions or concerns. Thank you for your patience and cooperation.

Best Regards,

Ian

0 Kudos

Dear Ian,

Thanks for the inputs. I'm clear on your inputs. I'm not asking about installer requirements.

Can't we achieve this without windows batch file? Can't we achieve this within the installer itself.

My requirements is, There  will be encrypted .ini file which has hardware ID. I have a script to decrypt and read the contents of that. 

I have 2 options,

#1 Integrate the script with Installer and then read return code from script and take a decision on installation(To proceed/ To stop).

#2 Installer itself decrypt and decode the .ini contents and validates contents and take a decision on installation.

Please do suggest the best way to achieve this. 

Best Regards,
Raj

0 Kudos

Dear Raj,

Thank you for your reply.

Could you please clarify what you mean by script? What is the script written in? What type of script?

There's no built-in functionality for decrypting or decoding an INI file. But you could try using the InstallScript INI file functions for after the installer decrypts or decodes the INI file. However, you would need to implement the decryption and decoding functionality somehow, first.

Here is a link to the documentation about the InstallScript INI file functions:

https://docs.revenera.com/installshield26helplib/LangRef/LangrefInitialization_file_functions.htm#langref_functionsbycat_2562449762_1022498

Please give that a try. Does that work for you?

Please let us know if you have any questions or concerns. Thank you for your patience and cooperation.

Best Regards,
Ian

0 Kudos