PC Review


Reply
Thread Tools Rate Thread

Creating a prompt in a batch file

 
 
Thanatos
Guest
Posts: n/a
 
      6th Oct 2003
I need to run a batch file at startup that will display a prompt for 1
minute, then close. I've made the script wait by using sleep.exe in the
win2003 resource kit, but how do i create a prompt in a batch file?


 
Reply With Quote
 
 
 
 
Thanatos
Guest
Posts: n/a
 
      6th Oct 2003

"Bill Stewart" <(E-Mail Removed)_spam.com> wrote in message
news:#(E-Mail Removed)...
> Thanatos <(E-Mail Removed)> wrote:
>
> > I need to run a batch file at startup that will display a prompt for 1
> > minute, then close. I've made the script wait by using sleep.exe in the
> > win2003 resource kit, but how do i create a prompt in a batch file?

>
> If I understand your question...
>
> @echo off
> echo Here's your prompt.
> sleep whatever
>
> HTH,
>
> Bill
>


Sorry, i don't think you understood me. I'd like to have a batch file run,
that displays a prompt for two minutes where the user can type commands, but
the window must close after two minutes. With sleep.exe, the script waits,
but does not display a prompt.


 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      6th Oct 2003
What kind of prompt? I've done nonsense like this before:



@echo off
color E0
@echo.
@echo.
@echo.
@echo.
@echo ***************************************
@echo * *
@echo * *
@echo * Hi end-user. Process running. *
@echo * *
@echo * *
@echo ***************************************
@echo.
@echo.

Ray at work





"Thanatos" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I need to run a batch file at startup that will display a prompt for 1
> minute, then close. I've made the script wait by using sleep.exe in the
> win2003 resource kit, but how do i create a prompt in a batch file?
>
>



 
Reply With Quote
 
Bill Stewart
Guest
Posts: n/a
 
      6th Oct 2003
Thanatos <(E-Mail Removed)> wrote:

> I need to run a batch file at startup that will display a prompt for 1
> minute, then close. I've made the script wait by using sleep.exe in the
> win2003 resource kit, but how do i create a prompt in a batch file?


If I understand your question...

@echo off
echo Here's your prompt.
sleep whatever

HTH,

Bill


 
Reply With Quote
 
JeffO
Guest
Posts: n/a
 
      6th Oct 2003
sleep 60 > cmd

>-----Original Message-----
>I need to run a batch file at startup that will display

a prompt for 1
>minute, then close. I've made the script wait by using

sleep.exe in the
>win2003 resource kit, but how do i create a prompt in a

batch file?
>
>
>.
>

 
Reply With Quote
 
Thanatos
Guest
Posts: n/a
 
      6th Oct 2003

"JeffO" <(E-Mail Removed)> wrote in message
news:04b201c38c3e$e0068310$(E-Mail Removed)...
> sleep 60 > cmd
>
> >-----Original Message-----
> >I need to run a batch file at startup that will display

> a prompt for 1
> >minute, then close. I've made the script wait by using

> sleep.exe in the
> >win2003 resource kit, but how do i create a prompt in a

> batch file?
> >
> >
> >.
> >


Posted just before you, that gives me the same result, no prompt is
displayed.


 
Reply With Quote
 
Bill Stewart
Guest
Posts: n/a
 
      6th Oct 2003
Thanatos <(E-Mail Removed)> wrote:

> Sorry, i don't think you understood me. I'd like to have a batch file
> run, that displays a prompt for two minutes where the user can type
> commands, but the window must close after two minutes. With sleep.exe,
> the script waits, but does not display a prompt.


You are talking about a console window that only stays open for a certain
length of time in which you can type commands, but after that it will
close? That sounds like a job for a background task with a timer. I don't
think you're going to have too easy of a time doing that without a custom
executable.

Perhaps it would be instructive if we knew your objective?


 
Reply With Quote
 
Bill Stewart
Guest
Posts: n/a
 
      6th Oct 2003
JeffO <(E-Mail Removed)> wrote:

> sleep 60 > cmd


Output the command "sleep 60" to a file called "cmd"?

Not sure why he'd want to do that... :-)


 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      7th Oct 2003
Thanatos wrote in news:#(E-Mail Removed):

>
> "Bill Stewart" <(E-Mail Removed)_spam.com> wrote in message
> news:#(E-Mail Removed)...
>> Thanatos <(E-Mail Removed)> wrote:
>>
>> > I need to run a batch file at startup that will display a
>> > prompt for 1 minute, then close. I've made the script wait by

[ ]
>
> Sorry, i don't think you understood me. I'd like to have a batch
> file run, that displays a prompt for two minutes where the user
> can type commands, but the window must close after two minutes.
> With sleep.exe, the script waits, but does not display a prompt.


...
START "SPECIAL_$" CMD.EXE /k
ping -n 121 127.0.0.1 <nul
<path>\cmdow.exe SPECIAL_$ /CLS
...
Requires CMDOW.EXE
http://www.commandline.co.uk/
(Thanks Richie!)

I can imagine using TLIST.EXE, FIND.EXE and KILL.EXE along with batch
but won't bother as above will do it easily.

 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      7th Oct 2003
Mark V wrote in news:Xns940CB779D589Az9zzaQ2btw@207.46.248.16:

> ping -n 121 127.0.0.1 <nul


TYPO!

Should be
ping -n 121 127.0.0.1 >nul
of course.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prompt for String in Batch File John Ward Windows XP Help 1 6th Apr 2005 08:40 PM
A batch file that will not prompt for an action =?Utf-8?B?U2FtYW50aGE=?= Microsoft Windows 2000 CMD Promt 4 30th Mar 2004 03:56 AM
Re: cannot execute batch file in dos prompt window Helen Windows XP Help 2 28th Mar 2004 02:36 AM
Re: cannot execute batch file in dos prompt window Helen Windows XP Help 0 6th Feb 2004 03:04 PM
cannot execute batch file in dos prompt window Helen Windows XP Help 2 6th Feb 2004 02:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:20 PM.