JSI Tip 2308. Where is the 'Open with' command when you right click an executable in Windows 2000?


When you right click an executable file (.exe, .bat, .com) in Windows 2000, the Open with command is missing.

For a .bat file, you can click on Edit to open the file in Notepad.

Unlike Windows NT, when you press the Shift key, the Open with command does not appear.

This new behavior is by design.

To open an executable in the editor of your choice, you must start the editor and use the File / Open command.

If you want to add your favorite editor to .exe:

1. At a command prompt, type assoc .exe, which returns .exe=exefile.

2. Use Regedt32 to navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell.

3. Use Add Key on the Edit menu to add the name you want to see when you right click. Leave Class blank. For this example, I want to see Notepad.

4. Select the new Notepad key and use Add Key on the Edit menu to add a command subkey.

5. Select the new command key and use Add Value on the Edit menu to add an blank (unnamed) value name as a type REG_EXPAND_SZ.

6. Set the string to the full path of the executable, followed by a space and "%1". For Notepad, set it to %SystemRoot%\System32\NOTEPAD.EXE "%1"

The resulting exefile key, with the new entries bolded, is:

Key Name:          SOFTWARE\Classes\exefile
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            Application
 
Value 1
  Name:            EditFlags
  Type:            REG_BINARY
  Data:            
00000000   38 07 00 00                                        8...
 
Key Name:          SOFTWARE\Classes\exefile\DefaultIcon
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            %1
 
Key Name:          SOFTWARE\Classes\exefile\shell
Class Name:        <NO CLASS>
Key Name:          SOFTWARE\Classes\exefile\shell\NotePad
Class Name:        <NO CLASS>
 
Key Name:          SOFTWARE\Classes\exefile\shell\NotePad\command
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_EXPAND_SZ
  Data:            %SystemRoot%\System32\NOTEPAD.EXE "%1"
 
Key Name:          SOFTWARE\Classes\exefile\shell\open
Class Name:        <NO CLASS>
Value 0
  Name:            EditFlags
  Type:            REG_BINARY
  Data:            
00000000   00 00 00 00                                        ....
 
Key Name:          SOFTWARE\Classes\exefile\shell\open\command
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            "%1" %*
 
Key Name:          SOFTWARE\Classes\exefile\shell\runas
Class Name:        <NO CLASS>
Value 0
  Name:            Extended
  Type:            REG_SZ
  Data:            
 
Key Name:          SOFTWARE\Classes\exefile\shell\runas\command
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            "%1" %*
 
Key Name:          SOFTWARE\Classes\exefile\shellex
Class Name:        <NO CLASS>
 
Key Name:          SOFTWARE\Classes\exefile\shellex\DropHandler
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            \{86C86720-42A0-1069-A2E8-08002B30309D\}
 
Key Name:          SOFTWARE\Classes\exefile\shellex\PropertySheetHandlers
Class Name:        <NO CLASS>
 
Key Name:          SOFTWARE\Classes\exefile\shellex\PropertySheetHandlers\PifProps
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            \{86F19A00-42A0-1069-A2E9-08002B30309D\}

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish