Old 23rd October 2008, 13:04   #1
kevinNCSU
Junior Member
 
Join Date: Oct 2008
Posts: 4
Check wether AMD64 or Itanium 64bit processor

Is there a simple method for checking whether a system is running AMD64 or Itanium64 bit processors? The reason is I have a DLL for logging to the windows event log but there are three separate DLL's. 32bit, AMD64, and Itanium64.

I know how to check if the system is 32 or 64 bit, but need help how to check whether it's AMD64 or Itanium64.
kevinNCSU is offline   Reply With Quote
Old 23rd October 2008, 14:04   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
call GetNativeSystemInfo with the system plugin

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 23rd October 2008, 15:36   #3
kevinNCSU
Junior Member
 
Join Date: Oct 2008
Posts: 4
Thanks for quick reply and getting me on the right Path Anders. I can see all the pieces of the puzzle now but I'm having a little trouble putting them together.

I've looked at the wiki for getting the disk serial number: Wiki: Get disk Volume Serial Number

And I realize I want to use the GetNativeSystemInfo in the same way but I'm unsure how to define the variable and the system call like seen there to get what I want out. Could you point me to an example or resources that will help me with figuring this out?
kevinNCSU is offline   Reply With Quote
Old 23rd October 2008, 16:35   #4
kevinNCSU
Junior Member
 
Join Date: Oct 2008
Posts: 4
So to make things clearer I know I need to get the wProcessorArchitecture member out of SystemInfo using the system plugin but I don't understand how to make the call and access the value of that member.
kevinNCSU is offline   Reply With Quote
Old 23rd October 2008, 16:46   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
PHP Code:
!include WinVer.nsh
${If} ${AtLeastWinXP}
    
System::Alloc 36
    pop 
$0
    
${If} $<> 0
        System
::Call 'kernel32::GetNativeSystemInfo(i $0)'
        
System::Call "*$0(&i2.r1)"
        
MessageBox mb_ok wProcessorArchitecture=$1
        System
::Free $0
    
${EndIf}
${EndIf} 

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 23rd October 2008, 17:03   #6
kevinNCSU
Junior Member
 
Join Date: Oct 2008
Posts: 4
That worked, thank you so much Anders! =)
kevinNCSU is offline   Reply With Quote
Old 10th November 2008, 15:32   #7
dusal
Junior Member
 
Join Date: Nov 2008
Location: Ulaanbaatar, Mongolia
Posts: 3
How to i386, ia64, amd64, wow64 separate file copy?

Hello. Please help me. I'm newbee.

I have i386, ia64, amd64, wow64 separate dll files. How can I choose and copy files to system folder?
Can I use it like this?

PHP Code:
SetOutPath "$SYSDIR\"
if (
$processor==ia64) { File "ia64\kbdmon.dll" }
elseif (
$processor==amd64) { File "amd64\kbdmon.dll" }
elseif (
$processor==wow64) { File "wow64\kbdmon.dll" }
else { File "
i386\kbdmon.dll" } 
If yes please help me how to I write in my *.nsi file. I don't know much about programming language. Please help me.

thank you.
dusal is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump