small Problem [solved]
Posted: 28 Feb 2012 21:35
This is My Test Batch File:
This is a Batch That Make Another Batch
The firt Problem is:
the %ComSpec% always appear in the NewFile.bat As "C:\Windows\system32\cmd.exe" and the %temp% Appear as "C:\Users\Admin\AppData\Local\Temp"
is there away that make them appear as i wrote in the Main.bat
The second:
The Ping line when i end it with >nul the line dosn't appear and when i remove >nul it appear
and i want the entire line to be written in the file as in the code up there ... any one knows
thanks in advance
This is a Batch That Make Another Batch
Code: Select all
>Main.bat (
echo.@ECHO OFF
echo.CLS
echo.TITLE Test Batch
echo.START /max %ComSpec% /c "%Temp%\md5.exe"
echo.Ping localhost -n 1 -w 1 >nul
echo.EXIT
)
>>NewFile.bat
type NewFile.bat
The firt Problem is:
the %ComSpec% always appear in the NewFile.bat As "C:\Windows\system32\cmd.exe" and the %temp% Appear as "C:\Users\Admin\AppData\Local\Temp"
is there away that make them appear as i wrote in the Main.bat
The second:
The Ping line when i end it with >nul the line dosn't appear and when i remove >nul it appear
and i want the entire line to be written in the file as in the code up there ... any one knows
thanks in advance