lesterhung Posted October 8, 2005 Share Posted October 8, 2005 i want a CMD code that can find specific literals in another cmd file. i needed this for my unattended program installation.eg. i want to replace the literal "%CDROM%" in a cmd file with "install"eg. of cmd code:the program should do the following:before the program execution:echoecho installing program xxxstart /wait %CDROM%\Install\xxx\xxx.xxxafter the program execution:echoecho installing program xxxstart /wait install\install\xxx\xxx.xxthanx a bunch Link to comment Share on other sites More sharing options...
hail_bird Posted October 24, 2005 Share Posted October 24, 2005 You couldset CDROM=installbefore calling the cmd. Link to comment Share on other sites More sharing options...
gunsmokingman Posted October 24, 2005 Share Posted October 24, 2005 Try this on my computer I get back this INSTALL\echo off && CLS && Mode 75,5 && Color F3 && Title Test CDROM Variblefor %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist %%i\SETUP.exe set CDROM=%%iset INSTALL=%CDROM%set Install=INSTALLecho %INSTALL%\pause Link to comment Share on other sites More sharing options...
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