MSFN Forum: Simulated keystroke in DOS - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Simulated keystroke in DOS Rate Topic: -----

#1 User is offline   bullet 

  • Member
  • PipPip
  • Group: Members
  • Posts: 147
  • Joined: 28-October 04

Posted 30 October 2004 - 08:28 PM

I am trying to find a command that simulates pressing the "Enter" key. I have a network floppy disk that copies Win98 cabs from a network machine back to the local machine. Reboots and then starts setup.exe. Once setup starts I have to press the "Enter" key for it to continue. Not good for unattend. That is why I am looking for a command that I can insert that will do that for me. Anyone know the answer? Thanks :unsure:


#2 User is offline   oftentired 

  • Member
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 25-August 04

Posted 01 November 2004 - 10:38 AM

How are you starting setup?

#3 User is offline   IcemanND 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,239
  • Joined: 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 01 November 2004 - 11:12 AM

try this, create a text file containing only a carriage return, name it 'ENTER.TXT'

On the line where you run 'SETUP.EXE' change it to

SETUP.EXE <ENTER.TXT

This should work, but some programs will not take redirected text this way.

#4 User is offline   bullet 

  • Member
  • PipPip
  • Group: Members
  • Posts: 147
  • Joined: 28-October 04

Posted 02 November 2004 - 08:13 PM

Oftentired, I am starting setup by manually pressing the Enter key.

Thanks Iceman I will try your suggestion and let you know of the results.

#5 User is offline   bullet 

  • Member
  • PipPip
  • Group: Members
  • Posts: 147
  • Joined: 28-October 04

Posted 05 November 2004 - 12:54 PM

The Enter.txt method did not work. Worth a try though. :(

#6 User is offline   fantomcat 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 31-May 05

Posted 12 June 2005 - 03:00 PM

You could maybe make a batch file which executes it:

If you make a .bat file and call it 1.bat
and then inside it, type

Setup.exe

from here you could get you floppy to start the program, not the best idea, but maybe it will work, you also add other commands like


Setup.exe /id /is /iw :this would skip the scandisk and make you install alot faster - Just a suggestion, hope this helps, Steve

#7 User is offline   eidenk 

  • MSFN Addict
  • PipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 1,527
  • Joined: 28-March 05

Posted 12 June 2005 - 04:12 PM

Quote

I am trying to find a command that simulates pressing the "Enter" key.

Two freeware utils who can do that from within a batch file : LaunchKey and Send

This post has been edited by eidenk: 12 June 2005 - 04:47 PM


#8 User is offline   azagahl 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 489
  • Joined: 12-November 04

Posted 12 June 2005 - 06:37 PM

I am trying to find a command that simulates pressing the "Enter" key.

A few things come to mind:

1. From a batch file, you may be able to use this command

echo. | foobar

"echo." is a special command that submits a blank line. This only works if the program reads from standard input device (CON) and does not directly query the keyboard.

2. Try STUFFKEY.EXE, contained in the OzWoz utilities. Look for STUFFKEY here:
http://short.stop.ho...eesoft/misc.htm

3. Smart Boot Manager (latest version is 3.7.1 at sourceforge) installs to the boot sector of your hard disk and lets you choose which partition to boot up. It also lets you create duplicate boot "records" which consist of both a partiton choice PLUS keystrokes to buffer when booting it. For example you can define a "Safe Windows" which boots your Windows partition as usual but also stuffs an F5 keystroke.

4. XOSL boot manager will also let you stuff keys while booting. This boot manager is prettier than Smart Boot Manager, but in addition to using the boot sector it requires placing some small files in a DOS partition as well.

Good luck.

This post has been edited by azagahl: 13 June 2005 - 01:57 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy