View Single Post
Old 24th April 2019, 14:13   #1
meoit
Member
 
Join Date: Oct 2014
Location: $DESKTOP
Posts: 90
Post How to link a label to open web page in unelevated process

Hi guys!

I am trying add label to left-bottom at morden.exe-105:

CONTROL "", 2019, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE, 50, 201, 45, 10

My install is elevated process.
But it is not working.

Code:

PHP Code:
Unicode true
!include "MUI2.nsh"

Page Custom Page1
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_LANGUAGE English

Var /GLOBAL Arial8_Normal_U
Var /GLOBAL LB_Link

Function Page1
    CreateFont $Arial8_Normal_U 
'Arial' '8.25' '400' /UNDERLINE

    nsDialogs
::Create 1044
    Pop $R0
    
${If} $R0 == error
        Abort
    
${EndIf}

    
GetDlgItem $LB_Link $HWNDPARENT 2019

    SendMessage $LB_Link 
${WM_SETFONT$Arial8_Normal_U 0
    SendMessage $LB_Link 
${WM_SETTEXT'STR:Text-to-google'

    
SetCtlColors $LB_Link FE0000 transpanrent

    GetFunctionAddress $R0 GO_HOMEPAGE
    nsDialogs
::OnClick $LB_Link $R0

    nsDialogs
::Show
FunctionEnd

Function GO_HOMEPAGE
    ShellExec 
'open' 'http://google.com'
FunctionEnd

Section

SectionEnd 

Last edited by meoit; 24th April 2019 at 15:29.
meoit is offline   Reply With Quote