PC Review


Reply
Thread Tools Rate Thread

.CMD questions

 
 
someone watching
Guest
Posts: n/a
 
      30th Apr 2010
Can someone explain how to have a *.CMD window open, execute a program and
STAY at the command prompt?

All I know to try is this:

@echo off
calendar_popup (this is the program I want executed)

but immediately after execution the window closes (unless I put a PAUSE
statement) but I need the window to return to a command prompt (not close)

TIA


 
Reply With Quote
 
 
 
 
someone watching
Guest
Posts: n/a
 
      30th Apr 2010
Had to update the post as it doesn't fully explain what I'm trying to do. I
have two 'DOS' programs (which work in a CMD window) which I'd like executed
when the .CMD file is invoked, as follows:

@echo off
pushd f:\notepad
notepad (it's a popup 'dos' program invoked with a hotkey; works fine in a
typical CMD window)
calendar (another 'dos' program which pops up a very small calendar with
reminders and immediately terminates to the prompt)

trouble it the CMD window immediately terminates after executing the above.
If I use a PAUSE statement I can see the programs are launched and work as
they should ... but how to remain at a command prompt ??

TIA


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a
 
      30th Apr 2010


"someone watching" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can someone explain how to have a *.CMD window open, execute a program and
> STAY at the command prompt?
>
> All I know to try is this:
>
> @echo off
> calendar_popup (this is the program I want executed)
>
> but immediately after execution the window closes (unless I put a PAUSE
> statement) but I need the window to return to a command prompt (not close)
>
> TIA
>


Try this:
@echo off
cmd /k calendar_popup

 
Reply With Quote
 
spamlet
Guest
Posts: n/a
 
      30th Apr 2010
I have a link to the cmd prompt on my quick launch bar. It stays open until
I close it. Only if cmds are put in the 'run' box does cmd shut afterwards.
Having the cmd prompt link is handy for running tracert and ipconfig -
needed quite a lot in sorting out internet connection hassles.

S


"someone watching" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can someone explain how to have a *.CMD window open, execute a program and
> STAY at the command prompt?
>
> All I know to try is this:
>
> @echo off
> calendar_popup (this is the program I want executed)
>
> but immediately after execution the window closes (unless I put a PAUSE
> statement) but I need the window to return to a command prompt (not close)
>
> TIA
>
>



 
Reply With Quote
 
someone watching
Guest
Posts: n/a
 
      30th Apr 2010
"Pegasus [MVP]" <(E-Mail Removed)> wrote in message Try this:
> @echo off
> cmd /k calendar_popup
>


Tried the /k switch, works great to keep a command prompt. Now the question
is how to invoke TWO programs (in same window) and still have working CMD
prompt. I've tried all kinds on combinations of /k switches, no /k switches,
etc. No luck keeping command prompt!

any other ideas?

TIA


 
Reply With Quote
 
spamlet
Guest
Posts: n/a
 
      30th Apr 2010
PS: Right clicking on the link gives you a properties sheet where you can
set it to run in a normal window of whatever size you want.

S

"spamlet" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have a link to the cmd prompt on my quick launch bar. It stays open
>until I close it. Only if cmds are put in the 'run' box does cmd shut
>afterwards. Having the cmd prompt link is handy for running tracert and
>ipconfig - needed quite a lot in sorting out internet connection hassles.
>
> S
>
>
> "someone watching" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Can someone explain how to have a *.CMD window open, execute a program
>> and STAY at the command prompt?
>>
>> All I know to try is this:
>>
>> @echo off
>> calendar_popup (this is the program I want executed)
>>
>> but immediately after execution the window closes (unless I put a PAUSE
>> statement) but I need the window to return to a command prompt (not
>> close)
>>
>> TIA
>>
>>

>
>



 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a
 
      30th Apr 2010


"someone watching" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Pegasus [MVP]" <(E-Mail Removed)> wrote in message Try this:
>> @echo off
>> cmd /k calendar_popup
>>

>
> Tried the /k switch, works great to keep a command prompt. Now the
> question
> is how to invoke TWO programs (in same window) and still have working CMD
> prompt. I've tried all kinds on combinations of /k switches, no /k
> switches,
> etc. No luck keeping command prompt!
>
> any other ideas?
>
> TIA
>


This sounds like a classic case of scope creep: Let's get someone to solve
one problem, then let's build on the first to solve a second and so on. Can
we have the whole scope in one fell swoop, please, instead of one little bit
at a time? You also need to spend a little more time on thinking about your
spec. When you say "two programs", do you mean two programs running
concurrently or successively? And why this insistence on keeping a Command
Processor running?

 
Reply With Quote
 
Billns
Guest
Posts: n/a
 
      2nd May 2010
On 4/30/2010 8:05 AM, someone watching wrote:
> "Pegasus [MVP]"<(E-Mail Removed)> wrote in message Try this:
>> @echo off
>> cmd /k calendar_popup
>>

>
> Tried the /k switch, works great to keep a command prompt. Now the question
> is how to invoke TWO programs (in same window) and still have working CMD
> prompt. I've tried all kinds on combinations of /k switches, no /k switches,
> etc. No luck keeping command prompt!
>
> any other ideas?
>
> TIA
>
>

Suggest you open TWO separate command prompt windows. Run each program
in its own window. You can switch between the two windows.

Bill
 
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
Bookmark questions Access/Word Error Message Two Questions Kenny G Microsoft Access Form Coding 0 1st Aug 2008 04:11 PM
Linksys NAS200 questions (general questions about RAID 0, 1) Aloke Prasad Storage Devices 0 6th Aug 2007 01:04 AM
Form that asks questions based on responses to other Questions =?Utf-8?B?YWtrcnVn?= Microsoft Access Getting Started 3 6th Jul 2007 02:43 PM
Re: After the Deletion of Google Answers, U Got Questions Fills the Gap Answering and Asking the Tough Questions sechumlib Microsoft C# .NET 0 7th May 2007 07:35 PM
SATA drive questions + raid questions O |V| 3 G A DIY PC 17 29th Sep 2003 11:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:46 PM.