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

0 Members and 1 Guest are viewing this topic.

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.