Win7 (64bit) Compatibility-mode and registry
Hi,
We have been moving some of our testing onto Win7 (64bit) machines and were having problems.
We were hoping that updating to TC8.7 would solve these problems, but it did not (at least not initially).
We recently discovered that flagging TC to run in "Windows XP (Service Pack 3)" compatibility-mode seems to fix many of our problems on Win7 (64-bit).
HOWEVER, running in compatibility-mode seems to cause a new problem.
I've tried searching TC help and the forums but there does not seem to be much, if any, mention about using compatibility-mode in Win7, so I am now asking for help.
What we are seeing is that accessing the registry is now VERY slow.
If you run the following test-code on Win7 (64-bit), with TC8.7 you can see a huge difference in how fast each iteration of the for-loop takes.
When TC is NOT in compatibility mode then the iterations are fast (but then we have our other problems).
When TC IS in compatibility mode then the iterations take about a second each.
function Test_SearchRegistryForProgramPath()
{
var index = -1;
var possible_path = "";
try
{
if( Sys.OSInfo.Windows64bit == true )
{ // 64-bit
registry_key = Storages.Registry( "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Folders", HKEY_LOCAL_MACHINE, AQRT_64_BIT );
}
else
{ // 32-bit
registry_key = Storages.Registry( "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Folders", HKEY_LOCAL_MACHINE, AQRT_32_BIT );
}
for( index = 0; index < registry_key.OptionCount; index++ )
{
// Set a breakpoint on this line.
possible_path = registry_key.GetOptionName( index );
}
return true;
}
catch( exception )
{
return false;
}
}
Thanks.