November 3, 200421 yr Hi all!I have a little "problem", I would like to hide a batch file then at some moment in it, unhide it. i Explain:I created a shortcut which starts minimized, ok.at the end of the launched cmd file, I would like to start another one but àat this time unhided..cmd number one: (minimised)[some code]::I triedcall %systemdrive%\temp\restard.cmd::oR%systemdrive%\temp\restard.lnk (normal windowed link which launches restart.cmd)but this doesn't work.This is to remotely install some software, and then at the end of installation, ask the user to restart or not.cmd number two (restart.cmd): (should be visible)[some code]:shutdownset choice=SET /P choice=Etes-vous sur(e) d'avoir sauvegard‚ tous vos documents ouverts? (o/n) if not '%choice%'=='' set choice=%choice:~0,5%if '%choice%'=='n' goto exitif '%choice%'=='o' goto shutdown1if '%choice%'=='N' goto exitif '%choice%'=='O' goto shutdown1ECHO "%choice%" n'est pas une entr‚e valide, r‚essayez SVP.ECHO.pauseGOTO shutdownshutdown1call "%SYSTEMROOT%\system32\shutdown.exe" -r 4:exitis this possible?NB: If this can help, I'm working on W2k.
November 3, 200421 yr Try this.cmd number onerem your code herestart %systemdrive%\temp\restart.cmdexit.cmd number two (restart.cmd)rem your code here:shutdownset choice=""SET /P choice= (o/n)if /i not "%choice%"=="o" goto exit:shutdown1start "%SYSTEMROOT%\system32\shutdown.exe" -r 4:exitexit
November 4, 200421 yr Author hi!the "start %systemdrive%\temp\restart.cmd" was enough!thx a lot!I used the call function or just %systemdrive%\temp\restart.cmd, which didn't work.I think I have plenty of things to learn about batch files ;-)It works perfectly (will retry to be sure ;-) )
Create an account or sign in to comment