Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Basic Help with XP Command-line utilities  (Read 19589 times)

0 Members and 1 Guest are viewing this topic.

Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: Basic Help with XP Command-line utilities
« Reply #15 on: January 23, 2010, 03:27:11 PM »
Quote
I mean, did you have to enter each path somewhere for those other optional ways of opening MBRWiz?  No matter where I put it, it only works from the system32 folder so far.
Yes, each path must be in the Path Environment Variable, and the file extension .exe, .bat etc..etc.. must appear in the Pathext Environment Variable.

Here are the vars I use:
Path=c:\windows\;c:\windows\system32;c:\;c:\bat;C:\Program Files\Support Tools\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

The paths are:
C:\WINDOWS\
C:\WINDOWS\SYSTEM32\
C:\
C:\BAT\
C:\PROGRAM FILES\SUPPORT TOOLS\

So that if a filename only is entered at the Command Prompt the OS will search each path in the Path environment variable for the filename with any extension listed in PATHEXT starting with .COM and ending with .WSH.  When the filename.ext is found the file will be opened by a program associated with that extension..  If you want to open a file named Jumper.bat and a file named Jumper.com exists the system will find Jumper.com (if its location is in the Path environment variable and only Jumper is entered at the command prompt) because .com appears before .bat in the Pathext environment variable (again in my setup).

Please post your Path and Pathext environment variables.

I have created a directory named Utility and copied MBRWiz to it.  Then deleted MBRWiz from C:\  Here are results from entering Utility\mbrwiz /switch at the command prompt C:\>
Quote
First :
Utility\mbrwiz /result

 MBRWiz - Version 1.52 for Windows XP/2K/PE          November 13, 2003
   Copyright (c) 2002-2003 Roger Layton            http://mbr.bigr.net

 ErrorLevel Result: 0


Second :
utility\mbrwiz /bootmenu

 MBRWiz - Version 1.52 for Windows XP/2K/PE          November 13, 2003
   Copyright (c) 2002-2003 Roger Layton            http://mbr.bigr.net


 Disk: 0   Size= 76G
 ID  Type/Name  Size  Active  Hidden  Start Sector
 --  ---------  ----  ------  ------  ------------
  0  07-NTFS     35G   Yes     No               63

 Select the partition id to set active:
 Invalid partition ID specified.

(I specified a partition which does not exist).

Third :
utility\mbrwiz /list

 MBRWiz - Version 1.52 for Windows XP/2K/PE          November 13, 2003
   Copyright (c) 2002-2003 Roger Layton            http://mbr.bigr.net

 Disk: 0   Size= 76G
 Pos MBRndx Type/Name  Size Active Hide Start Sector   Sectors
 --- ------ ---------- ---- ------ ---- ------------ ------------
  0    0    07-NTFS     35G   Yes   No            63   71,681,967
  1    1    0F-EXTEND   41G   No    No    71,682,030   84,598,290

 Disk: 1   Size= 76G
 Pos MBRndx Type/Name  Size Active Hide Start Sector   Sectors
 --- ------ ---------- ---- ------ ---- ------------ ------------
  0    0    07-NTFS     20G   Yes   No            63   40,965,687
  1    2    0F-EXTEND   55G   No    No    40,965,750  113,177,925
  2    1    07-NTFS    1.0G   No    No   154,175,805    2,120,580


I cannot fault the way in which my system is opening MBRWiz, with switches, from various locations using different paths in the command shell.

Quote from: jayell
I know, I know - take your little shortcut-to-system32-folder victory, shut up and say good-bye.

No, we should be able to sort this out between us, it's not rocket science.
One good deed is worth more than a year of good intentions.

jayell

    Topic Starter


    Rookie

    Re: Basic Help with XP Command-line utilities
    « Reply #16 on: January 23, 2010, 04:56:22 PM »

    @Dusty.  Thanks for the detailed instructions.  To be honest, I didn't want to get into it this far but I can actually see a pin-point of light down there.  Your latest post is going to take some chewing on and a few trials but I'll see if I can get through it.  And thanks for the patience - I'm a senior and quite a late-starter.

    One thing - I am surprised that some of the paths you listed wouldn't already be entered as default.  They seem to be all the standard places to keep apps.  Or am I misunderstanding that?

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: Basic Help with XP Command-line utilities
    « Reply #17 on: January 23, 2010, 06:52:34 PM »
    Quote
    I am surprised that some of the paths you listed wouldn't already be entered as default.  They seem to be all the standard places to keep apps

    During OS install (XP Pro) the system path and pathext environment variables are set up containing:

    Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH



    One good deed is worth more than a year of good intentions.

    jayell

      Topic Starter


      Rookie

      Re: Basic Help with XP Command-line utilities
      « Reply #18 on: January 24, 2010, 10:24:28 AM »
      Hi Dusty!  I’ve been through your post thoroughly – very helpful.  The first time I went through this in a tutorial, I thought it was clear, but still couldn’t get things to work right. 

      I did have a screenshot of my Environment Variables ready to attach – they look similar to yours.  I understand why yours are slightly different now.  I won’t attach them because there’s no need now (I hope :-) )

      So the actual sequence necessary to get Windows to recognize and open a program at the prompt (IF it’s a CLI program with an extension that’s already entered) is a mite cumbersome but do-able. Definitely not an area that your usual day-to-day user needs to concern himself with.

      I’ve tested all this out, put these little exes in different places using established paths and I haven’t run into any more roadblocks.  It seems clear what I have to do if I want to keep these apps somewhere that's not already listed. 

      What’s shown up most, though, was a misunderstanding about entries at the cursor and how important the correct path at that point is. (Just as Salmon Trout stated, albeit not very nicely).  By the way, I still teach students in community-type interests (not command-line, obviously) and learned early on that,  to be helpful, you have to try and remember what you didn’t know before you knew so much. That can be hard to do.

      I think I’ve got it Dusty.  Your willingness to hang in there and just keep feeding information along with renewed trial and practise on my part has worked for me, at least.   Don't know how often I'll use this but at least it won't vex me anymore!  My thanks and compliments.

      I don't know how to mark this thread solved - do you do that here?

      Dusty



        Egghead

      • I could if she would, but she won't so I don't.
      • Thanked: 75
      • Experience: Beginner
      • OS: Windows XP
      Re: Basic Help with XP Command-line utilities
      « Reply #19 on: January 24, 2010, 01:58:50 PM »
      Quote
      I don't know how to mark this thread solved - do you do that here?

      That can be done but isn't the usual practice on this forum.  Thank you for coming back to advise of your success, lots of posters don't bother.

      Don't be too bothered by the perceived attitude of Salmon Trout, his knowledge level and willingness to assist is legendary, although his method of disseminating information may raise some hackles.

      Please don't hesitate to use the CH forums should you require further help/assistance or if you can offer guidance to another member.

      Sayonara.

      One good deed is worth more than a year of good intentions.

      Salmon Trout

      • Guest
      Re: Basic Help with XP Command-line utilities
      « Reply #20 on: January 24, 2010, 02:10:33 PM »
      Don't be too bothered by the perceived attitude of Salmon Trout, his knowledge level and willingness to assist is legendary, although his method of disseminating information may raise some hackles.

      Your kind words make me feel very humble, and prompt me to make some sort of, if not an apology, at least an excuse to the OP. Jayell, I guess I got a bit peevish with you because I thought that you were deliberately ignoring clear and explicit advice (including 2 posts from me) because you felt sure you could not be wrong, and also I really didn't like that butterscotch coloured font that you favoured. I realise that oil gets better results than vinegar, and I will try to remember it in future. Yes, there was once a time when I, too, didn't know what I do now, but that was roughly about the time that Nebuchadnezzar was in short pants, so I tend to forget.

      Dusty



        Egghead

      • I could if she would, but she won't so I don't.
      • Thanked: 75
      • Experience: Beginner
      • OS: Windows XP
      Re: Basic Help with XP Command-line utilities
      « Reply #21 on: January 24, 2010, 02:54:28 PM »
      Unbelievable, getting any kind of apology or excuse from S.T. reeks of favoritism or can it be that some age-based mellowing is occurring.  Forum life won't be worth living if S.T. becomes one of us mere mortals.

      Quote
      I realise that oil gets better results than vinegar
      Might be true on troubled waters but not on my Harry Ramsden special cod & chips.

      One good deed is worth more than a year of good intentions.

      Salmon Trout

      • Guest
      Re: Basic Help with XP Command-line utilities
      « Reply #22 on: January 24, 2010, 03:40:14 PM »
      Harry Ramsden special cod & chips.

      That is actually what I had for my lunch last Friday, with peas, not actually from a Harry Ramsden place, but in the subsidised Civil Service canteen where I work. £3.64.

      Dusty



        Egghead

      • I could if she would, but she won't so I don't.
      • Thanked: 75
      • Experience: Beginner
      • OS: Windows XP
      Re: Basic Help with XP Command-line utilities
      « Reply #23 on: January 24, 2010, 04:57:52 PM »
      S.T. employed in the Civil Service?  An oxymoron?  Yes, Minister!

      Hope the peas were mushy.

      Jayell - apologies for having hijacked your thread.
      One good deed is worth more than a year of good intentions.

      jayell

        Topic Starter


        Rookie

        Re: Basic Help with XP Command-line utilities
        « Reply #24 on: January 24, 2010, 07:12:35 PM »
        Dusty and Salmon Trout:  No problem about the hijack.  I enjoyed it.

        Salmon Trout:  Nice to hear your "mere mortal" side. I may well be back looking for your help again sometime.   Learning something completely new can be tough sometimes.  As far as your ignored recommendation to me earlier - it might have become lost in all the exchange but I did say

        Quote
        @Salmon Trout:  Thanks for offering your assistance, too.  Sorry, didn't understand the "make that folder the current one" term in your instruction.

        What I should have said was "Would you mind talking me through how I make a folder current?"  I'd still like to know, by the way. 

        And the butterscotch font?  I hated it...I just couldn't figure out how you guys were doing this "quote" thing.  Shall I go back and change it now?  :-)   <- sorry if you hate these.  I do, too.


        rthompson80819



          Specialist

          Thanked: 94
        • Experience: Experienced
        • OS: Windows 7
        Re: Basic Help with XP Command-line utilities
        « Reply #25 on: January 24, 2010, 07:35:00 PM »
        Jayell, since it sounds like you are somewhat new to the command prompt, a handy tip not mentioned is to pin the command prompt to the start menu.

        Go to accessories, command prompt, right click and click pin to start menu.

        jayell

          Topic Starter


          Rookie

          Re: Basic Help with XP Command-line utilities
          « Reply #26 on: January 24, 2010, 07:49:11 PM »
          rthompson80819.  It's already become a habit to do the WinKey+R then cmd but I've pinned  Command Prompt to the Start menu anyway.  Nice to have options!  (And it is faster, too.) Thanks for the post.

          Helpmeh



            Guru

          • Roar.
          • Thanked: 123
            • Yes
            • Yes
          • Computer: Specs
          • Experience: Familiar
          • OS: Windows 8
          Re: Basic Help with XP Command-line utilities
          « Reply #27 on: January 24, 2010, 08:06:09 PM »
          What I should have said was "Would you mind talking me through how I make a folder current?"  I'd still like to know, by the way. 
          CD PATH

          Examples:
          C:\Windows\
          "%userprofile%\My Documents\"

          CD stands for Current Directory (directory being synonymous for folder).
          Where's MagicSpeed?
          Quote from: 'matt'
          He's playing a game called IRL. Great graphics, *censored* gameplay.

          Salmon Trout

          • Guest
          Re: Basic Help with XP Command-line utilities
          « Reply #28 on: January 25, 2010, 12:18:12 AM »
          What I should have said was "Would you mind talking me through how I make a folder current?"  I'd still like to know, by the way. 

          When you are running the command prompt, you are always "in" a current directory. By default this is shown at the prompt thus

          Code: [Select]
          C:\Documents and Settings\Mike>
          Here the current folder is shown followed by a "greater than" symbol.

          I can use the CD command to change to another directory. (I always thought it meant "Change Directory"). The full path and name needs to be enclosed in quotes if there are any spaces at all.

          CD "C:\Program Files\Internet Explorer"

          After I press Enter, I am now in that directory and the prompt changes to reflect that.


          Dusty



            Egghead

          • I could if she would, but she won't so I don't.
          • Thanked: 75
          • Experience: Beginner
          • OS: Windows XP
          Re: Basic Help with XP Command-line utilities
          « Reply #29 on: January 25, 2010, 01:57:48 AM »
          Quote
          CD "C:\Program Files\Internet Explorer"

          Whisper - when using Cmd.exe try that without the " ... "
          One good deed is worth more than a year of good intentions.