RegSrv32.exe 简单用法

#= Regardless of architecture we're using just the following

!define REGSVR `$SYSDIR\regsvr32.exe` #= define where RegSrv32 is
!define DLL `$AppDirectory\App\MyLegalProgram\myLegit.dll` #= define the file to register

##=
#= Command line usage is the same for both variants of RegSrv32 as follows
#= regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DLL
#=
##= So in our .nsi file it would be similar to the following:

Exec `"${REGSVR}" /s "${DLL}"`

#= Moreover, you may also use the following

ExecWait `"${REGSVR}" /s "${DLL}"` $0 #= The $0 will contain the error code if any

#= The above will wait for exe to quit it's process before continuing