Command line behavior has changed

J

Jazzeur

I have Windows XP SP2 Home with all the updates.

I used to be able to invoke the "Run" command line from the Start menu
and, for example, type commands such as "ipconfig". The computer would
then open a simili DOS window and display the IP configuration of my
computer.

Now, when I type a command such as "ipconfig" the DOS window opens, the
data starts to display but the window quikcly closes.

If I type only "cmd", the DOS window opens and remain opened. I can
then type the "ipconfig" command at the DOS prompt and everything
displays as expected.

What has caused this change??

I am puzzled and I would like to resolve.

Thank you,
 
W

Wesley Vogel

ipconfig with no switches executed from the Run command will do just as you
described, flash a command prompt and close.

Try using switches.

Like

ipconfig /all

for example.

or

cmd /k ipconfig /all

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
J

Jazzeur

Unfortunately, in my case, even a command which includes switches will
cause the same problem of premature DOS window closing.

Any other ideas?

Thanks,


Guy Robert

Wesley Vogel a écrit :
 
J

Jazzeur

Unfortunately, in my case, even a command which includes switches will
cause the same problem of premature DOS window closing.

Any other ideas?

Thanks,
 
W

Wesley Vogel

I just double checked and

ipconfig /all

doesn't work for me either. Sorry about that.

Does

cmd /k ipconfig /all

work for you?

It does for me.

BTW the /k switch carries out the command after it and leaves the cmd window
open.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
P

Plato

Jazzeur said:
Now, when I type a command such as "ipconfig" the DOS window opens, the
data starts to display but the window quikcly closes.

Often the result of your installing spyware.
 
W

Wesley Vogel

I only install adware. ;-)

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
J

Jazzeur

Hi Wesley,

The command "cmd /k ipconfig /all" does work. However still don't
understand what occured to cause this change of behavior.

Any ideas. I am supposed to be clean of any spyware according to
Defender, SpyBot and Ad-Aware.

Thanks,



Wesley Vogel a écrit :
 
W

Wesley Vogel

I don't honestly know, a Windows update maybe. I could have sworn that
ipconfig /all used to work from the Run command, but I am getting old. ;-)

I *am* getting old. I checked some old posts from 2005 and ipconfig has to
be run from a command prompt unless you use cmd /k ipconfig /all in the run
command.

Some commands that will normally run only in a command prompt will run from
the Run command if you use switches and some flat out will not run from the
Run command unless you use cmd /k along with the rest of the command.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
J

Jazzeur

Hi Wes,

I must be getting old too. I could have sworn also that I used invoke
"ipconfig" directly from the run command up until a few weeks ago.

Thank you for your time and assistance, I truly appreciate it.

Regards,



Wesley Vogel a écrit :
 
J

jbravo2840

Hey - while you are on the subject of ipconfig and the switches - here
is my issue:

I have written a batch file that gets a users ipconfig /all file and
puts it in a network share - it then finds the username and physical
address (MAC) of the user and puts it in another file.

I would like to be able to specify which adapter the ipconfig /all gets
its data from

specifically - I only want the physical address of the wireless adapter
("ethernet connection wireless network adapter" on the ipconfig /all)
so I either need to know how to get pull just that information out of
an ipconfig /all or how to get the ipconfig commend to only pull the
information I need.

this is my current batch file - location has been changed

@echo off
title MAC Address Harvester
j:
cd\
cd ipcfg
ipconfig /all > "network location"\%username%2.txt
find "Host Name" "network location"\%username%2.txt >> "network
location"\mac2.txt
find "Physical Address" "network location"\%username%2.txt >> j"network
location"\mac2.txt
exit

any help would be appreciated -
 
W

Wesley Vogel

Try asking at

microsoft.public.win2000.cmdprompt.admin

Lots of batch file people hang out there.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
C

cuba

That is, as Microsoft like to say, "by design."

The "Run" dialog just launches your command and goes away. Console
programs run that way will just run and then terminate. That's how it
works.
 
W

Wesley Vogel

What were we talking about? Oh yea, I remember. ;-)

Keep having fun.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top