mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-28 16:24:27 +02:00
Fix the problem of launch Notepad++ with Admin right after installation.
Launch N++ with same privileges as explorer FIxes #2641, fixes #159, fixes #556, closes #2643
This commit is contained in:
parent
746c3da88a
commit
c95e098500
@ -26,7 +26,22 @@
|
||||
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Function LaunchNpp
|
||||
Exec '"$INSTDIR\notepad++.exe" "$INSTDIR\change.log" '
|
||||
;Exec '"$INSTDIR\notepad++.exe" "$INSTDIR\change.log" '
|
||||
|
||||
; create shortcut in temp with to launch as argument
|
||||
CreateShortCut "$TEMP\notepad++.lnk" "$INSTDIR\notepad++.exe" "$INSTDIR\change.log"
|
||||
|
||||
; Launch Notepad++ with same elevation as explorer
|
||||
; It will solve the drag an drop issue if explorer is running with lower privilege
|
||||
Exec '"$WINDIR\explorer.exe" "$TEMP\notepad++.lnk"'
|
||||
|
||||
; Caution : Please DONOT delete $TEMP\notepad++.lnk right after Exec command
|
||||
; In slower system it may take some time to open N++ while Exec command exist quickly
|
||||
; Also putting sleep does not make sense here as
|
||||
; - DONOT know how much to wait
|
||||
; - Keeps installer UI open wait time period
|
||||
; - If wait time is more, installer UI may become irresponsive
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; Check if Notepad++ is running
|
||||
|
Loading…
x
Reference in New Issue
Block a user