PC Review


Reply
Thread Tools Rate Thread

Cmd does not work properly

 
 
Jacques Schett
Guest
Posts: n/a
 
      7th Mar 2007
I have two Windows XP Pro systems on a domain that the command shell
does not work properly.

We use scripts to handle user rights on some poorly written apps
(security wise, poorly written...like QUickBooks) The script starts by
granting the user of this instance local admin rights. Then it
launches the app, then it resets the admin accounts and removes the
current user.

This works well on all but these two machines. What I get is scripts
that fail to work because the paths are implicit (i.e. I don't say
"C:\Windows\System32\Net.exe ..." instead I use "Net ..."

The PATH statement shows %SystemRoot%; %SystemRoot%\System32;... but
NOTHING works properly in the cmd shell.

How can I fix this short of reinstalling XP? Would SFC /ScanNow work?
I just hate to have to reinstall all the files since SP2 released (our
XP cd is slipstreamed with SP2 so at least I won't have to ins. the
SP.

Any thoughts are appreciated!
 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      7th Mar 2007

"Jacques Schett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have two Windows XP Pro systems on a domain that the command shell
> does not work properly.
>
> We use scripts to handle user rights on some poorly written apps
> (security wise, poorly written...like QUickBooks) The script starts by
> granting the user of this instance local admin rights. Then it
> launches the app, then it resets the admin accounts and removes the
> current user.
>
> This works well on all but these two machines. What I get is scripts
> that fail to work because the paths are implicit (i.e. I don't say
> "C:\Windows\System32\Net.exe ..." instead I use "Net ..."
>
> The PATH statement shows %SystemRoot%; %SystemRoot%\System32;... but
> NOTHING works properly in the cmd shell.
>
> How can I fix this short of reinstalling XP? Would SFC /ScanNow work?
> I just hate to have to reinstall all the files since SP2 released (our
> XP cd is slipstreamed with SP2 so at least I won't have to ins. the
> SP.
>
> Any thoughts are appreciated!


You write "NOTHING works properly in the cmd shell." This
is far from sufficient to tell you what's wrong. You should post
the exact command you use and the verbatim error message
you get. Remember that we can't see your screen!


 
Reply With Quote
 
pop
Guest
Posts: n/a
 
      7th Mar 2007
Jacques Schett wrote:
> I have two Windows XP Pro systems on a domain that the command shell
> does not work properly.
>
> We use scripts to handle user rights on some poorly written apps
> (security wise, poorly written...like QUickBooks) The script starts by
> granting the user of this instance local admin rights. Then it
> launches the app, then it resets the admin accounts and removes the
> current user.
>
> This works well on all but these two machines. What I get is scripts
> that fail to work because the paths are implicit (i.e. I don't say
> "C:\Windows\System32\Net.exe ..." instead I use "Net ..."
>
> The PATH statement shows %SystemRoot%; %SystemRoot%\System32;... but
> NOTHING works properly in the cmd shell.
>
> How can I fix this short of reinstalling XP? Would SFC /ScanNow work?
> I just hate to have to reinstall all the files since SP2 released (our
> XP cd is slipstreamed with SP2 so at least I won't have to ins. the
> SP.
>
> Any thoughts are appreciated!


From a CMD prompt...

SET [enter]

and evaluate what you see. Compare to a working machine.

pop
 
Reply With Quote
 
Jacques Schett
Guest
Posts: n/a
 
      8th Mar 2007
Sorry for being too general.

What I mean by "Nothing" is that none of the normal paths seem to be
allowing access to normally used files.

e.g. If I open a CMD shell and CD \ to the root that works. If I type
"Net Use" to see a list of shares and redirects I get an error that
says the system cannot find any program called "Net".

If I type in the complete path (e.g. C:\Windows\System32\Net Use) then
NET works and I get a list of shares and redirections.

in short, I guess, my complaint is that the PATH is not being resolved
properly. If I type SET at the prompt, I can see all the default
lookup paths and they're normal (e.g. %SystemRoot%\System32 is in
there and if I type ECHO %SystemRoot% I get C:\Windows)

What could be causing this problem? As a result, none of the scripts
we execute work on these two machines (hence my saying NOTHING works).

This is just one example. If I drop to a command prompt and type in
NOTEPAD (which should launch notepad.exe) I get the same "Bad command
or filename" error, unless I put in the full path of the executable.
 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      8th Mar 2007

"Jacques Schett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Sorry for being too general.
>
> What I mean by "Nothing" is that none of the normal paths seem to be
> allowing access to normally used files.
>
> e.g. If I open a CMD shell and CD \ to the root that works. If I type
> "Net Use" to see a list of shares and redirects I get an error that
> says the system cannot find any program called "Net".
>
> If I type in the complete path (e.g. C:\Windows\System32\Net Use) then
> NET works and I get a list of shares and redirections.
>
> in short, I guess, my complaint is that the PATH is not being resolved
> properly. If I type SET at the prompt, I can see all the default
> lookup paths and they're normal (e.g. %SystemRoot%\System32 is in
> there and if I type ECHO %SystemRoot% I get C:\Windows)
>
> What could be causing this problem? As a result, none of the scripts
> we execute work on these two machines (hence my saying NOTHING works).
>
> This is just one example. If I drop to a command prompt and type in
> NOTEPAD (which should launch notepad.exe) I get the same "Bad command
> or filename" error, unless I put in the full path of the executable.


Much better!

You probably have the wrong type for the %path% key. Use
regedit.exe and check the path value under the key
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
It must be of type REG_EXPAND_SZ, not REG_SZ.


 
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
XP Pro Help won't work properly.......... Ahmed Windows XP Help 2 19th Sep 2009 10:45 PM
cant get it to work properly =?Utf-8?B?c2FtYW50aGEgcw==?= Windows XP Games 2 28th Dec 2005 12:17 AM
Alt-tab in XP SP2 does not work properly =?Utf-8?B?YnVjaw==?= Windows XP General 0 24th Aug 2005 04:17 PM
How I can work properly with a PDF File converted to work documen. =?Utf-8?B?am9oYW5uYQ==?= Microsoft Word Document Management 1 23rd Oct 2004 08:17 AM
HOW I GOT MSN 6.1 TO WORK PROPERLY bill Windows XP Messenger 0 6th Mar 2004 08:55 PM


Features
 

Advertising
 

Newsgroups
 


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