pthomass Posted August 17, 2005 Report Share Posted August 17, 2005 Hi,I made a batch file that I put in a WinZip self extractor. The idea is that the zip-file extracts to a folder, and then the bat file gets executed. It copies files to "C:\Program Files\ShutdownForUPS" "%UserProfile%\Start Menu\Shutdown For UPS"and to "%Windir%\System32After that it needs to delete the original files that the zip-file extracted. I do this by first deleting the files in all folders and subfolders and then deleting the folders itself.Afterwards I CALL a Readme file, and that is where the problem is. When the ReadMe file is called, the DOS window remains in the background. Only when I close the file, the DOS window closes (end of Bat file).Is it possible to close the DOS window without closing the Readme file?Is it also possible to delete the bat file automatically when all is executed???Here is the bat fileset currentdir=%cd%mkdir "c:\Program Files\ShutdownForUPS"copy %currentdir%\shutdownforups\shutdownforups.exe "C:\Program Files\ShutdownForUPS"copy %currentdir%\shutdownforups\shutdown.bat "C:\Program Files\ShutdownForUPS"copy %currentdir%\shutdownforups\stop.bat "C:\Program Files\ShutdownForUPS"copy %currentdir%\shutdownforups\ReadMe.txt "C:\Program Files\ShutdownForUPS"copy %currentdir%\shutdownforups\shutdown.exe %Windir%\System32copy %currentdir%\shutdownforups\richtx32.ocx %Windir%\System32mkdir "%UserProfile%\Menu Start\Programma's\ShutdownForUPS"copy %currentdir%\shutdownforups\StartMenu\ShutdownForUPS.lnk "%UserProfile%\Menu Start\Programma's\ShutdownForUPS"rem Call "C:\Program Files\ShutdownForUPS\ReadMe.txtdel %currentdir%\ShutdownForUPS\StartMenu /f /qdel %currentdir%\ShutdownForUPS /f /qrd %currentdir%\ShutdownForUPS\StartMenurd %currentdir%\ShutdownForUPSThanks in advance Quote Link to comment Share on other sites More sharing options...
Scarecrow Man Posted August 17, 2005 Report Share Posted August 17, 2005 Perhaps add a line that asks the user for the next input after the readme. Like finish. Unless there is another command you want to issue after readme.like rem What would you like to do next?option 1 endoption 2 call readme.txtThe code is not exact, but the general idea is the same. Quote Link to comment Share on other sites More sharing options...
DavisMcCarn Posted August 17, 2005 Report Share Posted August 17, 2005 Lose the "Call" in front of the txt file. It is keeping the batch file from moving on. Quote Link to comment Share on other sites More sharing options...
pthomass Posted August 18, 2005 Author Report Share Posted August 18, 2005 Lose the "Call" in front of the txt file. It is keeping the batch file from moving on.Didn't work. Notepad opened but the DOS window still stayed open. Quote Link to comment Share on other sites More sharing options...
pthomass Posted August 18, 2005 Author Report Share Posted August 18, 2005 Solved itStart "" "C:\Temp\ReadMe.txt" Quote Link to comment Share on other sites More sharing options...
DavisMcCarn Posted August 18, 2005 Report Share Posted August 18, 2005 Geeze, you just trashed my antique MS-Dos 5.0 reference manual, which was the last one published with decent command details!As a note; though, Start won't work on Win9x/ME. Quote Link to comment Share on other sites More sharing options...
pthomass Posted August 18, 2005 Author Report Share Posted August 18, 2005 Lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.