SiMoNsAyS Posted August 24, 2004 Posted August 24, 2004 i have asked this question on another thread, does anyone know how to hide the incoming ping cmd window??
evilvoice Posted August 24, 2004 Author Posted August 24, 2004 well to take this batch again and this should workTITLE WindowToClose( ECHO CMDOW.EXE @ /HID ECHO ping -n 120 127.0.0.1 ^>nul ECHO CMDOW.EXE WindowToClose /CLS ECHO EXIT) > %WINDIR%\CLOSE.CMDcall common.cmdIf /I %computername%==Computer GOTO Comp1 ELSE GOTO Comp2:Comp1call Comp1.cmdGOTO END:Comp2call Comp2.cmdGOTO END:ENDSTART %WINDIR%\CLOSE.CMDset /p Install="For a 2cd setup, Press Y"If %Install%==Y CALL 2cd.cmdECHO DoneEXIT
sleepnmojo Posted August 24, 2004 Posted August 24, 2004 Sorry I missed some things cause I didn't check it. You also need the ^ for the & symbol too, and double %% for variables. As for your error message, that is because you are deleting the file, but you still haven't exited. You can solve this with and & statement.TITLE WindowToClose( ECHO CMDOW.EXE @ /HID ECHO setlocal ENABLEEXTENSIONS ^& set n=120 ECHO ping -n %%n%% 127.0.0.1 ^>nul ECHO CMDOW.EXE WindowToClose /CLS ECHO endlocal ECHO DEL /F /Q CLOSE.CMD ^& EXIT) > %WINDIR%\CLOSE.CMDcall common.cmdIf /I %computername%==Computer GOTO Comp1 ELSE GOTO Comp2:Comp1call Comp1.cmdGOTO END:Comp2call Comp2.cmdGOTO END:ENDSTART %WINDIR%\CLOSE.CMDset /p Install="For a 2cd setup, Press Y"If %Install%==Y CALL 2cd.cmdECHO Done
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now