Hello,
I have a problem with Altiris 6 Software Deliery which is installed on x64 Machines.
When I run a vbscipt on a x64 machine to checks a registry key in HKLM\Software it reads the HKLM\Software\Wow6432Node Key.
Example script:
Set WshShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
WSHShell.RegRead "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired\"
If Err.Number<>0 Then
Err.Clear
KeyExists=False
wscript.echo "No reboot is required"
Else
KeyExists=True
wscript.echo "Reboot required"
End If
On Error GoTo 0
The sciprt checks if the key "RebootRequired" exist. If I run the scipt by hand it works fine on x86 and x64 machines.
But if I run this scipt with Software Delivery on a x64 system it always tries to read the key in Wow6432.
Same Problem with batch files.
If you run a batch file with SWD to check the Processor Architecture (%Processor_Architecture%) it always gives you back that you have a x86 CPU installed.
For batch files I found an easy workaroud:
:Get Environment
set Registry_Path="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Set Registry_Key=/v "PROCESSOR_ARCHITECTURE"
FOR /F "tokens=3 delims= " %%A IN ('REG QUERY %Registry_Path% %Registry_Key% ') DO SET PROCESSOR=%%A
echo %PROCESSOR%
If %PROCESSOR% == AMD64 goto x64
IF %PROCESSOR% == x86 goto x86
exit
:x86
setup_x86.exe
exit
:x64
setup_x64.exe
exit
But now it need to check a registry key, like in the exapmle vbscipt. Is there any solution for that?
Thanks a lot,