Archive: Create an EXE from a .bat?


Create an EXE from a .bat?
So I am pretty new to NSIS and I have been having fun with some of the tutorials, but due to time constraints I thought I would ask for some assistance.

I am looking to make an EXE file to install a pre-existing MSI file that I have. I already have a batch file to kick off the silent install and prefill certain install components, but for distributional reasons it would be better to package this as an EXE so we can track success/failure rates.

If I have a batch as follows:

msiexec /i x64Installer.msi /q INSTALLDIR="C:\Program Files\Org\Agent\" SERVER="hostname" KEY="" UNINSTALLPASSWORDKEY="" SERVICENAME="x64A" WATCHDOGNAME="Foxy" ARPSYSTEMCOMPONENT="1"

Is there a way that I can turn this into an EXE, or design an EXE that will kick off the batch and check for a success/failure queue?

I figure this can be done with the $CMDLINE variable, but I have yet to find a good example of how to use it thus far.

Any help would be appreciated!


ExecWait `"$SYSTEM\msiexec.exe" /i "$EXEDIR\x64Installer.msi" /q INSTALLDIR="$PROGRAMFILES\Org\Agent\" SERVER="hostname" KEY="" UNINSTALLPASSWORDKEY="" SERVICENAME="x64A" WATCHDOGNAME="Foxy" ARPSYSTEMCOMPONENT="1"` $0
DetailPrint "MSIExec returned $0"


I will give that a shot.

In the mean time, you sir, are awesome.


Oh, you'll probably need to use $PROGRAMFILES64 instead of $PROGRAMFILES, for x64 apps.