JuMz Posted January 2, 2008 Share Posted January 2, 2008 Where is the list of all available Built-in WPI Functions and there acceptable commands? The manual only gives a few and does not give all acceptable parameters (i.e. getOSVer()=="2000" is not even there, but it works). The PRIMARY reason I ask for this is because I am looking for a function that can tell me if the OS is x86 or x64Does such a command exist? If not, I was thinking of using the RegKeyValue or RegKeyExists entries but am not sure where to look...Your thoughts? Thanks! Link to comment Share on other sites More sharing options...
JuMz Posted January 7, 2008 Author Share Posted January 7, 2008 Kel? Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted January 7, 2008 Share Posted January 7, 2008 Yhere was a guy on the foums a little bit ago. That was making such a mod but he either never finished it or shared it with us.When we get back into production fof the next release we will add this in. Link to comment Share on other sites More sharing options...
JuMz Posted January 9, 2008 Author Share Posted January 9, 2008 (edited) Found a way:x86RegKeyValue("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE")=="x86"x64RegKeyValue("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE")=="AMD64"Using VBScript, you can do it like this:sub EnsureNativeScriptEngine On Error resume next dim WshShell,WshProcEnv,process_architecture Set WshShell = CreateObject("WScript.Shell") Set WshProcEnv = WshShell.Environment("Process") process_architecture= WshProcEnv("PROCESSOR_ARCHITECTURE")end subI notice you closed the 'suggestions' topic. I had a couple of ideas I wanted to bounce off of you (one of them was this)One idea I had was having 'description on condition met' dialog thing that would come up if a 'grey condition' was enabled so that on mouse over, the user would 'know' why it was greyed out etc so I can display ("already installed" or "not compatible with <insert OS here>" etcAnother idea I had was to add the ability to execute '1 last thing' @ the end, before WPI closes, like a cleanup script option incase we need to take care of misc things (Right after installer.hta finishes).On a sorta related topic:I noticed that for the 'reboot feature' of WPI, you use the 'shutdown -f -r -t xx' command...why not a vb script that acts like a 'native reboot'Below, I found from somewhere on the net and I use it in my own scripts and it is equivalent to 'Startmenu - > shutdown -> restart'Function displayRebootConfirmation()Ret=Msgbox ("Setup needs to restart in order to complete installation. Would you like to restart now?",VBYesNo,"Restart Now?")If Ret=6 then Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery ("select * from Win32_OperatingSystem where Primary=true") for each OpSys in OpSysSet OpSys.Reboot() nextend ifEnd FunctionJust a couple of thoughts. Great work with this tool by the way, an absolute lifesaver! Edited January 9, 2008 by JuMz Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted January 9, 2008 Share Posted January 9, 2008 Thanks for your support and help!I will definatly look into adding these mods\fixes. Link to comment Share on other sites More sharing options...
ashraf21c Posted January 27, 2008 Share Posted January 27, 2008 tnx for your help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now