nsis

NSIS Special Build - Logging and Long String (8192 byte)

坚强是说给别人听的谎言 提交于 2019-12-08 13:57:55
问题 I have found special builds of NSIS for Advanced Logging and Long strings (8192 bytes), but I need to incorporate both into an installer. I do not have a developer environment set up where I could compile my own version of makensis, so I was hoping that somebody with this Advanced Logging and Long string configuration could share their makensis.exe and stubs. Any help would be greatly appreciated. Thanks. 回答1: You can try this but I'm not sure what the log limit is, if you need to log strings

Detecting if the target volume is NTFS using NSIS

寵の児 提交于 2019-12-08 12:48:20
问题 I'm creating an installer with NSIS for a program that needs to run on an NTFS volume. How do I detect if the install to path is on an NTFS volume and act accordingly (show a help/warning message)? 回答1: Using external tools is not always a good idea (Not every command line tool exists on the Home versions of windows ) It's always better to call the correct API directly with the system plug in. !include LogicLib.nsh StrCpy $0 "c:\" System::Call 'Kernel32::GetVolumeInformation(t "$0",t,i ${NSIS

Find Largest Drive, NSIS installer

一世执手 提交于 2019-12-08 06:33:49
问题 I am completely new to NSIS installer script, I want to set the install directory to the largest disk on the computer. Can anyone guide me how to do it. 回答1: !include LogicLib.nsh System::Call 'kernel32::GetLogicalDrives()i.r0' StrCpy $1 $windir 3 ; Fallback if things go wrong StrCpy $2 0 StrCpy $4 65 ; 'A' loop: IntOp $3 $0 & 1 ${If} $3 <> 0 IntFmt $3 "%c:\" $4 System::Call 'kernel32::GetDiskFreeSpaceEx(tr3,*l.r5,*l,*l)i' ${If} $5 L> $2 StrCpy $2 $5 StrCpy $1 $3 ${EndIf} ${EndIf} IntOp $4 $4

NSIS - Set the working directory for a process before running it

别等时光非礼了梦想. 提交于 2019-12-08 05:39:30
As above. I'm specifically running a Java program using ExecWait, by invoking java.exe and passing the classname. The application I'm running relies on relative paths and has to be run from a specific directory, however when I directly call java, it simply uses the installer location as the current directory and fails. Is there a way to get around this? Update: Here's my commandline: ExecWait "$INSTDIR\MyApp\jre\bin\java.exe -cp $INSTDIR\MyApp\lib\*; MyJavaClassName" SetOutPath sets the current/working directory for the process, it should be inherited by the child process... Push $OUTDIR

nsis - remove pinned icon from taskbar on uninstall

[亡魂溺海] 提交于 2019-12-08 05:38:25
问题 I'm working on an app for a company and they requested that if the app is pinned to the taskbar, when uninstalling the app should be unpinned. If I just delete the icon from quicklaunch\user pinned\taskbar then it leaves a blank icon on the taskbar. I need to somehow actually unpin it. The only thing I've come across is installing winshell plugin (http://nsis.sourceforge.net/WinShell_plug-in) and then calling IStartMenuPinnedList::RemoveFromList (https://msdn.microsoft.com/en-us/library

NSIS - Set the working directory for a process before running it

给你一囗甜甜゛ 提交于 2019-12-08 04:55:27
问题 As above. I'm specifically running a Java program using ExecWait, by invoking java.exe and passing the classname. The application I'm running relies on relative paths and has to be run from a specific directory, however when I directly call java, it simply uses the installer location as the current directory and fails. Is there a way to get around this? Update: Here's my commandline: ExecWait "$INSTDIR\MyApp\jre\bin\java.exe -cp $INSTDIR\MyApp\lib\*; MyJavaClassName" 回答1: SetOutPath sets the

Manage shortcuts arguments for NSIS CreateShortCut method via CMake

烂漫一生 提交于 2019-12-08 03:41:54
问题 First hi to everyone ! I want to create a shortcut to a batch file that does not prompt the DOS window. For that I have seen that the following command works very well: wscript.exe invisible.vbs my_batch_file.bat My problem is that I would like to create the shortcut with this command via CMake and NSIS. My problem is that it seems I cannot give more than one parameter after "wscript.exe" in the following command in the CMakeLists.txt file: list(APPEND CPACK_NSIS_CREATE_ICONS " CreateShortCut

NSIS restrict folder installation

主宰稳场 提交于 2019-12-08 01:37:08
问题 I have a NSIS installer I am working on that I need to be able to prevent installation to the "user error" folders (i.e. $SYSDIR, $WINDIR, $DESKTOP etc... ) I want them to be able to chose a installation path but just have the next button be disabled if they chose a location as listed above. I have searched everywhere and can't find an answer to this one. I was trying to use this but I can still install to desktop: !define MUI_PAGE_CUSTOMFUNCTION_LEAVE MyDirLeave !insertmacro MUI_PAGE

Win32 installers: is there a way to write to HKU startup for each user?

无人久伴 提交于 2019-12-07 22:34:33
问题 Is there a Windows installer that will add to startup for each user like <user>\Software\Microsoft\Windows\CurrentVersion\Run for each user on the system? I can't write to HKLM because the program being installed is hardcoded to work with HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run when toggling the start-on-login preference. I'm also wondering how to deal with the situation where a user is created after the application is installed. Is there a place where I can put a key

uninstaller not deleting registry

坚强是说给别人听的谎言 提交于 2019-12-07 13:02:57
问题 Function Check32or64BitWindows ${If} ${RunningX64} strcpy $INSTDIR "$PROGRAMFILES64\${APP_FULL_PATH}" SetRegView 64 ${Else} SetRegView 32 strcpy $INSTDIR "$PROGRAMFILES32\${APP_FULL_PATH}" ${EndIf} FunctionEnd If an older version is detected then I execute ExecWait '"$INSTDIR\uninst.exe" /S' $0 My uninstall section: Section uninstall !define APP_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_VENDOR} ${APP_NAME}" !define APP_UNINST_ROOT_KEY "HKLM" DeleteRegKey ${APP