View Single Post
  #38  
Old 12-30-2017, 01:00 PM
Sil is offline Sil
Sil's Avatar
Registered User

Join Date: Aug 2003
Posts: 102

Quote:
Originally Posted by stompem View Post
I tried your fix after all but had trouble getting it past security.

I managed to get it in with the following modification to the batch script.

Code:
@ECHO OFF
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto CallUAC
) else ( goto RunAsAdmin )
:CallUAC
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\runasadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\runasadmin.vbs"
    "%temp%\runasadmin.vbs"
    exit /B
:RunAsAdmin
    if exist "%temp%\runasadmin.vbs" ( del "%temp%\runasadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"

echo *****************************************************************************
echo *****************************************************************************
echo *****************************************************************************
echo This compatibility fix will get rid of the low swap file warning message
echo as well as remove the borders from the game windows in multiplayer...
echo Brought to you by Novahq.net (Special thanks to Silent for help with the sdb)
echo *****************************************************************************
echo *****************************************************************************
echo *****************************************************************************

:selection
set /P conf=Press I to Install or U to Uninstall. E to exit: 
if /I "%conf%" EQU "I" goto :install
if /I "%conf%" EQU "U" goto :uninstall
if /I "%conf%" EQU "E" goto :exitbat
goto :selection

:install

sdbinst.exe -q "%CD%\DF1.sdb"

echo Database Installed! Press any key to exit...
pause 
exit

:uninstall

sdbinst.exe -u -q "%CD%\DF1.sdb"

echo Database Uninstalled! Press any key to exit...
pause 
exit

:exitbat
exit
Continued...

I managed to turn the editor on OK but it failed to save any edits and it failed to open again the second time.
Doh, that's the wrong script that's the script from df1.sdb install, I dropped the wrong one in when reuploaded, apologies.

MED Fix Test - Corrected bat

It's probably not installed the MedFix.sdb as it is trying to install df1.sdb, can confirm that it is installed correctly by looking in Apps and Features/Programs and Features for MED.

Script should read:

@ECHO OFF

echo ************************************************** ***************************
echo ************************************************** ***************************
echo ************************************************** ***************************
echo Compatibility fix (test) for dfbhdmedv205c by Sil
echo ************************************************** ***************************
echo ************************************************** ***************************
echo ************************************************** ***************************


:selection
set /P conf=Press I to Install or U to Uninstall. E to exit:
if /I "%conf%" EQU "I" goto :install
if /I "%conf%" EQU "U" goto :uninstall
if /I "%conf%" EQU "E" goto :exitbat
goto :selection

:install

sdbinst.exe -q "%CD%\MedFix.sdb"

echo Database Installed! Press any key to exit...
pause
exit

:uninstall

sdbinst.exe -u -q "%CD%\MedFix.sdb"

echo Database Uninstalled! Press any key to exit...
pause
exit

:exitbat
exit
__________________

Last edited by Sil; 12-30-2017 at 01:25 PM.
Reply With Quote