Quick question - is there an easy variable to tell what bits a current operating system is running (32 vs 64)?
The OS_ver variable returns NT.6.0.6002 for VistaSP2 - but it does so for both Vista32 and Vista64. By default, most programs are installed in Program Files for 32-bit and Program Files (x86) for 64-bit. I'd like my scripts to be able to work for both OSes, so ideally I'd like to have something like:
let>OS=BITS_VARIABLE
if>OS=32
let>location=Program Files
else
let>location=Program Files (x86)
endif
run>C:\%location%\program.exe
without needing to figure out what value OS should have every time.
Bits
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Well, actually you shouldn't assume any format for the program files folder. What you should do is determine what it is:
See:
http://www.mjtnet.com/forum/viewtopic.php?p=23719
If you use this from Macro Scheduler the by default you should get whatever is the 32 bit program files folder. So you don't need to know if the system is 32 or 64 bit - that's a misnomer when what you REALLY want to know is "What is the path of the 32 bit program files folder". (for all you know someone has changed it to be c:\fred's programs).
See:
http://www.mjtnet.com/forum/viewtopic.php?p=23719
If you use this from Macro Scheduler the by default you should get whatever is the 32 bit program files folder. So you don't need to know if the system is 32 or 64 bit - that's a misnomer when what you REALLY want to know is "What is the path of the 32 bit program files folder". (for all you know someone has changed it to be c:\fred's programs).
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 38
- Joined: Fri Oct 22, 2010 2:47 am