I may have missed the thread, but what is it you are trying to do?
I will add more detail, joe and I have had long conversations about crazy
operating system setups.
I write crazy batch files all the time. For instance, i have a single
package to install java, (32bit and 64bit) uninstall all versions detected
and set the product up per security requirements.
I have 5 lines of code that will always know where you are. Hear me out
For instance you have several different things to know about 64bit machines
and command prompts.
First c:\windows\system32 is 64 bit binaries
Second c:\windows\syswow64 is 32 bit binaries
Third the reg hive hklm/software is a 64 registry hive
Fourth the reg hive hklm\software\wow6432node is a 32 bit hive.
Fun fact: all user profiles on a 64 bit machine are actually pure 32bit...
( reg hives included.)
Now next is to know how to query properly to each location.
Now lets say you are a 64bit machine running 64bit command prompt,
(c:\windows\system32\cmd.exe) and you want to run a reg query for a 64bit
key then you would use
reg query hklm\software
,but if you want to reg query a 32 bit key you would use
% windir%\syswow64\reg.exe hklm\software
Now here is where it gets tricky. You are running a 64 bit machine but
running a 32bit command prompt... (ahem, the ca client is a 32 bit
application so every script runs as this by default. From within ca of
Now lets say you want to query for a 64 bit registry key. You now have a
problem you have to access the 64 bit system, which can not be done by the
standard command. To do this you have to run the following:
% windir%\sysnative\reg.exe hklm\software
Now lets say you only want to query for a 32bit registry key. That is
simple just run:
Reg query hklm\software
Or more complicated by running the following
% windir%\sysnative\reg.exe query hklm\software\wow6432node
Please excuse any misspellings, this was sent from my phone.
If you need more help please let me know.
The information contained in this e-mail and any attached documents may be
privileged, confidential and protected from disclosure. If you are not the
intended recipient you may not read, copy, distribute or use this
information. If you have received this communication in error, please
notify the sender immediately by replying to this message and then delete
it from your system.