Skip to content
⌘ NSIS Forum Archive

Get machine IP (without the ";")

2 posts

kelvlam#

Get machine IP (without the ";")

I searched the forums and already using the ip.dll already. But whenever I do this:
CallInstDll ip.dll get_ip
Pop $0

I get a string saying "xxx.xxx.xxx.xxx;" with the semi colon at the end. I haven't found any function and just don't know how I can strip that semi colon at the end of the string. Anyone know how?
banaman8d#
You strip the semicolon using the StrCpy function:

; This strips the last letter off the end of $R0
StrCpy $R0 "192.168.0.2;" -1 ;$R0 now contains '192.168.0.2'