Announcement

Collapse
No announcement yet.

adding computer name in the MUI_FINISHPAGE_RUN_PARAMETERS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • adding computer name in the MUI_FINISHPAGE_RUN_PARAMETERS

    i want to include computer name in the MUI_FINISHPAGE_RUN_PARAMETERS. I did the following,but it didn't work.(Below is only a part of the code).so please help me to do it.

    !define getpcname computername
    !define MUI_FINISHPAGE_RUN "$INSTDIR\Your ComputerName.exe"
    !define MUI_FINISHPAGE_RUN_PARAMETERS "nvt${compname}"

    Function computername
    ReadRegStr $0 HKLM "System\CurrentControlSet\Control\ComputerName\ActiveComputerName" "ComputerName"
    StrCmp $0 "" win9x
    StrCpy $1 $0 4 3
    MessageBox MB_OK "Your ComputerName : $0"
    StrCpy $compname $0
    Goto done
    win9x:
    ReadRegStr $0 HKLM "System\CurrentControlSet\Control\ComputerName\ComputerName" "ComputerName"
    StrCpy $1 $0 4 3
    MessageBox MB_OK "Your ComputerName : $0"
    StrCpy $compname $0
    done:
    FunctionEnd

  • #2
    !define MUI_FINISHPAGE_RUN_PARAMETERS "nvt${compname}"
    should probably be
    !define MUI_FINISHPAGE_RUN_PARAMETERS "nvt$compname"

    Also, you don't seem to be using your getpcname define.

    Comment


    • #3
      ...and you should call Kernel32::GetComputerName with the system plugin, not read undocumented registry values.
      IntOp $PostCount $PostCount + 1

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎