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 19588 times)

0 Members and 1 Guest are viewing this topic.

jayell

    Topic Starter


    Rookie

    Basic Help with XP Command-line utilities
    « on: January 22, 2010, 09:55:57 AM »
    Hi!  Is there someone who wouldn't mind helping me with detailed instructions in running small command-line utilities.  If this isn't the right place for this post, would you re-direct me, please.

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: Basic Help with XP Command-line utilities
    « Reply #1 on: January 22, 2010, 12:11:05 PM »
    " Anyone who goes to a psychiatrist should have his head examined. "

    jayell

      Topic Starter


      Rookie

      Re: Basic Help with XP Command-line utilities
      « Reply #2 on: January 22, 2010, 12:39:32 PM »
      Thanks for the suggestion.  I didn't want to make my post too lengthy until I found out if this is the right place to get some help on this subject.  I've been through tons of these Basic User's guides in the last few days but there is also the possibility I might be experiencing a problem with settings or something. 

      I have several small, portable CL apps (like MBRWiz consisting of .exe and .txt ReadMe) that don't seem to function as simply as the guides say they will.  Specifically, I need to find out what I need to do to get the switches to function, of which there are, usually, several.  The only way, so far, that I even get to the options screen is by dragging the .exe into the XP cmd window at the prompt. 

      I've already been through several hoops on another forum like using Path Variables (didn't work for me).  My info, so far, says that isn't necessary to run these, anyway.  At least here, attachments are allowed, which would have made communications there a whole lot less confusing.  Are you game to walk through the sequence with me? 

      Treval



        Hopeful

        Thanked: 14
        Re: Basic Help with XP Command-line utilities
        « Reply #3 on: January 22, 2010, 12:52:14 PM »
        *censored*? Did someone delete my previous post on here?

        jayell

          Topic Starter


          Rookie

          Re: Basic Help with XP Command-line utilities
          « Reply #4 on: January 22, 2010, 01:30:14 PM »
          Update - I'm able to open these programs in the Run utility now through Environment Variables but everything else in my post still applies: no success with switches once inside the cmd window.  Still having this problem with option screen flashing, then disappearing.

          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 #5 on: January 22, 2010, 01:39:23 PM »
          Jayell - perhaps you could start by reading this and returning with some info.

          And Welcome to the CH forums where a screenshot is worth a lot of words.

          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 #6 on: January 22, 2010, 09:36:34 PM »
            Read the Rules and tried a search (tough to put a term to this problem) when I signed up.  I just added some info about this machine - is that the info you're after?

            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 #7 on: January 23, 2010, 01:12:18 AM »
            Thanks for that info.  I ran MBRWiz on both XP HE and Pro (x32) from the Command Line and from within a batch script and found no problems with the prog recognizing switches.

            Quote
            (like MBRWiz consisting of .exe and .txt ReadMe)
             
            I didn't find a .txt ReadMe file, the downloaded .zip file contained mbrwiz which seems to be headed in the direction of Linux, MBRWiz.exe for NT, MBRWizd.exe for Win ME/98 and MBRWiz.html which is a user guide.  Perhaps I got the wrong download?

            So, sorry, cannot assist as cannot create your problem on my XP systems, perhaps another member will be able to assist..

            Quote
            The only way, so far, that I even get to the options screen is by dragging the .exe into the XP cmd window at the prompt. 

            Edit:  Oops, I re-read your post and now think that I misunderstood your problem.

            Try this:
            Start>Run and enter cmd in the dialog box then hit OK.  This should open a Command Prompt window.  At the command prompt enter MBRWiz and the MBRWiz options will be displayed. (Provided, of course, that MBRWiz.exe is somewhere in your path).

            Did you try this already?

            Good luck.

            « Last Edit: January 23, 2010, 01:31:55 AM by Dusty »
            One good deed is worth more than a year of good intentions.

            Salmon Trout

            • Guest
            Re: Basic Help with XP Command-line utilities
            « Reply #8 on: January 23, 2010, 02:41:45 AM »
            Try this:
            Start>Run and enter cmd in the dialog box then hit OK.  This should open a Command Prompt window.  At the command prompt enter MBRWiz and the MBRWiz options will be displayed. (Provided, of course, that MBRWiz.exe is somewhere in your path).

            Alternatively, create a folder, put the MBRwiz.exe into it, then open a command window (e.g. by typing cmd in the Start Menu "run" box), then make that folder the current one, then you can type mbrwiz /? at the prompt and see the options, or you can just simply go here

            http://mbrwizard.com/reference.php

            Many command line programs (and most built in commands) obey the /? convention.

            jayell, it sounds to me that this is the information you seek, that is, how generically to run command line utilities and view their options and how to supply switches to the programs?



            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 #9 on: January 23, 2010, 03:22:04 AM »
            Or - create a desktop shortcut with:

            Target as: %windir%\system32\cmd.exe /k mbrwiz

            Start in: C:\

            Run: Maximized

            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 #10 on: January 23, 2010, 10:14:43 AM »
              Okay, first @ Dusty:  Thanks for helping.  You tried MBRWiz - that's good, tells me it does as expected with you.  I'd be interested in the steps you used next to activate one of the switches - say, </List> where it will give you a list of MBR entries.  I think that's where the roadblock is for me.

              I should mention that, currently, the path to MBRWiz is C:\Utility\MBRWiz.exe per a suggestion to keep the path simple.  There are several other small, CLI exes in there, too.

              Probably, the best thing would be for us to just forget the whole environment variable thing for the moment - simply dragging the exe to the command cursor gives the best results right now.  These aren't apps that'll be used very often.  Command is not something I see myself ever needing much.  Read: no old DOS apps or games, no scripts, no batch etc.  This started purely out of interest - thought I'd pursue why double-clicking these kind of exes gave such unexpected results.

              So why MBRWiz?? It's just an example.  I resized a partition recently (system, unfortunately) with a program that corrupted the partition tables and XP wouldn't boot.  I was able to correct that with another nice little app but now I thought that it was important to know more about the MBR/partition tables than I did.

              But here we are, back at XP command prompt, I've dragged MBRWiz.exe to the prompt, it opens the list of options..."Press any key for remaining options", after displaying next options, I'm sitting at a prompt that's at the end of <C:\Documents and Settings\UserName.

              Now, here's where cmd baffles me: am I already "outside" of MBRWiz "program"?  What's next to command a switch to activate?  If it's something simple, like enter "MBRWiz /List", I tried that days ago, got the "MBRWiz is not recognized..."

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

              As far as the provided link, yeah, been there.  The info there was what piqued my interest in the utility at the start.  The switches listed there are the ones I'm referring to here.  Just can't make them work.

              @ Dusty - your next post: are those instructions dependant at all on where MBRWiz is?  It looks as though MBRWiz.exe would have to be in the system32 folder.  Have I got that right?  Anyway, followed your instructions, got a nice, big cmd window flashing at C:\WINDOWS with a mbrwiz title bar.  Nothing worked from there.  Tried again with a copy of MBRWiz.exe in the system32 folder, typed <MBRWiz /List> and EUREKA!  Finally!  It's taken a long time to get to this point.  If there are other methods, I don't need 'em.

              This seems to be a reasonably simple way to do this - odd that no one's mentioned it up to now.  None of the tutorials that I went through mentioned this method.  It seems that the location of the exe is of prime importance.  I spent a lot of time on "paths" in Environment Variables and AppPaths in the registry - all great info but still, the switches wouldn't work.  And, as it turns out, I was entering them just as I did now.  I still don't know what that was all about.  Doesn't matter now. 

              Thank you, thank you.  I'll still be interested in any comments you'd care to make.

              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 #11 on: January 23, 2010, 12:45:43 PM »
              Quote
              It seems that the location of the exe is of prime importance.

              Yes, when the name of a file is entered a list of locations is searched for that file and, if found, it will be opened by the suitably assigned program.  The locations are stored in the Path environment variable.  So it follows that the required file can reside in any of the locations specified, not just System32, I put MBRWiz in C:\ but could have copied it to C:\Windows, C:\Bat, C:\Program Files, C:\System32 or any other path which I include in the Path variable.   

              If the file is not in the Path it can be opened by entering the full path at the Command Prompt e.g. C:\utility\MBRWiz to open Cmd.exe, run MBRWiz (displaying the options) and wait for other commands to be entered.  When I unzipped MBRWiz I put it into an Unzipped files folder so to run it from there, at the Command Prompt I would enter:

              "D:\My Downloads\Unzipped\MBRWiz\mbrwiz.exe"

              As you will know the .exe extension can be omitted.  But it's a heck of a lot easier to run it from one of the locations in Path.

              Hope we've been of some help to you.  We'll be around if you have other queries.


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

              Salmon Trout

              • Guest
              Re: Basic Help with XP Command-line utilities
              « Reply #12 on: January 23, 2010, 12:52:16 PM »
              Many people create folders specifically for batch files, third party utilities etc and add them to the PATH variable.

              Also it is handy to have "open Command window here" as a right click option in Windows Explorer.

              jayell

                Topic Starter


                Rookie

                Re: Basic Help with XP Command-line utilities
                « Reply #13 on: January 23, 2010, 02:02:09 PM »
                Jeez, Dusty, I really hate to muddy the waters now that we've finally got somewhere but I have to point out, again, that as I stated in my last post, these apps in C:\Utilities\ will not open the way you're describing.  Although I'm able to get the option screen only if I drag the exe from C:\Utility to the cursor in cmd, the switches will not function. But thanks to you, if I'll just pop the exe into the system32 folder, I can operate the switches when the app opens!  Doesn't make sense??  You're telling me!

                I put MBRWiz in C:\ but could have copied it to C:\Windows, C:\Bat, C:\Program Files, C:\System32 or any other path which I include in the Path variable.

                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.

                If the file is not in the Path it can be opened by entering the full path at the Command Prompt e.g. C:\utility\MBRWiz to open Cmd.exe, run MBRWiz (displaying the options) and wait for other commands to be entered.

                "D:\My Downloads\Unzipped\MBRWiz\mbrwiz.exe"  


                Yup.  Did that.  Dragging the exe there does that exactly.  Press "Enter", get the options listed but no switch action though.  As soon as I enter the switch I get the "MbrFix (or whatever util I try from C:\Utilities folder) is not recognized bla-bla-bla".

                So far, no one is willing to entertain the notion that, maybe, it's not that I'm lousy at following directions, but could something be not functioning the way that it should be?  Really, this can't possibly be this complicated, can it?

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

                Salmon Trout

                • Guest
                Re: Basic Help with XP Command-line utilities
                « Reply #14 on: January 23, 2010, 02:09:19 PM »
                So far, no one is willing to entertain the notion that, maybe, it's not that I'm lousy at following directions, but could something be not functioning the way that it should be?  Really, this can't possibly be this complicated, can it?

                jayell, it sounds like you are misunderstanding a rather fundamental aspect of command line utilities. You have to operate them from the command line, in the way that they were designed to be operated. You can get them to do something, sure, if you drag the executable's icon into a command window, but this is not the way they are meant to be used. You have been given advice that you appear to have ignored.

                I get the impression that you think that the problem lies elsewhere than in yourself... you should perhaps reflect that you may be mistaken in 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 #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.

                        jayell

                          Topic Starter


                          Rookie

                          Re: Basic Help with XP Command-line utilities
                          « Reply #30 on: January 25, 2010, 04:33:06 AM »
                          Okay, got all of that.  I've also been using "cd" thinking it meant change directory, because it seemed to be doing just that.  But you're right about the distinction:

                          Here's how "The Command Line in Windows" http://commandwindows.com/command3.htm, (one of the beginner's guide sites I used) states it:

                          Quote
                          cd or chdir     Displays the name of the current directory or changes the current folder

                          And, yes, I can get to a folder name that has spaces without using the quotes.  Tried it and it works both ways for me.

                          Thanks, all.

                          jayell

                            Topic Starter


                            Rookie

                            Re: Basic Help with XP Command-line utilities
                            « Reply #31 on: January 25, 2010, 07:44:36 AM »
                            There's this one odd thing yet...I was pretty happy with our successes when I wrote
                            Quote
                            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.
                            ...and this
                            Quote
                            I won’t attach them because there’s no need now (I hope :-) )
                            ...Over the last day since then, I've spent a lot of time on this trying to tie all the pieces together til it's familiar.  I was doing everything from the cmd box and it all works.  But what isn't working (slipped by me at the time of my happy-post) is running these from the run box.

                            I've gone over all the posts so far, I understand all of the instructions (God, I hope so...) I even went back to http://commandwindows.com/runline.htm
                            I just can't find my mistake.  Even putting these exes in System32 folder won't run them from the run-box.

                            So, attached this time, for your inspection, is the screenshot I was going to send previously.  (It was hard to know how to display PATH values - you can't expand the window to show all entered paths at one time.)

                            Now, if I've got this right, adding folders to the path in User Variables is done one "app-variable" at a time.

                            I thought it would be easier to include the path to my cmd utils folder (C:\cmdutils\) into the PATH value in System Variables.  Which I did.  Isn't that all there is to it?  I must still be missing something here.  Funny, though, that the inclusion of my path to cmdutils has the desired effect from the cmd-box.  I tested this by making sure that the only copies I have are located in C:\cmdutils.  I should mention that they open with their "friendly" names too - no capitals, no .exe necessary.  That's gotta be a good sign.

                            Let me know if there's anything else you need to see.  And remember, it's just this run-box thing...everything else is perfect!  I'm still miles ahead.


                            [Saving space, attachment deleted by admin]

                            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 #32 on: January 25, 2010, 05:40:03 PM »
                            Seems we are going round in ever decreasing circles so I want to gather some info about what is actually happening at your end.  I'd like you to post what screen output you get when you enter the following commands at the command prompt and I'd like you just to post text using the following process:

                             1.  Open a 'reply' window in this topic.

                             2.  Open a command prompt window (start>run>cmd)  If the command prompt window shows anything other than C:\> enter CD\ then enter CLS   The command prompt window should now display only C:\>  Expand the command window to full screen.

                             3.  At the command prompt enter SET PATH to display the Path and Pathext environment variables.

                             4.  Right click on the header bar then left click on Edit in the drop-down then Select All.   Again Right click on the header bar, left click on Edit in the drop-down and Copy.   Go to the 'reply' window in this forum which was opened in 1. and click on the Insert Quote button (second from right) and paste the clipboard content between quote and /quote.  Return to the command prompt window and enter CLS.

                             5.  At the command prompt enter DIR CMDUTILS to display the content of your utilities directory.  Repeat 4.

                             6.  Goto the 'reply' window and type exactly what you enter in the Start>Run dialog box when you are trying to open a file in the CMDUTILS folder and exactly what error message is displayed, if any.

                            Where used upper-case is for emphasis only, lower case case be used instead.
                            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 #33 on: January 25, 2010, 08:27:45 PM »
                              Hi Dusty,  okay, first instruction (2) results in "The system cannot find the file specified.". Now, that's CD\CLS - no spaces, right?  Because your next instruction hinges on me being in C:\, I used the command CD C:\ to get it there.  I'm now at C:\> (Hope that's still alright.)

                              Okay, instruction 3:
                              Quote
                              Microsoft Windows XP [Version 5.1.2600]
                              (C) Copyright 1985-2001 Microsoft Corp.

                              C:\Documents and Settings\JAMON>cd\cls
                              The system cannot find the path specified.

                              C:\Documents and Settings\JAMON>cd\ cls
                              The system cannot find the path specified.

                              C:\Documents and Settings\JAMON>CD\CLS
                              The system cannot find the path specified.

                              C:\Documents and Settings\JAMON>cd C:\

                              C:\>SET PATH
                              PATH=C:\Windows\System32\;C:\Windows\;C:\Documents and Settings\JAMON\;C:\cmduti
                              ls\;C:\Standalone\CMD_utils\;C:\Windows\System32\Wbem
                              PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

                              C:\>

                              Instruction 5:
                              Quote
                              C:\>DIR CMDUTILS
                               Volume in drive C is SYSTEM
                               Volume Serial Number is 4003-E025

                               Directory of C:\CMDUTILS

                              25/01/2010  07:04 PM    <DIR>          .
                              25/01/2010  07:04 PM    <DIR>          ..
                              25/01/2010  04:45 AM           198,184 Contig.exe
                              16/01/2010  02:52 PM           123,904 MbrFix.exe
                              29/04/2002  03:45 PM            79,872 MBRutil.exe
                              15/01/2010  07:20 PM            29,652 PARTINFO.EXE
                              16/01/2010  02:52 PM             8,320 SNUTIL.EXE
                              18/01/2010  07:29 AM            13,312 whosip.exe
                              25/01/2010  04:45 AM             5,632 ws.exe
                                             7 File(s)        458,876 bytes
                                             2 Dir(s)  12,980,822,016 bytes free

                              C:\>

                              Instruction 6:
                              Entering mbrfix, MbrFix or MbrFix.exe all garner the same result: no error message, only the momentary flash of the options screen before it disappears.
                              PARTINFO.exe - same results.  Same result for all.

                              It should be mentioned that, at one point earlier, when I was trying every combination of entry, I did get an error message from the run-box stating that the file could not be found.  Since it's not happening now, I must assume it had to do with something I was doing different at the time. 

                              Just so there's no question, I might as well attach this screenshot of my C: directory.

                              (By the way, how do you remove an attachment from the "Attach" field if you send the wrong one?)




                              [Saving space, attachment deleted by admin]

                              Helpmeh



                                Guru

                              • Roar.
                              • Thanked: 123
                                • Yes
                                • Yes
                              • Computer: Specs
                              • Experience: Familiar
                              • OS: Windows 8
                              Re: Basic Help with XP Command-line utilities
                              « Reply #34 on: January 25, 2010, 08:32:11 PM »
                              When dusty said CD \ and THEN cls, do cls on the next line.

                              C:\Documents and Settings\JAMON\>CD C:\
                              C:\Documents and Settings\JAMON\>cls
                              Where's MagicSpeed?
                              Quote from: 'matt'
                              He's playing a game called IRL. Great graphics, *censored* gameplay.

                              BC_Programmer


                                Mastermind
                              • Typing is no substitute for thinking.
                              • Thanked: 1140
                                • Yes
                                • Yes
                                • BC-Programming.com
                              • Certifications: List
                              • Computer: Specs
                              • Experience: Beginner
                              • OS: Windows 11
                              Re: Basic Help with XP Command-line utilities
                              « Reply #35 on: January 25, 2010, 11:11:34 PM »
                              mbrfix is a command line program. regardless of what options you use to invoke it if you execute it from the "Run" dialog the window will close when it completes.

                              you could try making the shortcut point to cmd ("%systemroot%\System32\cmd.exe" /k mbrwiz /list) or whichever switches you desire.
                              I was trying to dereference Null Pointers before it was cool.

                              jayell

                                Topic Starter


                                Rookie

                                Re: Basic Help with XP Command-line utilities
                                « Reply #36 on: January 25, 2010, 11:43:36 PM »
                                Thanks for your post BC_Programmer
                                Then it sounds like all is working as it should at this point.  Command line apps aren't supposed to be run from the run-box.  I don't need them to, I somehow got the idea that they were supposed to be able to.  What I've learned about command-line here has cleared up a lot.  At least I know now why I couldn't get them to work for me before.  Sorry for any confusion I caused along the way.

                                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 #37 on: January 26, 2010, 12:01:28 AM »
                                OK Jayell - everything you posted checks out fine.  As Helpmeh indicated when asked to enter something the convention is that you type the command and then hit enter, so if you are asked to enter CD\ then enter CLS you should type CD\ and hit enter then type Cls and hit enter.  No harm done.

                                Now, perhaps a bit of good news for you despite advice to the contrary.  To run your exe progs from the Start>Run dialog box type Cmd /k programname /switch(es) so to run MBRFix you can enter
                                 
                                Cmd /k mbrfix /drive 0 driveinfo
                                 
                                or you can just use mbrfix without any switch to display the options.  This simply means that you are opening Cmd then passing a command to it which, in this case, is to open another file.  Most importantly using the /k switch in Cmd leaves the command prompt window open after completion of the command.

                                MBRFix and MBRWiz are the only two exe's I have from your list, please try some more and let us know if you can claim success.


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

                                BC_Programmer


                                  Mastermind
                                • Typing is no substitute for thinking.
                                • Thanked: 1140
                                  • Yes
                                  • Yes
                                  • BC-Programming.com
                                • Certifications: List
                                • Computer: Specs
                                • Experience: Beginner
                                • OS: Windows 11
                                Re: Basic Help with XP Command-line utilities
                                « Reply #38 on: January 26, 2010, 12:03:42 AM »
                                you could start a cmd session and just type the name of the program, though, to run it.

                                Now, perhaps a bit of good news for you despite advice to the contrary.  To run your exe progs from the Start>Run dialog box type Cmd /k programname /switch(es) so to run MBRFix you can enter
                                 
                                Cmd /k mbrfix /drive 0 driveinfo
                                 

                                your suggesting they type that every time they wish to use it? It would probably be easier just to start a cmd session... or, as I suggested, use that in a shortcut.
                                I was trying to dereference Null Pointers before it was cool.

                                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 #39 on: January 26, 2010, 12:32:04 AM »
                                Quote
                                your suggesting they type that every time they wish to use it? It would probably be easier just to start a cmd session... or, as I suggested, use that in a shortcut.

                                I'm not being suggestive at all.  If you read Reply #9 posted 23.01.2010 you will note that I had already suggested a shortcut but that means a separate shortcut for each program some of which have up to 16 switches.   The OP persisted in asking how to start his prog from the Start>Run dialog box so I simply advised him.   It's up to Jayell how he starts the progs. 

                                Starting a cmd session then entering the program name and switch(es) saves depressing 7 keys, not a very good saving but, possibly like you, that's how I prefer to operate.

                                « Last Edit: January 26, 2010, 12:59:32 AM by Dusty »
                                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 #40 on: January 26, 2010, 08:51:56 AM »
                                  Good morning!

                                  First, @Dusty:
                                  Works like a darn! (< got censored for my first choice) With all of them.  So you can run them from there - it just involves a few preliminary key entries.  At least they're the same ones every time.

                                  @BC_Programmer (is that like British Columbia BC?)
                                  Quote
                                  you could start a cmd session and just type the name of the program, though, to run it.
                                  Yes.  Absolutely.(I shouldn't be using that word here, I know.)  And, now that I know I have the choice, I confess, I'll probably open these from a command session, as you suggest.  But I'm not sorry we persisted through the run-box option.

                                  Quote
                                  the convention is that you type the command and then hit enter, so if you are asked to enter CD\ then enter CLS you should type CD\ and hit enter then type Cls and hit enter.
                                  You can see throughout the thread the trouble CL "convention" caused me.  Pretty unforgiving process.

                                  By the way, at first, I hadn't thought of running these CLI apps from the run-box

                                  One thing I find particularly convenient:  while in the CL window, I can enter the short name of any other CL app and have it open there, even if the prompt was at the default directory at the time.  This must be the benefit of correct path config.

                                  Thanks, all of you for, your help.  Especially, you Dusty.  There were suggestions made to me at the start of this thread which didn't get the proper follow-through from me.  I wanted to make sure that I tried every instruction but some of it was just a bit too much at the time.   Like, for instance, what using the "k" switch in the run-box does. And this "PATH" thing was a real hoot! I stated at the time that I didn't want to get too far into this but here I am anyway.  Darn you guys!



                                  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 #41 on: January 26, 2010, 11:58:04 AM »
                                  Quote
                                  And, now that I know I have the choice, I confess, I'll probably open these from a command session, as you suggest.

                                  What ???  410+ reads and 40+ replies and after all this you will not be using the Run box ???   A pox on you sirrah! :'(

                                  Quote
                                  I stated at the time that I didn't want to get too far into this but here I am anyway.  Darn you guys!

                                  You're hooked, this is just the start!!!  Glad to have been a dis-service to you ;D.

                                  D.

                                  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 #42 on: January 26, 2010, 06:59:26 PM »
                                     ;)

                                    Helpmeh



                                      Guru

                                    • Roar.
                                    • Thanked: 123
                                      • Yes
                                      • Yes
                                    • Computer: Specs
                                    • Experience: Familiar
                                    • OS: Windows 8
                                    Re: Basic Help with XP Command-line utilities
                                    « Reply #43 on: January 26, 2010, 08:43:27 PM »
                                    Once you start doing complex command-line scripts, you'll never want to stop!
                                    Where's MagicSpeed?
                                    Quote from: 'matt'
                                    He's playing a game called IRL. Great graphics, *censored* gameplay.

                                    jayell

                                      Topic Starter


                                      Rookie

                                      Re: Basic Help with XP Command-line utilities
                                      « Reply #44 on: January 26, 2010, 09:05:06 PM »
                                      I'd be a liar if I said I hadn't at least wondered about scripts.  Got a site you think would be good for a pre-beginner?  I guess I could just search it but I am in DOS/command line forum after all.

                                      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 #45 on: January 26, 2010, 09:26:45 PM »
                                      Quote from: Jayell
                                      I stated at the time that I didn't want to get too far into this but here I am anyway.

                                      Quote from: Jayell
                                      I'd be a liar if I said I hadn't at least wondered about scripts.

                                      Ha!  ;D ha!  ;D ha!  ;D ha!  ;D

                                      Hook line and sinker here.  1,750,000 Google hits.  And that's just batch scripting, add another zillion for VB scripting, awk gawk etc...

                                      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 #46 on: January 26, 2010, 09:32:25 PM »
                                        Thanks, Dusty.  That ought to keep me busy for awhile.