Confirm 1.3 build: 9470 released: 2012-05-08 Prompts use to confirm some action in a BAT file.. Copyright: (c) 2012 Canadian Mind Products. C command line utility. Download from: http://mindprod.com/products1.html#CONFIRM ===> Free <=== Full source included. You may even include the source code, modified or unmodified in free/commercial open source/proprietary programs that you write and distribute. May be used freely for any purpose but military. For more details on this restriction, see http://mindprod.com/contact/nonmil.html If you include any Canadian Mind Products code in your own applications, your app too must be labeled non-military use only. All C source and EXE files code are included. ---- Prerequisites: This program runs under Microsoft Windows from the command line (e.g. Win2K/XP/Vista) ---- Installing on a PC: Download source and executable files to run on your own machine as a standalone utility. To install, extract the zip download with WinZip (or similar unzip utility) into any directory you please, often J:\ -- ticking off the "use folder names" option. ---- Installing on a MacIntosh: Use Safari to download source and executable files to run on your own machine as a standalone utility. The EXE files will not work. You will have to recompile, perhaps making minor changes to the source code. Safari will automatically unpack the zip into ~/Downloads (version 10.5) [or on the Desktop (version 10.4 and earlier)]. First install a recent Java JDK or JVM. See http://mindprod.com/jgloss/installingjava.html. You may optionally move the download tree to a permanent home. ---- Rebuilding: The zip already contains the necessary exe, so unless you modify the program, there is no need to recompile the source or recompile it. Configure.java basedir="E:/" in rebuild.xml to the drive where your files are and tweak rebuild.xml. Use ANT and rebuild.xml, not build.xml, to rebuild and link. ---- Use: CONFIRM Ask user for Yes/No confirmation, Used in a bat file to set errorlevel to 0 if user answers Y, or 1 if N. @echo off echo Do you really want to do this dangerous thing? confirm.com If ERRORLEVEL 1 GoTo NO GoTo YES Note, no parameters or messages go on the confirm command line itself. There are two versions included, both with source: ASSEMBLER version confirm.com that works in DOS/W3.1/W95/W98/Me/NT/W2K/XP/W2K3/Vista/W7-32 and a 32-bit C version confirm.exe that works in W95/W98/Me/NT/W2K/XP/W2K3/Vista/W7-32/W7-64 Use the confirm.com version except for Windows 7 64-bit. It is smaller and faster. However, the confirm.exe version also looks for SET confirm=y or SET confirm=n. If it sees it, the user does not need to key anything. It acts as if the user had hit the Y or N. ---- Version History: 1.2 2010-01-30 port the DOS assembler version 1.3 2012-05-08 allow CONFIRM=Y or CONFIRM=N set override. -30-