$LocalAppData now resolves to the ProgramData folder in the "SetShellVarContext all" context

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6875 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2017-06-23 01:11:30 +00:00
parent decb52f505
commit 2553c6e550
6 changed files with 7 additions and 4 deletions

View file

@ -20,6 +20,8 @@ Released on ? ?th, 2017
\b Added \R{pragma}{!pragma warning} (\W{http://sf.net/p/nsis/patches/267}{patch #267})
\b $LocalAppData now resolves to the ProgramData folder in the \R{setshellvarcontext}{SetShellVarContext all} context
\S2{} Minor Changes
\b Variables used in Caption can now be set in .onGuiInit (\W{http://sf.net/p/nsis/feature-requests/539}{RFE #539})

View file

@ -69,7 +69,7 @@ Sets the error level of the installer or uninstaller to \e{error_level}. See \R{
\c \\<b\\>current\\</b\\>|all
Sets the context of $SMPROGRAMS and other shell folders. If set to 'current' (the default), the current user's shell folders are used. If set to 'all', the 'all users' shell folder is used. The all users folder may not be supported on all OSes. If the all users folder is not found, the current user folder will be used. Please take into consideration that a "normal user" has no rights to write in the all users area. Only admins have full access rights to the all users area. You can check this by using the UserInfo plug-in. See Contrib\\UserInfo\\UserInfo.nsi for an example.
Sets the context of $SMPROGRAMS and other \R{varconstant}{shell folders}. If set to 'current' (the default), the current user's shell folders are used. If set to 'all', the 'all users' shell folder is used. The all users folder may not be supported on all OSes. If the all users folder is not found, the current user folder will be used. Please take into consideration that a "normal user" has no rights to write in the all users area. Only admins have full access rights to the all users area. You can check this by using the UserInfo plug-in. See Contrib\\UserInfo\\UserInfo.nsi for an example.
Note that, if used in installer code, this will only affect the installer, and if used in uninstaller code, this will only affect the uninstaller. To affect both, it needs to be used in both.

View file

@ -177,7 +177,7 @@ This constant is not available on Windows 95 unless Internet Explorer 4 with Act
\e{$LOCALAPPDATA}
The local (non-roaming) application data directory.
The local (non-roaming) application data directory. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
This constant is available on Windows ME, 2000 and above.

View file

@ -364,7 +364,7 @@ CEXEBuild::CEXEBuild(signed char pponly) :
m_ShellConstants.add(_T("FONTS"), CSIDL_FONTS, CSIDL_FONTS);
m_ShellConstants.add(_T("TEMPLATES"), CSIDL_TEMPLATES, CSIDL_COMMON_TEMPLATES);
m_ShellConstants.add(_T("APPDATA"), CSIDL_APPDATA, CSIDL_COMMON_APPDATA);
m_ShellConstants.add(_T("LOCALAPPDATA"), CSIDL_LOCAL_APPDATA, CSIDL_LOCAL_APPDATA);
m_ShellConstants.add(_T("LOCALAPPDATA"), CSIDL_LOCAL_APPDATA, CSIDL_COMMON_APPDATA);
m_ShellConstants.add(_T("PRINTHOOD"), CSIDL_PRINTHOOD, CSIDL_PRINTHOOD);
//m_ShellConstants.add(_T("ALTSTARTUP"), CSIDL_ALTSTARTUP, CSIDL_COMMON_ALTSTARTUP);
m_ShellConstants.add(_T("INTERNET_CACHE"), CSIDL_INTERNET_CACHE, CSIDL_INTERNET_CACHE);

View file

@ -845,7 +845,7 @@ TCHAR * NSISCALL GetNSISString(TCHAR *outbuf, int strtab)
*/
BOOL use_shfolder =
// Use shfolder if not on 95/98
!((ver & 0x80000000) && (LOWORD(ver) != 0x5A04)) ||
!((ver & 0x80000000) && (LOWORD(ver) != MAKEWORD(4,90))) ||
// Unless the Application Data or Documents folder is requested
(

View file

@ -49,6 +49,7 @@ static const struct { const TCHAR *name, *guidstr; } g_soslmap[] = {
bool SupportedOSList::addall()
{
m_isdefaultlist = false;
for (UINT i = 0; i < COUNTOF(g_soslmap); ++i)
if (!append(g_soslmap[i].name))
return false;