if "%1" == "/DEL" echo Error while deleting Myself!
if "%1" == "/DEL" goto PrgEnde
rem NTs CMD scheint die Syntax aller IFs einer Zeile sofort zu prⁿfen
rem damit gibt's 'nen Fehler, wenn %2 leer ist.
if "%1" == "/CP" if not "%2" == "" command /C if exist %2 del %2
if "%1" == "/CP" if not "%2" == "" copy %INFNAme% %2
rem @if "%1" == "/CP" pause
if "%1" == "/CP" if not "%2" == "" %2 /INI ReRunInf %2 %3 %4 %5 %6 %7 %8 %9
if "%1" == "/CP" echo Error while Moving and Executing myself!
if "%1" == "/CP" goto PrgEnde
echo Verarbeite Sektion %1 ...
call %INFNAme% /INI ExecSection %1
rem if "%OS%" == "Windows_NT" call %INFNAme% /INI ExecSection %1
rem if not "%OS%" == "Windows_NT" call %INFNAme% /INI ExecSection %1
shift
if not "%1" == "" goto argLoop
echo.
echo Fertig!.
echo.
if exist %tmpregfil% del %tmpregfil%
goto PrgEnde
rem Library functions
rem --------------------
:SetTempVar
rem create an unique tempfile-name
rem ----------------------------------
set tmpregfil=%TEMP%\ahwbii-ihkgjfdwn97hhfrb.bat
if exist %tmpregfil% del %tmpregfil%
goto PrgEnde
:ReRunInf
rem after /CP - Switch!
shift
shift
shift
goto PreinitInf
:ExecSection
rem Since INF-INTERPRETERS don't accept Quotation marks when Specifiying the Scriptname, a cryptic INF name must
rem be defined in a Variable, and not in command line. You may avoid troubles by running this program using the
rem 'start' command. The Variable for the INF-Name is INFName. If it's empty, %0 is used instead.
rem note: Win98 requires always a complete Pathname, for NT, it might be enough, to prepend a .\, Win95 instead rem seems to accept relative Pathnames???
rem the subs InitINF and InitINFWindows_NT will set the INFNAME-Variable
if "%INFNAme%" == "" if "%OS%" == "Windows_NT" start /wait rundll32.exe setupapi,InstallHinfSection %3 132 %0
if "%INFNAme%" == "" if not "%OS%" == "Windows_NT" start /wait rundll32.exe setupx.dll,InstallHinfSection %3 132 .\%0
if not "%INFNAme%" == "" if "%OS%" == "Windows_NT" start /wait rundll32.exe setupapi,InstallHinfSection %3 132 %INFNAME%
if not "%INFNAme%" == "" if not "%OS%" == "Windows_NT" start /wait rundll32.exe setupx.dll,InstallHinfSection %3 132 %INFNAME%
goto PrgEnde
:INITINFWindows_NT
rem NTINF (setupapi) accepts .\filename instead of absolute pathnames.
rem NT-Absolute Pathname (bezieht sich auf diese Datei %0)
rem Achtung: halbabsolute Dateiangaben der Art 'C:Verz1\Datei' oder
rem '\Verz2\Datei2' werden z.Zt. nicht behandelt. Notwendig entweder:
rem nur 'Datei3' oder 'verz3\Datei4' oder 'C:\Verz5\datei6' .
rem
rem -------------------------------------------------------------------
echo.%0 | find ":\" > nul
set INFNAme=%0
if errorlevel 1 if not exist %0 if not exist %0.bat if exist %0.cmd set INFNAme=.\%0.cmd
if errorlevel 1 if not exist %0 if exist %0.bat set INFNAme=.\%0.bat
if errorlevel 1 if exist %0 set INFNAme=.\%0
if not errorlevel 1 if not exist %0 if not exist %0.bat if exist %0.cmd set INFNAme=%0.cmd
if not errorlevel 1 if not exist %0 if exist %0.bat set INFNAme=%0.bat
if not errorlevel 1 if exist %0 set INFNAme=%0
goto :EOF
:InitINF
rem some INF interpreters require to give the full Pathname of the Script in commandline. The start command will
rem help.
rem That doesn't work on NT: getting the full path name using the start %0 command!
rem
rem Note: If a '.PIF' file with the same Name(shortname???) is located in the same
rem directory, and it has unset the setting 'Close after finishing' (or similiar)
rem that doesnt matter, since 'exit' is used. The program will not wait, until the other window one was closed
rem manually!!!
rem
rem Routine DestVar Tempfile
rem The Scriptname, given in %0 should not exceed 120 Bytes in length (so '/INI FN' will fit within the 127 Bytes Limit when calling batches from 'start')
rem if not exist %0 if not exist %0.bat if exist %0.cmd start /wait /min %0.cmd /INI FullName FullName %tmpregfil%
rem if not exist %0 if exist %0.bat start /wait /min %0.bat /INI FullName FullName %tmpregfil%
rem if exist %0 start /wait /min %0 /INI FullName FullName %tmpregfil%
if not exist %0 if not exist %0.bat if exist %0.cmd start /wait /min %0.cmd /INI FN
if not exist %0 if exist %0.bat start /wait /min %0.bat /INI FN
if exist %0 start /wait /min %0 /INI FN
call %tmpregfil%
set INFNAme=%FullName%
goto PrgEnde
:FullName
echo set %3=%0>%4
exit
goto PrgEnde
:FN
rem nur Win9x!!!!(NT unterstⁿtzt nicht switch /E:)
rem Fullname fⁿr selbstaufrufe(erm÷glicht kⁿrzere Kommandozeile)
rem Kein Umgebungsspeicher zum setzen von tempregfil.
echo set FullName=%0| %comspec% /E:3000 /C %0 /INI FilterTemp "FullName"
exit
goto PrgEnde
:FilterTemp
rem leitet Daten gemΣ▀ Argument %3 in die in Settempvar definierte Datei
Call %0 /INI settempVar
find /I %3 > %tmpregfil%
exit
goto PrgEnde
:DeleteMe
echo.
echo Fertig!
if exist %tmpregfil% del %tmpregfil%
echo.Programm löscht sich selbst!
if not "%OS%" == "Windows_NT" ctty nul
rem um unter NT die folgende Fehlermeldung auszublenden, sollte das Script per
rem CMD /C ...bat 2.GT.nul gestartet werden!
if not exist %0 if not exist %0.bat if exist %0.cmd del %0.cmd
if not exist %0 if exist %0.bat del %0.bat
if exist %0 del %0
goto PrgEnde
rem ------------------------------------------------------------
rem Error Messages
rem ------------------------------------------------------------
:WrongDirError
echo.
echo.
echo.
echo.Die Musterdatei 'GoLive_4.0_D179.new' konnte im aktuellen Verzeichnis nicht gefunden werden.
echo.Diese Datei gehört zu diesem Crack und muß im selben Ordner wie dieses Programm
echo.gespeichert werden.
echo.Wechsele in das Verzeichnis und starte dieses Programm erneut.
echo.Aktuelles Verzeichnis ist:
cd
echo.
if not "%OS%" == "Windows_NT" pause
goto ende
:WinError
echo.
echo.
echo.
echo. Dieses Programm benötigt mindestens Windows95/WindowsNT .
echo.
echo.
echo. This program requires at least Windows 95/98 or