[EXPLORER]

- Edijs Kolesnikovics: Expand environment strings during processing startup items in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run.
See issue #6053 for more details.

svn path=/trunk/; revision=56865
This commit is contained in:
Aleksey Bragin 2012-07-10 22:48:23 +00:00
parent 3b69ad47bf
commit 1963b7a4e6

View file

@ -364,6 +364,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
{
DWORD nValLength=nMaxValue, nDataLength=nMaxCmdLine;
DWORD type;
WCHAR szCmdLineExp[MAX_PATH+1]= L"\0";
--i;
@ -390,7 +391,8 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
continue;
}
if ((res=runCmd(szCmdLine, NULL, bSynchronous, FALSE))==INVALID_RUNCMD_RETURN)
ExpandEnvironmentStrings(szCmdLine, szCmdLineExp, sizeof(szCmdLineExp));
if ((res=runCmd(szCmdLineExp, NULL, bSynchronous, FALSE))==INVALID_RUNCMD_RETURN)
{
printf("Error running cmd #%ld (%ld)\n", i, GetLastError());
}