PageRenderTime 84ms CodeModel.GetById 43ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/admin/win/nsi/nsis_uac/UAC_GetUserShellFolderPath.nsi

http://github.com/tomahawk-player/tomahawk
Unknown | 30 lines | 23 code | 7 blank | 0 comment | 0 complexity | 8886458d6321277ac3e024f1b4b5a658 MD5 | raw file
 1RequestExecutionLevel user /* RequestExecutionLevel REQUIRED! */
 2!define APPNAME "UAC_GetUserShellFolderPath"
 3Name "${APPNAME}"
 4OutFile "${APPNAME}.exe"
 5ShowInstDetails show
 6
 7!include UAC.nsh
 8!include LogicLib.nsh
 9
10page instfiles
11
12Function .onInit
13${UAC.I.Elevate.AdminOnly}
14FunctionEnd
15
16!ifndef CSIDL_PERSONAL
17	!define CSIDL_PERSONAL 0x0005 ;My Documents
18!endif
19Section
20
21/*
22You can specify a fallback value in the 2nd parameter, it is used if the installer is not elevated 
23or running on NT4/Win9x or on errors.
24If you just want to check for success, use "" as the 2nd parameter and compare $0 with "" 
25*/
26UAC::GetShellFolderPath ${CSIDL_PERSONAL} $Documents
27DetailPrint MyDocs=$0
28
29
30SectionEnd