NSIS Simple Service Plugin : cannot call SimpleSC::StartService - nsis

I want to create a new service in Windows 7 after the user installs my EXE generated with NSIS. I have tried this code SimpleSC::StartService "TestService" '' 15 and this code
SimpleSC::InstallService "MyService" "My Service Display Name" "16" "2" "E:\utilisateur\xxx.exe" "" "" "" but neither are working; it displays Plugin not found, cannot call SimpleSC::StartService

You need to download the SimpleSC plug-in and extract the .dll into the correct NSIS plug-in folder, typically c:\Program Files\NSIS\Plugins\x86-ansi for a NSIS 3 ANSI installer.

Related

Electron-builder NSIS, embedding other installers

I have created a little electron program for one of my friends, it is a patcher for a private metin2 server of some sort. The game itself is really old so it requires a few redisturables to be installed.
[dxwebsetup0411 / dotNetFx35setup / vcredist_x86 ( i believe its a 2013 version) ]
I want to include them as an option at the end of the install (or even before it, doesn't really matter).
I have found a few examples how to do so but they are all for Standalone NSIS installers and when i try to include that script ( in the build/installer.nsh file ), the build process crashes, presumably because its not the main build script therefor adding Sections is prohibited (?).
Im really new to NSIS scripts and NSIS overall.
So far i only figured out how to put checkboxes and labels and so on in, with the help of nsDialogs, but as i looked at its documentation, it seemed that there are no option where i could do this.
Any help would be greatly appreciated.
EDIT :
My script currently is almost empty, I only changed the default directory, but anyway here is that:
!macro preInit
SetRegView 64
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Decay2"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Decay2"
SetRegView 32
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Decay2"
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Decay2"
!macroend
Everything i know about electron-builder's NSIS main script and this included script is here :
Custom Script Example
NSIS- Electron Builder
It is definitely possible to embed other installers and execute them. See this example on SO:
Embedding other installers using NSIS
or these official NSIS tutorials/guides: https://nsis.sourceforge.io/Embedding_other_installers
Please post your script and build file(s) if you have some issue with your script and you expect specific answer.

Install MySql With default Configure automatically with install4j on Linux

I building a installer for my application and want to install mysql With default Configure on user PC automatically. how to install mysql automatically without be user set Configure(example password,user,instance)? On linux
1.How i install MySQL on Linux with install4j ?
2.How to run .sh file in install4j?
You can run any third party installer with a "Run executable or batch file" action.
The mysql installer has a quiet mode that can be invoked like this:
msiexec /i "path to msi file" /qn INSTALLDIR="mysql installation dir"
For the "Run executable or batch file", you have to set the "Executable" property to
${installer:sys.system32Dir}\msiexec
and the "Arguments" property (in the "..." editor) to
${installer:sys.installationDir}\mysql.msi
/qn
INSTALLDIR=${installer:sys.programGroupDir}\mysql
If you add the mysql msi file to the distribution tree at the top level and it's named 'mysql.msi' and if you want to install it to %PROGRAMFILES%\mysql.
Configuring the instance can be done with the MysqlInstanceConfig.exe helper, see https://dev.mysql.com/doc/refman/5.1/en/mysql-config-wizard-cmdline.html for more information.

How to Install IIS with NSIS?

I am building an installer which installs and configures iis and php.
My iis-install.bat file:
Start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;IIS-ManagementConsole;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;IIS-CGI
My setup.nsi:
Section -iis_installation
installIIS:
;MessageBox MB_YESNO "Allow To Install IIS?" /SD IDYES IDNO permissionModifier
File "iis-install.bat"
nsExec::Exec "iis-install.bat"
endInstall:
SectionEnd
Both the bat file and setup.nsi are in same folder.
Problem:
When i compile and run the setup.exe file it will giv an error as below:
"atempt was made to load the progrom in an incorrect format"
And other batch files run properly with nsis except iis-install.bat why?
Please help to solve the issue or suggest any other idea to install iis with nsis.
Why use a batch file if it only contains a single command? And the wait parameter for start is /WAIT not /w!
Try nsExec::Exec '"c:\full\path\to\pkgmgr.exe" /iu:IIS-WebServerRole;...;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;IIS-CGI'

Execute another installer silently within your Nsis installer

I am trying to execute ffdshow.exe silently within my nsis installer but ffdshow doesnt seem to work with my method but MatroskaSplitter.exe and other installers have run silently with the same method.
File "..\Prerequisites\ffdshow_rev4515_20130612_clsid.exe"
ExecWait '"$INSTDIR\ffdshow_rev4515_20130612_clsid.exe" /S'
Are you sure ffdshow uses NSIS?
It looks to me like they are using Inno so you could try /silent or /sp- /silent /norestart.

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