nsis

How do you request administrator permissions using NSIS?

Deadly 提交于 2019-11-27 08:27:04
I am quite new with NSIS. I am trying to request administrator permissions in order to run the installer, as it messes around a bit with registries. My problem with "RequestExecutionLevel" and "MULTIUSER_EXECUTIONLEVEL" is that they both absolutely block any non-Admin user from opening the installer, even when selecting "Run as Administrator" in the context menu. I have tried using the RunAs DLL, but I have not found a single thread as to what to put in the $command variable passed to "RunAsW" function. Here is my (pretty hacked-up) code: StrCpy $0 0 StrCpy $1 "" System::Call 'RunAs:

NSIS: How to add custom button to left bottom corner and handle it's click?

假装没事ソ 提交于 2019-11-27 07:28:49
问题 I tried the ButtonEvent plugin, but when I run compiled example, it fails with memory access error. Maybe it is able to do with System plugin via Windows API or something else? Can anyone show how it can be done? UPD: Error was appeared because I tried to use non-unicode ButtonEvent on Unicode NSIS. Now example compiles and executes OK, but when I click on TryMe button, callback function is not called and nothing happens. How to determine what is the problem? Can anyone compile ButtonEventMUI

Is it possible to call Ant or NSIS scripts from Java code?

核能气质少年 提交于 2019-11-27 01:54:26
Is it possible to call Ant or NSIS scripts programmatically from Java code at runtime? If so, how? You can call ant scripts from Java code. See this article (scroll down to the "Running Ant via Java" section) and this article : File buildFile = new File("build.xml"); Project p = new Project(); p.setUserProperty("ant.file", buildFile.getAbsolutePath()); p.init(); ProjectHelper helper = ProjectHelper.getProjectHelper(); p.addReference("ant.projectHelper", helper); helper.parse(p, buildFile); p.executeTarget(p.getDefaultTarget()); Update I tried with the following ant file , it did not "tell"

How to Add a Desktop Shortcut Option on Finish Page in NSIS installer?

谁说我不能喝 提交于 2019-11-26 22:57:14
问题 I'm trying to create an installer using NSIS Modern User Interface for the first time. I would like to know how I can add an option (checkbox) for users to select to have a desktop shortcut created on the Finish Page (the last screen of the installer) in addition to the "Run XXXX" option that's already there. 回答1: If you are not using readme checkbox on the finish page, you can use it to perform whatever action you want: Function finishpageaction CreateShortcut "$desktop\foo.lnk" "$instdir

第492篇-NSIS installation—kill process

僤鯓⒐⒋嵵緔 提交于 2019-11-26 21:37:42
If you are using NSIS to build your software installation package, you probably need the NSIS script. Since NSIS does not provide the build-in method to kill the process that is running during the installation process, we need the plug-ins to help to do this. 1 Put the plug-ins in the NSIS installation directory Plugins directory. https://skydrive.live.com/#cid=6B286CBEF1610557&id=6B286CBEF1610557!647 2 There are may plug-ins that you can choose, like Processes.dll,processwork.dll,KillProcDLL.dll 1) Processes::KillProcess "process name" # no need to write “.exe” 2) Push "QQ.exe Processwork:

Installation of postgresql with NSIS

你说的曾经没有我的故事 提交于 2019-11-26 18:38:54
问题 I would install postgresql with the NSIS installer, but I don't know how. Can you help me please ? I've find this code outfile "C:\project-open\installer\install_postgres.exe" Name "Install PostgreSQL" !include Registry.nsh !include LogicLib.nsh !include MultiUser.nsh !include Sections.nsh !include MUI2.nsh` !define TARGET c:\project-open Function .onInit StrCpy $INSTDIR "c:\project-open" FunctionEnd section UserMgr::CreateAccountEx "postgres" "*******" "PostgreSQL" "PostgreSQL Database User"

How do you request administrator permissions using NSIS?

纵然是瞬间 提交于 2019-11-26 11:14:55
问题 I am quite new with NSIS. I am trying to request administrator permissions in order to run the installer, as it messes around a bit with registries. My problem with \"RequestExecutionLevel\" and \"MULTIUSER_EXECUTIONLEVEL\" is that they both absolutely block any non-Admin user from opening the installer, even when selecting \"Run as Administrator\" in the context menu. I have tried using the RunAs DLL, but I have not found a single thread as to what to put in the $command variable passed to \

Is it possible to call Ant or NSIS scripts from Java code?

吃可爱长大的小学妹 提交于 2019-11-26 09:48:51
问题 Is it possible to call Ant or NSIS scripts programmatically from Java code at runtime? If so, how? 回答1: You can call ant scripts from Java code. See this article (scroll down to the "Running Ant via Java" section) and this article: File buildFile = new File("build.xml"); Project p = new Project(); p.setUserProperty("ant.file", buildFile.getAbsolutePath()); p.init(); ProjectHelper helper = ProjectHelper.getProjectHelper(); p.addReference("ant.projectHelper", helper); helper.parse(p, buildFile)

How do I detect which kind of JRE is installed — 32bit vs. 64bit

烈酒焚心 提交于 2019-11-26 05:28:16
问题 During installation with an NSIS installer, I need to check which JRE (32bit vs 64bit) is installed on a system. I already know that I can check a system property \" sun.arch.data.model \", but this is Sun-specific. I\'m wondering if there is a standard solution for this. 回答1: The JVM architecture in use can be retrieved using the "os.arch" property: System.getProperty("os.arch"); The "os" part seems to be a bit of a misnomer, or perhaps the original designers did not expect JVMs to be