TeleFragger wrote:
can you see anything that is redundant or not needed?
like i said this works.just looking to see if i could of had it any cleaner..
It appears that you are always working with the 32-bit areas of the registry, at least in the Get Registry Key Value actions...If that is true, then you do not need to check different parts of the registry for 64-bit and 32-bit machines. The reason is that all WiseScripts are 32-bit and will automatically get redirected by 64-bit Windows to the Wow6432Node. Even our latest Flexera Software release of WiseScript, which includes 64-bit extensions, still produces 32-bit executables that will only look at the true 64-bit parts of the registry if you opt-into it (see the screenshots below.) So unless you told it to look in the 64-bit areas of the registry, there is no need for the two separate if statements.
Granted, I am making an assumption about the end of your WiseScript where you are editing 2 registry values and doing it differently for 32-bit and 64-bit Windows. I am assuming that it is the same situation as your Get Registry Key actions. If your intention is to edit the 32-bit area of the registry (the Wow6432Node on 64-bit Windows), then you need not do it differently…Windows will magically redirect (so long as you haven’t marked the radio button to edit the 64-bit area of the registry, as shown in the screenshots.)
The Get Registry Key Value action has a radio button that can force it to look at the 64-bit areas of the registry. As long as you don't use it, Windows will force it to see the Wow6432Node when running on 64-bit Windows.
The Edit Registry action also has a radio button that can force it to look at the 64-bit areas of the registry. As long as you don't use it, Windows will force it to edit the Wow6432Node when running on 64-bit Windows.
So your cleaner WiseScript would look like:
Rem Set Variables to Blank
Set Variable CNAME to
Set Variable DONE to No
Set Variable SSRSERVER to
Set Variable SSRDRIVE to
Rem Get Hostname
Get Registry Key SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName place in Variable CNAME
Rem Get registry keys
Get Registry Key SOFTWARE\BMSSSR place in Variable SSRDRIVE
Get Registry Key SOFTWARE\BMSSSR place in Variable SSRSERVER
Rem On screen dialog selector
Custom Dialog "LCS SSR Configuration Settings"
Rem Edit registry
Edit 2 registry keys