Page 3 of 4 <1234>
Topic Options
#208399 - 14/01/25 10:40 PM Re: Check for 32 or 64 bit [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
hmm... I didn't even remember to check on the first part... guess it all works fine without it \:D
_________________________
!

download KiXnet

Top
#208401 - 14/01/25 11:02 PM Re: Check for 32 or 64 bit [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
had to change the GUID instr check to right() as it accepted security updates in it's original form.
_________________________
!

download KiXnet

Top
#208402 - 14/01/25 11:36 PM Re: Check for 32 or 64 bit [Re: Lonkero]
Allen Moderator Online   shocked
KiX Supporter
*****

Registered: 03/04/19
Posts: 4234
Loc: USA
Appeared to work for me under Win 8.
Top
#208403 - 14/01/25 11:36 PM Re: Check for 32 or 64 bit [Re: Lonkero]
ShaneEP Moderator Offline
MM club member
*****

Registered: 02/11/29
Posts: 1984
Loc: Tulsa, OK
I was thinking you would have to check on the first section as well. That's why it seemed so complicated. But I think skipping to the product ID portion works well.
Top
#208404 - 14/01/25 11:59 PM Re: Check for 32 or 64 bit [Re: ShaneEP]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
yea, I was thinking about that too but...
see this: http://support.microsoft.com/kb/2186281

we don't need to know if it is released version of RC or even beta. it still is office.
_________________________
!

download KiXnet

Top
#208405 - 14/01/27 01:06 AM Re: Check for 32 or 64 bit [Re: Lonkero]
ShaneEP Moderator Offline
MM club member
*****

Registered: 02/11/29
Posts: 1984
Loc: Tulsa, OK
Both the OfficeBitness() and OfficeVersion() returned correct value on Win 8.1 with Office Pro 2013 64-bit.
Top
#208406 - 14/01/27 02:48 AM Re: Check for 32 or 64 bit [Re: ShaneEP]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
awesome. thanks Shane.
_________________________
!

download KiXnet

Top
#208423 - 14/01/29 03:59 AM Re: Check for 32 or 64 bit [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 00/07/28
Posts: 11543
Loc: CA
Arg... boys and girls certainly by now you know how to run and check all that stuff as even BATCH can properly test for x64 and the correct folder.

Since Lonkero has already written a UDF for this I won't bother with the code but perhaps those with a bit of time might want to revisit batch and adjust for KiX coding.

Top
#208424 - 14/01/29 04:21 AM Re: Check for 32 or 64 bit [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
why won't you bother and show this boy/girl how to accomplish this with a batch.
_________________________
!

download KiXnet

Top
#208438 - 14/01/29 06:16 PM Re: Check for 32 or 64 bit [Re: Lonkero]
Allen Moderator Online   shocked
KiX Supporter
*****

Registered: 03/04/19
Posts: 4234
Loc: USA
Ha... +1
Top
#208440 - 14/01/30 04:18 AM Re: Check for 32 or 64 bit [Re: Allen]
NTDOC Administrator Offline
Administrator
*****

Registered: 00/07/28
Posts: 11543
Loc: CA
I missed Arend's post but yes essentially that -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=208377#Post208377

 Code:
pushd "%~dp0"
cd /d "%~dp0"
cls
@echo off
if not defined ProgramFiles(x86) goto x86
echo Basic check says we're on x64 64-bit so add some code to do something ...
goto eof
:x86
echo Basic check says we're on x86 32-bit so add some code to do something ...
goto eof
:eof
pause
popd

Top
#208441 - 14/01/30 04:19 PM Re: Check for 32 or 64 bit [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
that does not work if office install location is anything but default. so I am still waiting on this simple batch script that can do that.
_________________________
!

download KiXnet

Top
#208442 - 14/01/30 08:47 PM Re: Check for 32 or 64 bit [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 00/07/28
Posts: 11543
Loc: CA
I said a simple check for the folder not a more robust UDF that can check for Office version regardless of location.
Top
#208443 - 14/01/31 01:22 AM Re: Check for 32 or 64 bit [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 01/06/05
Posts: 22294
Loc: Claremore, OK
 Originally Posted By: NTDOC
Arg... boys and girls certainly by now you know how to run and check all that stuff as even BATCH can properly test for x64 and the correct folder.


I do not see comment about simple. I see you saying that even batch file can properly test for the CORRECT folder.

the whole point for the UDF was to get the CORRECT info, because no simpler way was presented.
and who would use a batch script that does not give correct information unless all conditions are met? it is more reliable to just guess which one it is.
_________________________
!

download KiXnet

Top
#208444 - 14/01/31 03:45 AM Re: Check for 32 or 64 bit [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 00/07/28
Posts: 11543
Loc: CA
never mind Lonk - lost in translation I suppose.
Top
#208446 - 14/01/31 09:00 AM Re: Check for 32 or 64 bit [Re: NTDOC]
Arend_ Moderator Offline
MM club member
*****

Registered: 05/01/17
Posts: 1815
Loc: Hilversum, The Netherlands
Ok, here you go then:
 Code:
@ECHO off
FOR /f "tokens=3" %%a IN ('reg query^
 "HKLM\Software\Microsoft\Office\14.0\Outlook" /v Bitness') DO (
    SET answer=%%a
) 
IF %answer%==x86 (
    GOTO :x86
) ELSE (
    GOTO :x64
)

:x86
MSG * Office 2010 is x86
GOTO :END

:x64
MSG * Office 2010 is x64
GOTO :END

:END
pause

You can add support for more office versions, this is just my proof of concept :P
I KNOW the x64 bit is not fool proof but I can't be bothered, this is a PoC like I said.

Top
#208447 - 14/01/31 05:09 PM Re: Check for 32 or 64 bit [Re: Arend_]
ShaneEP Moderator Offline
MM club member
*****

Registered: 02/11/29
Posts: 1984
Loc: Tulsa, OK
I tried that method at home Arend. Unfortunately it does not work if only office is installed without outlook. Which is the case on my home machine, and the key did not exist.
Top
#208449 - 14/01/31 06:26 PM Re: Check for 32 or 64 bit [Re: ShaneEP]
Arend_ Moderator Offline
MM club member
*****

Registered: 05/01/17
Posts: 1815
Loc: Hilversum, The Netherlands
Office without Outlook is not a proper Office product anyway :P
Besides, that reg key doesn't work for Office 2007 either...

Top
#208450 - 14/01/31 06:39 PM Re: Check for 32 or 64 bit [Re: Arend_]
ShaneEP Moderator Offline
MM club member
*****

Registered: 02/11/29
Posts: 1984
Loc: Tulsa, OK
This is just one of those issues, that seems like it should be a lot easier than it is. I've tried multiple methods and all of them seem to have holes. I think the GUID comparison method is as fool proof as it's going to get. Just another simple property that MS has made very difficult to find.
Top
#208451 - 14/01/31 06:43 PM Re: Check for 32 or 64 bit [Re: ShaneEP]
Arend_ Moderator Offline
MM club member
*****

Registered: 05/01/17
Posts: 1815
Loc: Hilversum, The Netherlands
Well not really as MS uses 0000000FF1CE for Exchange and SharePoint crap as well.
Granted you won't find those on Workstations very often but SharePoint explorer and other Client and SBS stuff you do...

Top
Page 3 of 4 <1234>


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Shawn) and 90 anonymous users online.
Newest Members
B1GHawkeyes, GeoHamm, register, Marcus_Dunne, stuvwx656262
17397 Registered Users

Generated in 0.168 seconds in which 0.12 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org