PDA

View Full Version : Command Prompt acting up?


Data
08-11-2004, 11:37 PM
I have no idea whats up with the command promt.... netstat ... ipconfig etc etc wont work anymore... not even help works.. wtf... it says its not a recognized command... =-/ help?

edit: OS = windows xp pro

bcarl314
08-12-2004, 02:53 AM
Opps, looks like you might have goofed up your path.

Type:

c:\> echo %PATH% > c:\path.txt

then paste the contents of path.txt here. That should help us nail that issue (if that is it.)

Data
08-14-2004, 02:08 AM
With just
"echo %PATH%"
I get the following:

C:\DJGPP\BIN;C:\Prgram Files\Common Files\Autodesk Shared\;C:\Program Files\bac\kburned 2\


Entering anything else gives nothing ex:

1. echo %PATH% > c:\path.txt
nothing
2. c:\path.txt
nothing


Thanks

bcarl314
08-14-2004, 05:54 AM
Hmmm, you seem to be missing a few important ones there. You may want to add:

c:\Program Files\
c:\windows
c:\windows\system32

I don't remember windows paths any more, but those seem to ring a bell. Anybody on a windows box able to help out???

squirellplaying
08-14-2004, 08:55 AM
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem

Data
08-15-2004, 12:26 AM
Sorry.. but what exactly do I do with this. just cd into the system32 folder?

edit: I get it now.. but how do I set the command promt so it is always in the system32 folder.. ?

thanks

nolachrymose
08-15-2004, 02:52 AM
You don't have to. The point of the %PATH% environment variable is to be able to run programs in defined directories without calling from that directly specifically. What you need to do is edit your %PATH% variable. Assuming that the same steps apply to both XP Home and XP Professional, follow these steps to change the value:

Control Panel -> System -> Properties -> Advanced -> Environment Variables -> Click Path -> Edit

Change the value to this:

c:\DJGPP\BIN;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\bac\kburned 2\;c:\Program Files\;c:\windows;c:\windows\system32

Hope that helps!

Happy coding! :)

Data
08-15-2004, 04:50 AM
Yes it works thanks.. I dont understand why it works though =-/... the weird path stuff...

nolachrymose
08-15-2004, 06:53 PM
I believe what happens when you attempt to call a file (without any leading path, just the filename and extension), first Windows searches to see if it is the current directory, and if not, it searches through the directories specified by the %PATH% environment variable. If no results are found, nothing will be executed.

Hope that helps!

Happy coding! :)

Roy Sinclair
08-18-2004, 11:04 PM
This sounds like the result of a poorly written installation program, almost certainly whatever was installed in the DJGP directory.

Of course IMO any install program that inserts it's directory into the path before the system directories is defective and broken. This hearkens back to the DOS days when nearly every program you installed added it's directories to the PATH even though most of them didn't need to do so.

A Windows XP system will have the following elements in the PATH and they should be the first items in the path, before any additional elements.

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;

The system will convert the %SystemRoot% into the appropriate value when it provides the path for any requesting program.