kevinNCSU
23rd October 2008 14:04 UTC
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.
Anders
23rd October 2008 15:04 UTC
call GetNativeSystemInfo with the system plugin
kevinNCSU
23rd October 2008 16:36 UTC
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
23rd October 2008 17:35 UTC
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.
Anders
23rd October 2008 17:46 UTC
!include WinVer.nsh
>${If} ${AtLeastWinXP}
System::Alloc 36
pop$0
${If} $0 <> 0
System::Call 'kernel32::GetNativeSystemInfo(i $0)'
System::Call "*$0(&i2.r1)"
MessageBox mb_ok wProcessorArchitecture=$1
System::Free $0
${EndIf}
${EndIf}
kevinNCSU
23rd October 2008 18:03 UTC
That worked, thank you so much Anders! =)
dusal
10th November 2008 16:32 UTC
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?
SetOutPath "$SYSDIR\"
if ($processor==ia64) { File "
ia64kbdmon.dll" }
elseif ($processor==amd64) { File "amd64kbdmon.dll" }
elseif ($processor==wow64) { File "wow64kbdmon.dll" }
else { File "i386kbdmon.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.