Windows 7 Get all CLI parameters/switches from NSIS installer

Rishab7

New Member
Joined
Apr 17, 2023
Having NSIS installer e.g. Program.exe
Is there a way to get all CLI switches that current installer can process.
The purpose is to automate installation
I don't mean standard switches like /S switch for silent install
I tried to "unzip" Program.exe with 7zip - no useful info found about installer..
I tried to spy on it with Procmon - it's not launching anything on command line - so no luck either
I know for sure that this installer receives custom switches ( one of them is /op=n )
NSIS docs are more about how to create installer..

Thank You!
 
To find out the CLI switches that can be used with an NSIS installer, you can try the following approaches:

1. Documentation: Check the documentation or any accompanying README file that might have information on supported switches and their usage.

2. Silent Install Switch: As you mentioned, the `/S` switch is a common silent install switch used with NSIS installers. Sometimes, additional switches might be supported, such as `/VERYSILENT` or `/SUPPRESSMSGBOXES`. You can try running the installer with these switches to see if they are recognized and properly handled.

For example:
```
Program.exe /S
Program.exe /VERYSILENT
Program.exe /SUPPRESSMSGBOXES
```

3. Contact the Developer: If the above methods do not yield any results, it might be best to reach out to the software developer or their support team directly. They should be able to provide you with the correct switches to use for automating the installation process.

Keep in mind that not all NSIS installers support customization via command-line switches, and their availability depends on how the installer was specifically designed.
 
To find out the CLI switches that can be used with an NSIS installer, you can try the following approaches:

1. Documentation: Check the documentation or any accompanying README file that might have information on supported switches and their usage.

2. Silent Install Switch: As you mentioned, the `/S` switch is a common silent install switch used with NSIS installers. Sometimes, additional switches might be supported, such as `/VERYSILENT` or `/SUPPRESSMSGBOXES`. You can try running the installer with these switches to see if they are recognized and properly handled.

For example:
```
Program.exe /S
Program.exe /VERYSILENT
Program.exe /SUPPRESSMSGBOXES
```

3. Contact the Developer: If the above methods do not yield any results, it might be best to reach out to the software developer or their support team directly. They should be able to provide you with the correct switches to use for automating the installation process for Home Additions and Remodeling.

Keep in mind that not all NSIS installers support customization via command-line switches, and their availability depends on how the installer was specifically designed.
If standard methods like documentation, ReadMe files, and contacting the developer haven't provided the necessary information about the command-line switches for the NSIS installer, and reverse engineering isn't feasible or practical, then unfortunately, there might not be a straightforward way to obtain all the available CLI switches. In such cases, trial and error might be your best option. You can try experimenting with different command-line switches to see if they have any effect on the installer's behavior. However, be cautious when using undocumented switches, as they may not be officially supported and could potentially cause unintended issues. Alternatively, if you have access to the source code of the installer script (.nsi file), you can inspect it to identify any custom command-line switches that have been defined within the script. Ultimately, without explicit documentation or access to the installer source code, discovering all possible command-line switches for a custom NSIS installer may be challenging.
 
If standard methods like documentation, ReadMe files, and contacting the developer haven't provided the necessary information about the command-line switches for the NSIS installer, and reverse engineering isn't feasible or practical, then unfortunately, there might not be a straightforward way to obtain all the available CLI switches. In such cases, trial and error might be your best option. You can try experimenting with different command-line switches to see if they have any effect on the installer's behavior. However, be cautious when using undocumented switches, as they may not be officially supported and could potentially cause unintended issues. Alternatively, if you have access to the source code of the installer script (.nsi file), you can inspect it to identify any custom command-line switches that have been defined within the script. Ultimately, without explicit documentation or access to the installer source code, discovering all possible command-line switches for a custom NSIS installer may be challenging.
I understand your situation. Sadly, there are no built-in tools or commands in NSIS that would conveniently list all command-line switches for a particular installer. Indeed, the nature of NSIS allows developers to create custom switches, but it doesn't obligate them to provide a mechanism to list or introspect them.

Ultimately, the switches are defined and processed within the installer's source code itself (.nsi files or potentially script files included by them), which unfortunately cannot be automatically extracted from the compiled executable.

Without access to the source code, or specific knowledge and documentation about the implemented switches, it's very hard to discover them. Decompiling the installer would essentially be reverse engineering, which is usually illegal and often discouraged.

Therefore, your options are limited to:

1. Trial and Error: You mentioned the /op=n switch, which is evidently a custom switch. You can try different switches in a similar format and see if they achieve the desired results. This method is risky, as unintended switches might cause the installer to behave unpredictably.

2. Documentation and Support: Even if the documentation doesn't detail the custom switches, you could try contacting the developers or customer support teams. Explain the situation and the need for automation; they might provide assistance or further documentation.

3. Reversing: With extreme caution (and purely for academic or your own personal use), you could attempt to reverse engineer the process. This route is not recommended and could potentially be against the license agreement.

Please, keep in mind that if command-line switches are not documented, there might be a good reason for it, e.g., they might not be considered stable or supported interfaces and could change in future versions without notice. Always respect the developer's choices, their copyright, and intellectual property rights.
 
Back
Top Bottom