Thread: Rollcage
View Single Post
Old 20-05-2011, 10:38 PM   #29
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,613
Default

Yes we could make the script ask the user, although it would make more sense asking about the drive letter. If you think about it, now that x64 is slowly but surely replacing the legacy x86 (32-bit), quite many people will be using the former, without ever knowing the existence of the two.

By the way, the script detects a CD drive, but if there are more than one, or for example the game CD is in a virtual mount different from the real CD, it may not work. It could be modified to look for a file that we know should be in the game CD.

I don't know either right off the bat how to detect the OS architecture, with a cmd script only that is. There's a Windows environment variable %PROCESSOR_ARCHITECTURE% that must inform about the hardware, but oddly enough there's none that informs about the OS, which is the only thing that matters to us (since x64 processors can have a x86 OS installed, and the long mode remains always unused; actually most PC processors are x64 since long ago, even if most of them are running x86 OSes).

There's also for example a %ProgramFiles(x86)% environment variable along with the usual %ProgramFiles%, that exists on a x64 Windows but not in a x86 one.

But on the other hand there's no harm in writing both keys. On x86 systems the "WOW6432node" name has no special meaning--it's as if there was a program or software manufacturer named like that. Keys in that particular part of the registry are read only by the same programs that write them, so it would just stay there with no effect on the system.

On x64 systems only one key is necessary, the one in HKLM\SW\WOW6432node\, because the game is a x86 program (actually from a time where x64 didn't even exist), that is run though WOW64 and sees the registry through the redirection described in the Microsoft KB article. If there were both x86 and x64 versions of the same program, each would need only one of the two registry keys.

Because the purpose of this redirection and the specially named "WOW6432node" parent key (as well as the %ProgramFiles% and %ProgramFiles(x86)% folders) is to allow x86 (32-bit) and x64 (64-bit) versions of the same program to be installed on the same x64 OS side by side, and having independent registry keys.
__________________
Life starts every day anew. Prospects not so good...

Last edited by Japo; 21-05-2011 at 02:24 PM. Reason: typo
Japo is offline                         Send a private message to Japo
Reply With Quote