nsis

A heap of warnings and no image on the welcome/finish page

折月煮酒 提交于 2019-12-10 19:27:22
问题 This is my first time using NSIS and I'm trying to make an installer that uses MUI2, but it's not going too smoothly. When I compile my code I don't get any errors, so it compiles, but I get a truckload of warnings. First it happened with a slightly complex installer, but I even made a super-simple one (still using MUI2) and I still get the same errors. This is the resulting log: MakeNSIS v2.46 - Copyright 1995-2009 Contributors See the file COPYING for license details. Credits can be found

Installing a driver in NSIS script

痴心易碎 提交于 2019-12-10 18:33:59
问题 I'm trying to create an NSIS installer that installs an inf file. The inf file is extracted from the installer to the correct place, and then I use: nsExec::ExecToLog '"$SYSDIR\PnPutil.exe" /a "$INSTDIR\driver\xser.inf"' However, the command does not seem to get executed at all - the install log doesn't print anything - not success nor failure. I've checked thoroughly the command line and it points to the right PnPutil path. I've also checked that it's being run with administrator privileges

Add checkbox AND radiobutton on license page

£可爱£侵袭症+ 提交于 2019-12-10 17:41:43
问题 I´m writing scripts in Nsis and I need to have the option radiobutton on my license page AND a checkbox for another confirmation. Is it possible to do so because if I try to insert both the higher priority is the checkbox and I´m missing radio buttons. Preferable I would like to just modify the license page without creating a custom page! Thanks for your help! 回答1: Option A: Use a modified (Resource Hacker) license page and apply it with ChangeUI (Or MUI_UI) and then use SendMessage to get

How to call PowerShell in NSIS

半世苍凉 提交于 2019-12-10 16:38:57
问题 I am trying to run PowerShell in NSIS. when I run the NSIS script: !include "x64.nsh" Name "nsExec Test" OutFile "nsExecTest.exe" ShowInstDetails show Section "Output to variable" nsExec::ExecToStack 'powershell -Command "& {Import-Module }" ServerManager' Pop $0 # return value/error/timeout Pop $1 # printed text, up to ${NSIS_MAX_STRLEN} DetailPrint '"ImportModules" printed: $1' DetailPrint " Return value: $0" nsExec::ExecToStack 'powershell -Command "& {Get-WindowsFeature}" Desktop

How to install application as windows service using NSIS script

一世执手 提交于 2019-12-10 15:33:34
问题 How to install application as windows service using NSIS script? I used this command in the script Exec '"sc.exe" but after installation i couldn't find any service in windows services related to it so help me thanks. 回答1: Maybe that the NSIS Simple Service plugin can help you. The syntax is as simple as SimpleSC::InstallService "MyService" "My Service Display Name" "16" "2" "C:\MyPath\MyService.exe" "" "" "" Pop $0 ; returns an errorcode (<>0) otherwise success (0) Here the example install

NSIS - Desktop Shortcut For All Users

霸气de小男生 提交于 2019-12-10 14:51:48
问题 How can I create desktop shortcuts for all user while installing a package? 回答1: NSIS supports several of the common/shared special folders: SetShellVarContext all CreateShortcut "$desktop\myapp.lnk" "$instdir\myapp.exe" This code assumes you are elevated... 回答2: With !include NTProfiles.nsh [1] you can create a shortcut in the folder "${ProfilePathAllUsers}\Desktop" . [1] - http://nsis.sourceforge.net/NT_Profile_Paths 来源: https://stackoverflow.com/questions/7501193/nsis-desktop-shortcut-for

Having InstallDir within IF ELSE block

為{幸葍}努か 提交于 2019-12-10 13:36:56
问题 I try to have the following code from ; The default installation directory InstallDir $PROGRAMFILES\${PRODUCT_NAME} to !include x64.nsh ${If} ${RunningX64} ; The default installation directory InstallDir $PROGRAMFILES\${PRODUCT_NAME} ${Else} ; The default installation directory InstallDir $PROGRAMFILES64\${PRODUCT_NAME} ${EndIf} I get the following error :- !insertmacro: _If Error: Can't add entry, no section or function is open! Error in macro _RunningX64 on macroline 2 Error in macro _If on

Can Inno Setup send key and mouse presses, if not, how can this be done using an Installer?

雨燕双飞 提交于 2019-12-10 11:25:40
问题 I'm a newbie to both [Microsoft Windows] installers and Inno Setup but I need to know if Inno Setup (or an equivalent) can be used automate the input to a GUI-based windows program, during install, e.g. by clicking on a menu and selecting a sub-item, for instance? I'm aware of AutoIt and AutoHotkey, as well as NSIS, however Inno Setup comes highly recommended as a software packager/installer, and I also like the idea of learning a little Pascal programming, into the bargain ;) Any ideas or

NSIS Installer Name

匆匆过客 提交于 2019-12-10 03:54:19
问题 Is it possible to set the nsis installer file generated when compiling the installer? something like: makensis /ExeFile:myInstall-v4.1.2.3.exe install.nsi That would be keen. 回答1: You can define a symbol on the command line using the /D switch like so: makensis /DMyInstallerName="myInstall-v4.1.2.3.exe" install.nsi Then in your install script: !ifdef MyInstallerName OutFile "${MyInstallerName}" !else OutFile "myInstall.exe" !endif 来源: https://stackoverflow.com/questions/2788822/nsis-installer

How to get command output in NSIS?

老子叫甜甜 提交于 2019-12-10 01:21:13
问题 I'm wondering, how do I get the output of an execwait command in NSIS. For example, if I run tree , how would I get the output, which would be the actual tree? 回答1: You can't do that with ExecWait, you have to use one of the plugins: nsExec, ExecDos or ExecCmd 来源: https://stackoverflow.com/questions/4018097/how-to-get-command-output-in-nsis