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

Author Topic: add a .bat file to right click contents menu  (Read 14569 times)

0 Members and 1 Guest are viewing this topic.

mioo_sara

    Topic Starter


    Intermediate

    add a .bat file to right click contents menu
    « on: May 27, 2009, 05:20:32 AM »
    add a .bat file to  right click  contents menu
    =======================================
    hi
    is there a way to  add a .bat file to  right click  contents menu?
    if its so  give me the exact  string for .reg file
    thanks

    Carbon Dudeoxide

    • Global Moderator

    • Mastermind
    • Thanked: 169
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Experience: Guru
    • OS: Mac OS
    Re: add a .bat file to right click contents menu
    « Reply #1 on: May 27, 2009, 05:35:44 AM »
    Not sure what you mean. What Right Click menu? What would its purpose be?

    macdad-



      Expert

      Thanked: 40
      Re: add a .bat file to right click contents menu
      « Reply #2 on: May 27, 2009, 08:04:01 AM »
      I believe he means on the "New" Item under the File menu, he wants to add a Create new Batch File:


      View this:
      http://windowsxp.mvps.org/shellnewadd.htm

      [attachment deleted by admin]
      If you dont know DOS, you dont know Windows...

      Thats why Bill Gates created the Windows NT Family.

      Carbon Dudeoxide

      • Global Moderator

      • Mastermind
      • Thanked: 169
        • Yes
        • Yes
        • Yes
      • Certifications: List
      • Experience: Guru
      • OS: Mac OS
      Re: add a .bat file to right click contents menu
      « Reply #3 on: May 27, 2009, 08:29:15 AM »
      Intriguing....I never thought of that...

      TweakUI, the Windows XP Powertoy, can do it.
      http://www.microsoft.com/windowsxp/Downloads/powertoys/Xppowertoys.mspx
      http://download.microsoft.com/download/f/c/a/fca6767b-9ed9-45a6-b352-839afb2a2679/TweakUiPowertoySetup.exe


      If you're looking for a way to do it via the Registry, don't. It's not worth it.

      macdad-



        Expert

        Thanked: 40
        Re: add a .bat file to right click contents menu
        « Reply #4 on: May 27, 2009, 10:19:26 AM »
        Thought about bringing that up, and yea...registry is not worth it for such a simple operation.
        If you dont know DOS, you dont know Windows...

        Thats why Bill Gates created the Windows NT Family.

        mioo_sara

          Topic Starter


          Intermediate

          Re: add a .bat file to right click contents menu
          « Reply #5 on: May 27, 2009, 11:32:25 AM »
          thanks guys
          links above were really  helpful

          devcom



            Apprentice

            Thanked: 37
            Re: add a .bat file to right click contents menu
            « Reply #6 on: May 27, 2009, 12:01:17 PM »
            you can use this anyway:

            Code: [Select]
            Windows Registry Editor Version 5.00

            [HKEY_CLASSES_ROOT\.bat\ShellNew]
            "Data"="@echo off"
            "ItemName"="@%SystemRoot%\\system32\\notepad.exe,-470"

            i have it like this and it works ;)
            Download: Choice.exe

            mioo_sara

              Topic Starter


              Intermediate

              Re: add a .bat file to right click contents menu
              « Reply #7 on: May 27, 2009, 03:07:26 PM »
              Quote
              you can use this anyway:

              Code:
              Windows Registry Editor Version 5.00

              [HKEY_CLASSES_ROOT\.bat\ShellNew]
              "Data"="@echo off"
              "ItemName"="@%SystemRoot%\\system32\\notepad.exe,-470"

              i have it like this and it works

              sorry devcom
              i  copied your codes in  a reg  key   and execute it but i dont have  it in  my  right click why?
              should i  restart my  win xp?

              i  dont want  .bat in  my  new
              i want to  add one program.bat  in  my  right click

              devcom



                Apprentice

                Thanked: 37
                Re: add a .bat file to right click contents menu
                « Reply #8 on: May 27, 2009, 03:21:09 PM »
                ok, so you need to look for app ShellExView, this should help you ;)

                Code: [Select]
                http://www.nirsoft.net/utils/shexview.html
                Download: Choice.exe

                BatchFileBasics



                  Hopeful

                  Thanked: 18
                  Re: add a .bat file to right click contents menu
                  « Reply #9 on: May 27, 2009, 06:32:29 PM »
                  do you mean to add files to a right click menu like this?

                  When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

                  mioo_sara

                    Topic Starter


                    Intermediate

                    Re: add a .bat file to right click contents menu
                    « Reply #10 on: May 27, 2009, 11:32:46 PM »
                    yes BatchFileBasics
                    i  need it  to  be avtive both  on  folders and files
                    thanks if you  van  make a script i will  be greatfull

                    BatchFileBasics



                      Hopeful

                      Thanked: 18
                      Re: add a .bat file to right click contents menu
                      « Reply #11 on: May 28, 2009, 06:09:51 PM »
                      well this is for the "all' files but not folders:
                      and you save it in notepad as "anything.REG"
                      Code: [Select]
                      Windows Registry Editor Version 5.00

                      [HKEY_CLASSES_ROOT\*\shell\Name of command\command]
                      @="\"c:\\path of file\\file.bat\" \"%1\""

                      replace "Name of command" with what you want the right click descipt to be.
                      but leave alone the "command" at the end

                      Code: [Select]
                      @="\"c:\\path of file\\file.bat\" \"%1\""
                      adds the key to the registry.
                      your normal file would be c:\path of file\file.bat
                      but all the \ mean to not count as a new command\line

                      regularly it is :
                      Code: [Select]
                      "c:\path of file\file.bat\" "%1"
                      but you need the slashes so:
                      Code: [Select]
                      "\"c:\\path of file\\file.bat\" \"%1\"
                      When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

                      mioo_sara

                        Topic Starter


                        Intermediate

                        Re: add a .bat file to right click contents menu
                        « Reply #12 on: May 29, 2009, 03:55:00 AM »
                        it worked thanks my  dear BatchFileBasics
                        i  have  my.bat file in  my right click options now
                        i am  satisfied now
                        thank you  again

                        BatchFileBasics



                          Hopeful

                          Thanked: 18
                          Re: add a .bat file to right click contents menu
                          « Reply #13 on: May 29, 2009, 04:57:43 PM »
                          you are all welcome to whom gave me a thanked up.
                          :P

                          and mioo_sara, welcome to the forums :)
                          « Last Edit: May 29, 2009, 05:19:54 PM by BatchFileBasics »
                          When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

                          TheHoFL



                            Intermediate

                            Thanked: 5
                            Re: add a .bat file to right click contents menu
                            « Reply #14 on: June 17, 2009, 10:39:17 AM »
                            I know this is an older post, but i tired and have one issue. When i right click a blank area, there is no "Create New BAT" like registry specified. It simply added an option for when i right click an file. Has anyone got this to work on the right click menu or the "File>new" menu?

                            Here is my REG file:
                            Code: [Select]
                            Windows Registry Editor Version 5.00

                            [HKEY_CLASSES_ROOT\*\shell\Create New BAT\command]
                            @="\"C:\\Documents and Settings\\mhofmann\\My Documents\\Test\\file.bat\" \"%1\""


                            Thanks for the help!
                            All your dreams can come true if you have the courage to pursue them.  - Walt Disney