BUG: Profiler Enabled Only Under Administrator Account in Windows NTID: Q224382
|
When using Visual C++ in a Windows NT account other than the one Visual C++ was installed under, the Profile menu option under the Build menu is disabled.
When Visual C++ is installed, a ProfilerInstalled registry entry is created and set to true. The Visual C++ installation program places this key under HKEY_CURRENT_USER. HKEY_CURRENT_USER is specific only to the current user, which means the registry entry is not being set for other Windows NT accounts.
In earlier versions of Visual C++, installing the profiler is optional.
For all accounts to share the ProfilerInstalled registry key, it should be placed into HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER. Add the following REG_DWORD value to HKEY_LOCAL_MACHINE under the following path:
Software\Microsoft\DevStudio\6.0\General\ProfilerInstalled = 0x1
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
To easily update the registry:
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\DevStudio\6.0\General]
"ProfilerInstalled"=dword:1
#include "windows.h"
#include "stdio.h"
int main(int argc, char* argv[])
{
HKEY hKey;
DWORD dwValue = 1;
int nRet = 0;
if ( !SUCCEEDED(::RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\DevStudio\\6.0\\General",
0, KEY_ALL_ACCESS, &hKey)))
{
printf("Error: Cannot open key\n");
return -1;
}
if ( !SUCCEEDED(::RegSetValueEx(hKey, "ProfilerInstalled",
0, REG_DWORD, (unsigned char *)&dwValue, 4)))
{
printf("Error: Cannot set value\n");
nRet = -1;
}
::RegCloseKey(hKey);
return nRet;
}
© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Kelly Marie Ward, Microsoft Corporation
Additional query words:
Keywords : kbPerformanceTool kbVC600bug
Version : winnt:6.0
Platform : winnt
Issue type : kbbug
Last Reviewed: June 3, 1999