Prev Previous Post   Next Post Next
Old 18th July 2019, 15:00   #1
meoit
Member
 
Join Date: Oct 2014
Location: $DESKTOP
Posts: 90
Post Why installer no restart ?.

I need installer restart and run in runas shell.

This is script:

Quote:
Var /Global Button_Restart

${NSD_OnClick} $Button_Restart Button_Restart_click

!define RunAs '!insertmacro RunAs'
!macro RunAs
userinfo::GetAccountType
Pop $0
${If} $0 != 'admin'
StrCpy $0 $EXEPATH
MessageBox MB_OK|MB_USERICON|MB_TOPMOST 'Run-as.'
ExecShell 'runas' '$0'
Quit
${EndIf}
!macroend

Function Button_Restart_click
${RunAs}
FunctionEnd
Why installer no restart ?.
Please help.
Thanks.
meoit is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump