Old 19th February 2017, 14:41   #1
alexmitev
Junior Member
 
Join Date: Feb 2017
Posts: 15
Ultra Modern UI modifies shell var context

Hello,
I noticed the use of the Ultra Modern UI causes modification of the shell var context that I've set. Minimal reproduce program:

PHP Code:
!include UMUI.nsh

OutFile 
"produce.exe"

RequestExecutionLevel user

!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English" 

Function .onInit
    SetShellVarContext all
FunctionEnd

InstType 
"Typical" 

Section "Core Files (required)" SectionCoreFiles
    SectionIn 1 RO

    
!insertmacro UMUI_GETSHELLVARCONTEXT
    Pop 
$0
    MessageBox MB_OK 
"$0" displays "current"!?
SectionEnd 
I get this also with MUIEx.nsh
With MUIEx.nsh I also get a fantastic "Threat blocked" fatal notification from Avast (I cannot attach the png screenshot from Avast here)
alexmitev is offline   Reply With Quote
Old 19th February 2017, 21:08   #2
SuperPat
Senior Member
 
SuperPat's Avatar
 
Join Date: Mar 2006
Location: France
Posts: 206
Fixed in github!
You can use, on the other hand, the UMUI_DEFAULT_SHELLVARCONTEXT define:
code:
!include MUIEx.nsh

OutFile "produce.exe"

RequestExecutionLevel user

!define UMUI_DEFAULT_SHELLVARCONTEXT all

!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

InstType "Typical"

Section "Core Files (required)" SectionCoreFiles
SectionIn 1 RO

!insertmacro UMUI_GETSHELLVARCONTEXT
Pop $0
MessageBox MB_OK "$0" ; displays "current"!?
SectionEnd


SuperPat is offline   Reply With Quote
Reply
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