vbs Script has different behavviour when I execute from system32>wscript.exe and from SysWOW64>wscript.exe, why??
Hi
I have a script which trying to read some registry values.. I also have one function in the script which informs the user if he has the permissions to read the specific registry key.. when I execute from system32>wscript.exe it reads the registry
key but when i execute from SysWOW64>wscript.exe it says that I dont have permission to do it.
Why this happens? It is the same registry key in both cases.. I am testing it in Windows 2008 r2 kai in Win7 (both x64 of course..)
Cheers
October 17th, 2012 5:09am
Hi,
programs from these folders are not the same! Your %systemfolder%\system32 contains 64bit system files while your
%systemfolder%\SysWow64 contains 32bit system files. If you are running script from syswow folder, your script is trying access
HKLM\Software\Wow6432Node key.
Regards
Free Windows Admin Tool Kit Click here and download it now
October 17th, 2012 7:19am
Thank you for the reply,
In my script I am giving the key HKLM\Software\MySoftware\KeyString ..
in this case is still searching for the same key under the Wow6432Node ?
Cheers
October 17th, 2012 8:22am
It depends on what component is it.
IMHO 32bit component is registered to
HKLM\Software\Wow6432Node\MySoftware\KeyString and 64bit component to
HKLM\Software\MySoftware\KeyString .
Free Windows Admin Tool Kit Click here and download it now
October 17th, 2012 8:40am