Your Computer Name
From NSIS Wiki
Jump to navigationJump to search
Author: VegetaSan (talk, contrib) |
Updated: March 09th 2006 - Jamyn - Win95 compatibility
; Made By VegetaSan :) ; http://shurl.org/PFqgs (sorry VegetaSan, had to rewrite your URL to get around the filter) ; This script will detect your Computer Name OutFile "Your ComputerName.exe" Name "Your ComputerName" Caption "ComputerName" XPStyle "on" Function .onInit ReadRegStr $0 HKLM "System\CurrentControlSet\Control\ComputerName\ActiveComputerName" "ComputerName" StrCmp $0 "" win9x StrCpy $1 $0 4 3 MessageBox MB_OK "Your ComputerName : $0" Goto done win9x: ReadRegStr $0 HKLM "System\CurrentControlSet\Control\ComputerName\ComputerName" "ComputerName" StrCpy $1 $0 4 3 MessageBox MB_OK "Your ComputerName : $0" done: Quit ; placed here so we quit the installer; we dont need the other pages for this example. FunctionEnd Section "-boo" ; SectionEnd ; rest of script