I have this problem when running two regset in one action it will only execute on result. please check my action script for details. thanks.
Braian
action script:
if {(size of ram/1024/1024) > 1024}
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix]” “LastRAMSize”="{((if (it > 128) then (((it/32)32) + (if (it mod 32 > 16) then 32 else 0) ) else it ) of (size of ram / (10241024)) as floating point /1024) as integer}"
else
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix]” “LastRAMSize”="{(if (it > 128) then (((it/32)32) + (if (it mod 32 > 16) then 32 else 0) ) else it ) of (size of ram / (10241024)) as integer}"
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix]” “LastRAMSize”="{((if (it > 128) then (((it/32)32) + (if (it mod 32 > 16) then 32 else 0) ) else it ) of (size of ram / (10241024)) as floating point /1024) as integer}"
else
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix]” “LastRAMSize”="{(if (it > 128) then (((it/32)32) + (if (it mod 32 > 16) then 32 else 0) ) else it ) of (size of ram / (10241024)) as integer}"
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix]” “LastRAMSize”="{((if (it > 128) then (((it/32)32) + (if (it mod 32 > 16) then 32 else 0) ) else it ) of (size of ram / (10241024)) as floating point /1024) as integer}"
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix]” “LastRAMSize”="{(if (it > 128) then (((it/32)32) + (if (it mod 32 > 16) then 32 else 0) ) else it ) of (size of ram / (10241024)) as integer}"
When I try the actionscript as you have it at first, I only get the time set when the ram is less than 1GB. If I add the endif before the last regset, I get the LastRAMSize and time set.
Here is what worked for me:
if {(size of ram/1024/1024) > 1024}
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix]” “LastRAMSize”="{((if (it > 128) then (((it/32)32) + (if (it mod 32 > 16) then 32 else 0) ) else it ) of (size of ram / (10241024)) as floating point /1024) as integer}"
else
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\BigFix]” “LastRAMSize”="{(if (it > 128) then (((it/32)32) + (if (it mod 32 > 16) then 32 else 0) ) else it ) of (size of ram / (10241024)) as integer}"
When I run that through the QnA and change the “>” to “<”, I will see the time being set either way, where before without the endif, I would only see it if the RAM is < 1GB