Path: utzoo!attcan!uunet!know!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!dali.cs.montana.edu!milton!unicorn!n8541751 From: n8541751@unicorn.wwu.edu (Where there is darkness, light) Newsgroups: comp.os.msdos.programmer Subject: Re: Using DOS to create a logon Message-ID: <1990Oct23.080558.5698@unicorn.wwu.edu> Date: 23 Oct 90 08:05:58 GMT References: <1990Oct23.010706.21750@ux1.cso.uiuc.edu> Organization: Monkey Tree Computer Services Lines: 33 jad43082@uxa.cso.uiuc.edu (Jason Arthur DeHaan) writes: >... command prompts the user to "Enter new time". I've hidden this and >issued a "Press RETURN to continue" command to the user, but this is both >annoying and dangerous. Is there any way to include control commands (such >as ^M) in the batch file. When I try to do this, the computer executes the >command immediately, but does not store one in the batch file. You can do this by redirecting both the input and output for the time command, like this: time >when.rec Then create a file called testfile.doc that just has a cr/lf combination inside it, and nothing else. The time will be concatenated to when.rec. The effect will be the same as if the user had pushed return, and nothing will show on the screen, provided the echo off command has been used previously in the batch file. You could also make the file from which input is redirected be a hidden file and things will work the same. Incidentally, you are probably better off writing a program in C or some other language and calling it from your autoexec.bat file to do this, batch files by themselves aren't particularly well-suited to this application. Hope this helps... -- Kriston M. Bruland | . . . . . . . . . . n8541751@unicorn.wwu.edu | . . . . . . . . . 8541751@nessie.wwu.edu | . . . . . .