ipconfig plugin - mac address detection
Hi,
Not sure if I'm posting in the right place but I am trying to get a simple "ok" or error from my installer when using the IpConfig plugin. Code basically looks like this:
...
Function .onInit
;*** check MAC address - is this package for this computer? ***
IpConfig::GetNetworkAdapterIDFromMACAddress "MA:C :AD:RE:SS"
Pop $0
StrCmp $0 "ok" macOK noGoMAC
noGoMAC:
MessageBox MB_OK|MB_ICONSTOP "Unable to install - package not intended for your computer, contact support!."
MessageBox MB_OK $0
Abort
macOK:
...
I did copy the unicode plugin to the NSIS/plugins directory and the installer compiles w/o error but on my test computer, the noGoMAC fires regardless of the format that I use for the MAC address string. I have confirmed that it is the correct MAC for the internal NIC which according to the "route print" command should have an id of 2 (0x2) but the 2nd message box is returning what looks like a lower case "o" which doesn't make any sense to me.
Guess I'm missing something but not sure what - any thoughts? Thanks :weird: