VirtualBox

Changeset 51572 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jun 7, 2014 7:25:04 PM (11 years ago)
Author:
vboxsync
Message:

comregister.cmd: don't install the proxy stub on XP and W2K3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/win/comregister.cmd

    r49911 r51572  
    9191cd "%_SCRIPT_CURDIR%"
    9292
     93REM
     94REM Check for 64-bitness.
     95REM
     96set fIs64BitWindows=0
     97if not "%ProgramW6432%x"      == "x" set fIs64BitWindows=1
     98if not "%ProgramFiles(x86)%x" == "x" set fIs64BitWindows=1
     99
     100REM
     101REM Figure out the Windows version as the proxy stub requires 6.0 or later (at least for 64-bit).
     102REM
     103set WinVer=Version 4.0.1381
     104set WinVerMajor=4
     105set WinVerMinor=0
     106set WinVerBuild=1381
     107for /f "tokens=2 delims=[]" %%a in ('ver') do set WinVer=%%a
     108for /f "tokens=2,3,4 delims=. " %%a in ("%WinVer%") do (
     109    set WinVerMajor=%%a
     110    set WinVerMinor=%%b
     111    set WinVerBuild=%%c
     112)
     113REM echo WinVerMajor=%WinVerMajor% WinVerMinor=%WinVerMinor% WinVerBuild=%WinVerBuild%  WinVer=%WinVer%
     114
     115REM
     116REM Parse arguments.
     117REM
     118set fNoProxy=0
     119if "%WinVerMajor%" LSS "6" set fNoProxy=1
     120set fUninstallOnly=0
     121
     122:arg_loop
     123if "%1x" == "x"             goto arg_done
     124
     125if "%1" == "-u"             goto arg_uninstall
     126if "%1" == "--uninstall"    goto arg_uninstall
     127if "%1" == "--proxy"        goto arg_proxy
     128if "%1" == "--no-proxy"     goto arg_no_proxy
     129echo syntax error: Unknown option %1
     130echo usage: comregister.cmd [-u,--uninstall] [--no-proxy] [--proxy]
     131goto end
     132
     133:arg_uninstall
     134set fUninstallOnly=1
     135goto arg_next
     136
     137:arg_proxy
     138set fNoProxy=0
     139goto arg_next
     140
     141:arg_no_proxy
     142set fNoProxy=1
     143goto arg_next
     144
     145:arg_next
     146shift
     147goto arg_loop
     148:arg_done
    93149
    94150REM
    95151REM Do the registrations.
    96152REM
    97 if "%ProgramW6432%x" == "x" goto register_x86
    98 goto register_amd64
     153@if %fIs64BitWindows% == 1 goto register_amd64
    99154
    100155:register_x86
     
    102157%_VBOX_DIR%VBoxSVC.exe /UnregServer
    103158regsvr32 /s /u %_VBOX_DIR%VBoxC.dll
    104 if exist %_VBOX_DIR%VBoxProxyStub.dll     %windir%\system32\regsvr32 /s /u %_VBOX_DIR%VBoxProxyStub.dll
    105 @if "%1" == "-u" goto end
     159%windir%\system32\regsvr32 /s /u %_VBOX_DIR%VBoxProxyStub.dll
     160@if %fUninstallOnly% == 1 goto end
    106161%_VBOX_DIR%VBoxSVC.exe /RegServer
    107162regsvr32 /s    %_VBOX_DIR%VBoxC.dll
    108 @if "%1" == "--no-proxy" goto end
     163@if %fNoProxy% == 1 goto end
    109164if exist %_VBOX_DIR%VBoxProxyStub.dll     %windir%\system32\regsvr32 /s %_VBOX_DIR%VBoxProxyStub.dll
    110165@echo off
     
    117172%windir%\syswow64\regsvr32 /s /u %_VBOX_DIR%x86\VBoxClient-x86.dll
    118173%windir%\system32\regsvr32 /s /u %_VBOX_DIR%VBoxC.dll
    119 if exist %_VBOX_DIR%VBoxProxyStub.dll     %windir%\system32\regsvr32 /s /u %_VBOX_DIR%VBoxProxyStub.dll
    120 if exist %_VBOX_DIR%VBoxProxyStub-x86.dll %windir%\system32\regsvr32 /s /u %_VBOX_DIR%VBoxProxyStub-x86.dll
    121 @if "%1" == "-u" goto end
     174%windir%\system32\regsvr32 /s /u %_VBOX_DIR%VBoxProxyStub.dll
     175%windir%\system32\regsvr32 /s /u %_VBOX_DIR%VBoxProxyStub-x86.dll
     176@if %fUninstallOnly% == 1 goto end
    122177%_VBOX_DIR%VBoxSVC.exe /RegServer
    123178%windir%\system32\regsvr32 /s    %_VBOX_DIR%VBoxC.dll
    124179%windir%\syswow64\regsvr32 /s    %_VBOX_DIR%x86\VBoxClient-x86.dll
    125 @if "%1" == "--no-proxy" goto end
     180@if %fNoProxy% == 1 goto end
    126181if exist %_VBOX_DIR%VBoxProxyStub.dll     %windir%\system32\regsvr32 /s %_VBOX_DIR%VBoxProxyStub.dll
    127182if exist %_VBOX_DIR%VBoxProxyStub-x86.dll %windir%\system32\regsvr32 /s %_VBOX_DIR%VBoxProxyStub-x86.dll
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