VirtualBox

Changeset 106964 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Nov 12, 2024 3:33:37 PM (2 months ago)
Author:
vboxsync
Message:

Windows Guest Additions installer: Got rid of RegCleanup.exe by embedding those two lines into VBoxGuestInstallHelper.exe. bugref:10799

Location:
trunk/src/VBox/Additions/WINNT/Installer
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/VBoxGuestInstallHelper.cpp

    r106910 r106964  
    22312231}
    22322232
     2233/** Handles 'nt4 installcleanup'. */
     2234static int handleNT4InstallCleanup(unsigned cArgs, wchar_t **papwszArgs)
     2235{
     2236    RT_NOREF(cArgs, papwszArgs);
     2237
     2238    OSVERSIONINFOW VerInfo = { sizeof(VerInfo), 0 };
     2239    GetVersionExW(&VerInfo);
     2240    if (   VerInfo.dwPlatformId   != VER_PLATFORM_WIN32_NT
     2241        || VerInfo.dwMajorVersion != 4)
     2242    {
     2243        return ErrorMsg("This command only runs on NT4.");
     2244    }
     2245
     2246    /*
     2247     * Deletes the "InvalidDisplay" key which causes the display
     2248     * applet to be started on every boot. For some reason this key
     2249     * isn't removed after setting the proper resolution and even not when
     2250     * doing a driver re-install.
     2251     */
     2252    RegDeleteKeyW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\GraphicsDrivers\\InvalidDisplay");
     2253    RegDeleteKeyW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\GraphicsDrivers\\NewDisplay");
     2254
     2255    return EXIT_OK;
     2256}
    22332257
    22342258/** Handles 'version' and its aliases. */
     
    22762300             "        [position [dup|no-dup]]\r\n"
    22772301             "    VBoxGuestInstallHelper registry dellistitem <root> <sub-key> <value-name> <to-remove>\r\n"
     2302             "NT4:\r\n"
     2303             "    VBoxGuestInstallHelper nt4 installcleanup\r\n"
    22782304             "\r\n"
    22792305             "Standard options:\r\n"
     
    23082334        { "netprovider",    "add",                  1,  2, handleNetProviderAdd },
    23092335        { "netprovider",    "remove",               1,  2, handleNetProviderRemove },
     2336        { "nt4",            "installcleanup",       0,  0, handleNT4InstallCleanup },
    23102337        { "registry",       "addlistitem",          4,  6, handleRegistryAddListItem },
    23112338        { "registry",       "dellistitem",          4,  4, handleRegistryDelListItem },
  • trunk/src/VBox/Additions/WINNT/Installer/Makefile.kmk

    r106940 r106964  
    4949 TOOL_ZIP_PACK ?= zip
    5050endif
    51 
    52 
    53 #
    54 # RegCleanup - A NT4 post-install registry cleanup helper preventing the
    55 #              display config dialog from popping up on subsequent reboots.
    56 #
    57 PROGRAMS += RegCleanup
    58 RegCleanup_TEMPLATE     := VBoxGuestR3Exe
    59 if1of ($(KBUILD_TARGET_ARCH), amd64)
    60  RegCleanup_BLD_TRG_ARCH := x86
    61 endif
    62 RegCleanup_DEFS         := _WIN32_WINNT=0x0400
    63 RegCleanup_SOURCES      := \
    64         RegCleanup.cpp \
    65         RegCleanup.rc
    66 RegCleanup_VBOX_IMPORT_CHECKER.win.x86 := nt4
    6751
    6852
     
    204188VBOX_WINDOWS_ADDITIONS_OTHER_FILES := \
    205189        $(PATH_STAGE_BIN)/additions/VBoxService.exe \
    206         $(PATH_STAGE_BIN)/additions/VBoxHook.dll \
    207         $(PATH_STAGE_BIN)/additions/RegCleanup.exe \
     190        $(PATH_STAGE_BIN)/additions/VBoxHook.dll
    208191        $(PATH_STAGE_BIN)/additions/VBoxDrvInst.exe
    209192
     
    424407endif # VBOX_WIN_ATTESTATION_SIGNING && VBOX_SIGNING_MODE && VBOX_SIGN_ADDITIONS
    425408
    426 
    427 #
     409#
     410
    428411# Repackaging scripts and files.
    429412#
     
    521504
    522505include $(FILE_KBUILD_SUB_FOOTER)
    523 
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh

    r106962 r106964  
    242242!ifdef VBOX_WITH_ADDITIONS_SHIPPING_AUDIO_TEST
    243243  FILE "$%PATH_OUT%\bin\additions\VBoxAudioTest.exe"
    244 !endif
    245 
    246 !if $%KBUILD_TARGET_ARCH% == "x86"
    247   SetOutPath "$0\Tools\NT4"
    248   FILE "$%PATH_OUT%\bin\additions\RegCleanup.exe"
    249244!endif
    250245
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsNT4.nsh

    r106896 r106964  
    123123
    124124  SetOutPath "$INSTDIR"
    125   FILE "$%PATH_OUT%\bin\additions\RegCleanup.exe"
    126   AccessControl::SetOnFile "$INSTDIR\RegCleanup.exe" "(BU)" "GenericRead"
     125  FILE "$%PATH_OUT%\bin\additions\GuestInstallHelper.exe"
     126  AccessControl::SetOnFile "$INSTDIR\GuestInstallHelper.exe" "(BU)" "GenericRead"
    127127!ifdef VBOX_WITH_ADDITIONS_SHIPPING_AUDIO_TEST
    128128  FILE "$%PATH_OUT%\bin\additions\VBoxAudioTest.exe"
     
    208208
    209209  ; This removes the flag "new display driver installed on the next bootup
    210   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "VBoxGuestInst" '"$INSTDIR\RegCleanup.exe"'
     210  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "VBoxGuestInst" '"$INSTDIR\VBoxGuestInstallHelper.exe" nt4 installcleanup'
    211211
    212212  Call NT4_SaveMouseDriverInfo
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette