how to pass inno setup exe parameters through cmd mode in batch script? - inno-setup

I have inno setup exe passing the 5 parameters background in batch script.my requirement is to install the application through cmd mode using batch script.
"C:\Users\Administrator\Desktop\New folder\mysetup.exe" /VERYSILENT /Pswd#123 /dir="C:\Program Files"
please help me

Related

Providing SignTool configuration in Inno Setup script

I have the following Inno Setup signing configuration:
[Setup]
SignTool=signtool $f
SignedUninstaller=yes
In Inno Setup Compiler IDE in "Tools > Configure Sign Tools..." I have:
"C:\DEVELOPMENT\Setup\signtool.exe" sign /f C:\DEVELOPMENT\Signing_Certificate.pfx /p "my_password" $f
...this works great on my local machine when I compile my Inno Setup.
However, we need to build installer automatically using TeamCity. So this all have to be automatic. And the sign tool configuration needs to be included in the script, without any need to configure anything upfront.
Is there anyway to declare my paths as variables in the actual Inno Setup script so that they are picked up in the signing wizard line above?
For automatic build, you do not use Inno Setup IDE. You should use iscc command-line compiler.
For configuring a sign tool, iscc has /S switch:
iscc example.iss "/Ssigntool=C:\DEVELOPMENT\Setup\signtool.exe sign /f C:\DEVELOPMENT\Signing_Certificate.pfx /p my_password $f"

How do you run non-GUI version of Inno Script Studio from bash?

I have a .iss file created in Inno Script Studio. It has a pre-compilation step which is a feature specific to Inno Script Studio. I can run my .iss file from a Command Prompt window (which is running cmd.exe, right?). The command looks like,
"\Program Files (x86)\Inno Script Studio\isstudio.exe" -compile myscript.iss
If instead, I run /c/system/windows32/cmd from a Git bash window and then try the same command I get an error popup with 'I/O Error 6'. Why? Through experimentation the problem seems to be with the myscript.iss argument: if I leave off that argument the isstudio simply complains that the argument is missing.
I have tried various escaping and quoting changes to the command but nothing fixes it. I tried running cmd in a fresh environment with env -i. I have tried providing the full path to the file using a DOS style path with C: and backslashes.
And I tried creating a .bat file with the above command in it: same error.

How to disable an extra window to restart system even after selecting not to do so in files in use dialog in installshield

I am doing an upgrade for the existing exe file using installshield. when installing the update , in files in use dialog I select the option to automatically close and restart the application instead of the other option to reboot the system.
But I get an extra window which tells me to restart the system again after installation is complete. How to disable this window? Please help :)
You can try to run the installation silently with REBOOT=ReallySuppress (update the paths). Please note that I haven't had the chance to test all these command lines:
msiexec.exe /I "C:\IsWiX.msi" /QN /L*V "C:\msilog.log" REBOOT=ReallySuppress
/I is for install
/QN is silent mode
/L* is verbose logging
If you have an EXE file instead of an MSI file I would extract the MSI to an administrative image (file extract from setup.exe basically) using the following command:
setup.exe /a
Then specify an extract location for the files in the EXE file. You can also run it directly with the Installshield command lines for EXE files. Something like:
Setup.exe /v"REBOOT=ReallySuppress /qn"
Or silently with logging:
Setup.exe /v"/l*v c:\test.log REBOOT=ReallySuppress /qn"
There are also some simplified command line macros from Microsoft. Most of the time these can be used. Other times you need the full command line interface.

How to compile Innosetup script in Silent mode?

I want to compile the innosetup script in Silent mode using command prompt.
Using this method, i can compile the innosetup script "Compil32 /cc "mypath\myscript.iss"
Then compilation happened successfully,but innosetup script window opening during compilation, i don't want to open the innosetup scrip window during compilation,How can i proceed that using the below link
http://www.jrsoftware.org/ispphelp/index.php?topic=isppcc
In that link they provide "/Q" command line, but i don't know where to use the command line for silent compilation.
Any help????
Don't use Compil32, which is the GUI compiler. Use ISCC.EXE instead, which is the command-line compiler and supports a /q switch:
iscc /q mypath\myscript.iss
For more info on what command-line options are available, just run iscc /? from a command prompt.
I found the solution for my question with the reference as below link "http://www.jrsoftware.org/ispphelp/index.php?topic=isppcc", and the answer is,
"ISCC.exe /Q "mypath\myscript.iss"

How to install application as windows service using NSIS script?

I have written nsis script for my java project. I have successfully created a exe file using this nsis script. Final step of my installation process is installing my application as windows service using a batch file. I have installed successfully through command line using following code
"c:\program Files\program Files\test\bin\prunsrv.exe" //IS//servicename --Startup=auto --Jvm="Auto" --Classpath="%CLASSPATH%" --StartMode=jvm --StartClass=com.class.name --StartParams start --StopMode=jvm --StopClass=com.class.name --StopParams stop
same commands I have executed through nsis script is not working well. I have tried the following code
Exec '"$INSTDIR\bin\prunsrv.exe" //IS//servicename --Startup=auto --Jvm="Auto" --Classpath="%CLASSPATH%" --StartMode=jvm --StartClass=com.class.name --StartParams start --StopMode=jvm --StopClass=com.class.name --StopParams stop'
$INSTDIR refer to this directory c:\program Files\test.
Use ExpandEnvStrings to expand %classpath% before the exec...

Resources