chiners_68 Posted December 16, 2009 Share Posted December 16, 2009 Hi Guys, have set this up in *.vbs but need to run in autoit. How do you deal with a constant & how do i get the constant to work in the message box. i have the vbcode & what i have with autoit but the auto it dosent work. VB code On Error Resume Next DIM strOStype Set WshShell = CreateObject("WScript.Shell") strOsType = WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") wscript.echo "OS Type = " & strostype AutoIT OStype = RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\", "PROCESSOR_ARCHITECTURE") MsgBox(0, "OS Type", OStype, 5) Link to comment Share on other sites More sharing options...
jvanegmond Posted December 16, 2009 Share Posted December 16, 2009 (edited) 4 things you're doing wrong: 1. Mistake constant for a variable. Quite the opposite. 2. Call the processor architecture the OS type (and confuse their meanings) 3. Have a syntax error in your script because you forgot $ in front of OStype $OStype = RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\", "PROCESSOR_ARCHITECTURE") MsgBox(0, "Processor architecture", $OStype, 5) 4. Don't use the easier way: MsgBox(0, "Processor architecture", @CPUArch) That would be all. Edited December 16, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
chiners_68 Posted December 16, 2009 Author Share Posted December 16, 2009 thanks mandar, wasnt aware of a macro for Processor Architecture. I want OS type & the only way to check that is with the reg key so ill stick with that for now.. thanks Link to comment Share on other sites More sharing options...
chiners_68 Posted December 16, 2009 Author Share Posted December 16, 2009 just spoted this macro does OS architecture. @OSArch Link to comment Share on other sites More sharing options...
jvanegmond Posted December 16, 2009 Share Posted December 16, 2009 I wouldn't know why you would read processor architecture from the registry when you want to get the OS architecture ..... github.com/jvanegmond 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