nsis

Reliable way to get Windows Version from registry

白昼怎懂夜的黑 提交于 2019-12-17 12:21:12
问题 I'm checking the windows version in an installer (made with NSIS) by checking the following registry key: HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion" According to this post and this page from MSDN, the currentVersion number for Windows 10 should be 10.0. I just installed the Windows 10 Pro Insider Preview and the version number given in the registry is still 6.3, instead of 10.10 as it should. Is there another reliable way in registry to detect Windows 10? 回答1:

Exec not working in NSIS installer

大憨熊 提交于 2019-12-14 01:39:06
问题 I am new to NSIS i am trying to execute an executable while installation similar to pre request. I tried the below code which copies the exe to the installation path but it is not executing it. Section "example" example SetOutPath "$INSTDIR" File "setup.exe" Exec "$INSTDIR\setup.exe" BringToFront SectionEnd 回答1: The answer from Seki is mostly correct, I'd just like to add that the correct syntax for Exec/ExecWait is always Exec '"c:\path\app.exe" param1 "par am2" param3' Parameters are of

msinfo32 won't run in NSIS under Windows XP

一曲冷凌霜 提交于 2019-12-13 15:53:22
问题 The following NSIS line refuses to run for some reason (returns immediately) under Windows XP: ExecWait ' "$PROGRAMFILES\Common Files\Microsoft Shared\MSInfo\msinfo32" /report "$DESKTOP\msinfo.log" ' If I run msinfo32 in the command line, it runs properly: C:\Documents and Settings\Admin> "%PROGRAMFILES%\Common Files\Microsoft Shared\MSInfo\msinfo32" /report "%APPDATA%\..\Desktop\msinfo.log" Why? And how do I make it work? 回答1: Remove spaces after single quotes and add .exe for msinfo. Worked

New customized Print button in the NSIS installer screen is not displaying

試著忘記壹切 提交于 2019-12-13 10:29:37
问题 My requirement is, I wanted to add a new button ("Print") to the License Agreement custom screen. For this I have written the below code. It is compiling but is not showing the "Print" button. Please help me to resolve this. And also is there any simplest way to create a new button on the installer screen? ; Pages !insertmacro MUI_PAGE_WELCOME ;Customizing the License Page Text !define MUI_TEXT_LICENSE_TITLE "End-User License Agreement" !define MUI_TEXT_LICENSE_SUBTITLE "Please read the

NSIS Compile - mysql Not Recognised as operable program - Why does NsExec::ExecToLog statement Fail?

独自空忆成欢 提交于 2019-12-13 09:36:59
问题 I have stared at this until almost BLIND! Checked PATH Environment, Use DOS shortname where possible etc. Below is script with test results and comments. I have search many posts prior to submission of following. ---- TESTS 01 - 04 follow ; Var $SYSDIR = c:\Windows\System32 ; ======================================================================= [TEST-01] Var folder StrCpy $folder "$PROGRAMFILES64\MySQL\MySQL Server 5.7" [TEST-STMT-01] nsExec::ExecToLog '"$SYSDIR\cmd.exe" /c "$folder\bin

nsis get port number on which service is running

扶醉桌前 提交于 2019-12-13 07:08:08
问题 In one of the installer script I am working on I came across the requirement of getting port number on which tomcat service is running. So is there a way in nsis by which given a service name we can get port number on which it is running. If not how can it be achieved. 回答1: I assume you do not know where tomcat is installed (if it is installed at all). A few pointers - not sure if all this is possible in NSIS: Use Processes plugin to find if tomcat is running. You will be able filter by java

NSIS difficulty moving folders

最后都变了- 提交于 2019-12-13 05:44:19
问题 I have an installer that looks for old version, and as part of the uninstall process, backs it up in a folder. For backup, I have tried Rename (it sometimes fails), CreateDirectory then CopyFiles then delete them (time consuming, lots of files and directories), and have preferred to use Move Folder, where every function is replaced with its un-version (like .MoveFolder_Locate_moveFile -> un.MoveFolder_Locate_moveFile ). StrCpy $switch_overwrite 1 !insertmacro un.MoveFolder "$INSTDIR" "$BACKUP

Adding custom labels in NSIS dialog pages, showing and hiding labels in NSIS MUI Directory pages conditionally, how to get the ids of labels

折月煮酒 提交于 2019-12-13 05:16:55
问题 How to hide a Custom LABEL added on the Directory Page Dialog of the NSIS installer. The LABEL is added using the Resource Hacker and its id is 1300 How to change the text of the LABEL conditionally? If user choses to install DEMO, then the label text should be "DEMO" , and if user choses to install UPDATE , then the label text should be "UPDATE" I have added 2 labels, now i am hiding and showing them accordingly.Label1 ID is 1300 , Label2 ID is 1301. # Occurs on Directory page show. Function

NSIS Find files in silent mode not working

坚强是说给别人听的谎言 提交于 2019-12-13 04:52:23
问题 I have the following function to recursively search for dll files. Function ProcessDLLFiles Exch $0 Push $1 Push $2 FindFirst $1 $2 "$INSTDIR\*.dll" loop: IfErrors end DetailPrint 'Found "$0\$2"' FindNext $1 $2 goto loop end: FindClose $1 FindFirst $1 $2 "$0\*.*" dirloop: IfErrors dirend IfFileExists "$0\$2\*.*" 0 dirnext StrCmp $2 "." dirnext StrCmp $2 ".." dirnext Push "$0\$2" call ${__FUNCTION__} dirnext: FindNext $1 $2 goto dirloop dirend: FindClose $1 Pop $2 Pop $1 Pop $0 FunctionEnd

NSIS Plugin with bad string

天大地大妈咪最大 提交于 2019-12-13 03:58:30
问题 I've tried to develop an NSIS Plugin in C++ . Here is my method to set informations from NSIS: void __declspec(dllexport) SetCredentials(HWND hWndParent, int string_size, TCHAR *variables, stack_t **stacktop, extra_parameters *extra) { EXDLL_INIT(); server = getuservariable(INST_0); port = myatou(getuservariable(INST_1)); database = getuservariable(INST_2); username = getuservariable(INST_3); password = getuservariable(INST_4); MessageBox(hWndParent, server, L"Info", MB_OK); // Here is the