.bat files on windows server 2000

G

Guest

Hello,

I am trying to run a .bat file on a Windows 2000 Server. However, nothing
happens when I try to run it. Is there an administrative setting where I can
allow .bat files to run?

Thanks!
 
S

Steve Duff [MVP]

You can't directly edit the .bat assocation in Explorer file associations dialog because there's
a setting that prevents you from changing or even seeing it there.

I've included the "batfile" definition
from my Win2K registry in this post which you can try adding to your registry to replace what
is there. If this part of the linkage is damaged, replacing it will fix the problem. You should only try this
if you are comfortable using regedit. Otherwise, try the in-place upgrade repair (below.)

Copy the registry text below to a "bat.reg" file on your system. Then open regedit and find your existing
BATFILE subkey (under HKEY_CLASSES_ROOT) and rename the key to something else just to save
it in case you want to restore it later. Now file...import this bat.reg file which will create the new batfile key.
If you refresh the regedit display you should now see it.

If this doesn't help or you're not comfortable doing this then one of the other linkages in the registry
may be incorrect or a Win2K system file may be incorrect. This can happen after certain viruses
attack your system for example.

A repair install of Win2K is the quickest way to clean this up. Put the CD in and "upgrade". This will roll
you back to the service pack level on the CD so you'll need to reapply all updates, but it will usually fix this
sort of problem without a lot of head-scratching.

Steve Duff, MCSE, MVP
Ergodic Systems, Inc.

*****Extract starting on the line below*****
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\batfile]
@="MS-DOS Batch File"
"EditFlags"=hex:30,04,00,00

[HKEY_CLASSES_ROOT\batfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,35,\
00,33,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell]

[HKEY_CLASSES_ROOT\batfile\shell\edit]
@="&Edit"

[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
00

[HKEY_CLASSES_ROOT\batfile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\batfile\shell\print]

[HKEY_CLASSES_ROOT\batfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\batfile\shellex]

[HKEY_CLASSES_ROOT\batfile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\PifProps]
@="{86F19A00-42A0-1069-A2E9-08002B30309D}"
*****Extract to this line*****
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top