Discussion Locked

Run BAT file when clicked on.

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Some of the NT PC's in our computer lab have the command default set to OPEN, not RUN a BAT file. I cannot change the default from the file view option box because the button to change the default is greyed out. How do I change the command default to RUN, not OPEN a BAT file.

8 replies

by james hardy

check to make sure there isn't a double extension on the bat file like

myfile.bat.txt

sometimes this can happen.

by joseph moore

Open Regedit and go to:
HKEY_CLASSES_ROOT\batfile\shell

There you will see edit, open and print.
You can delete open to remove the open option.
Then, add a key called run.
Under run make a new key called command.
In command, make its defaultvalue equal what the run value should be. I don't know what the run command would equal; my NT workstation uses open instead of run!
You could go to one of your machines that IS using run, go to this same Registry location, and see what their run --> command default value is.
For open, the default command value = ""%1"%*

Hope this helps.

by mm212

Follow the instructions above and enter the following in (Default) under the new Command Key you just added. (Be sure to include all quotes as below):

"%1" %*

Note: There is one space between the second set of quotes and the percent sign.

by mm212

Sorry, must have missed the last couple of lines of that last message. Ignore mine please.

This discussion is closed to new replies.