Solved MS Server 2003 Problem - bat file association

Hawaiian

New member
Member
Local time
9:46 PM
Messages
26
Location
Hawaii
I rebuilt a dell 1855 server with MS 2003sp2. During configurations I accidently associated bat file extentions to notepad and can not run bat files. Any assistance is really appreciated.

Thanks ahead of time.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Asus CG1330
OS
Win7 64bit Home Premium
CPU
AMD Phenom(tm) II X6 1035T Processor
Motherboard
ASUSTeK Computer INC. CG1330 Rev X.0x
Memory
8GB Installed - 7.75 Usable
Graphics Card(s)
ATI Radeon HD 5700 Series & ATI Radeon 3000 Graphic
Sound Card
AMD High Definition Audio
Monitor(s) Displays
LG E2350 23" LED & Viewsonic VX2035wm 20"
Screen Resolution
LG ~ 1920x1080 60Hz; Viewsonic 1680x1050 60Hz
Hard Drives
(1) WD - WD1001FALS-99Y6A0 SATA 1TB, (1) 1.5TB USB HDD (2) Seagate 1TB USB HDDs
PSU
450WT
Case
Factory ASUS CG1330
Cooling
Factory ASUS with modified 120MM Inlet 180MM Exhaust
Keyboard
Logitech G15 Gamer
Mouse
Logitech MX500 IE Gamer
Internet Speed
RoadRunner ~ There is never Enough Speed!
Antivirus
Sym Ent 12.x
Browser
IE10 Build 10.0.9200.16635 ~ Ver 10.0.7
Other Info
BIOS Date: 01/28/2011 Ver: 05.01
Hey Hawaiian,

I think I can lend a hand here. To change file type associations in Win2K3:

-Right-click on any file and select Open With....
-Or, right-click on any file, select Properties, and then click Change.

Both of these should allow you to change default associations.

If these don't work for you let me know and I'll see what else I can dig up.
~V
 

My Computer

Computer Manufacturer/Model Number
Custom Rig
OS
Windows 7 Ultimate 64-Bit SP1
CPU
Intel Core i7-2600k OC'd @ 5.0Ghz
Motherboard
ASUS Maximus IV Extreme-Z
Memory
16 GB Corsair Vengeance PC3-12800 (4x4GB)
Graphics Card(s)
XFX 695X DD (x2) in Crossfire
Sound Card
Realtek ALC889 (Integrated)
Monitor(s) Displays
XFX Triple Monitor Display w/ 3 ASUS 23.6" LCD
Screen Resolution
5760x1080 (AMD Eyefinity)
Hard Drives
OCZ Vertex 3 SATA III (120GB)
WD Caviar Black 1.5 TB x2
PSU
XFX ProSeries Black Edition 1000w 80+ Platinum Certified
Case
Cooler Master HAF X Blue Edition
Cooling
Corsair H100 w/ Noctua NF-S12B FLX (x4) Push/Pull
Keyboard
Razer Lycosa
Mouse
Razer Naga & Razer Nostromo
Other Info
ASUS ROG G74SX
-240GB OCZ Vertex II x2 (Raid 0)
Would this work?


Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.bat]
@="batfile"
[HKEY_CLASSES_ROOT\.bat\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
[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]
[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}"
[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\ShimLayer Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"

HKCU Portion, just in case MSServer2003 has it
Code:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat\OpenWithList]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat\OpenWithProgids]
"batfile"=hex(0):
 

Attachments

My Computer

Computer Manufacturer/Model Number
Asus G73SW-XN2
OS
Windows 2000 5.0 Build 2195
CPU
Intel Core i7-2630QM@2GHz(2.9GHz Turbo Boost) [Sandy Bridge]
Motherboard
Asus G73SW (Intel HM65 Chipset)
Memory
Kingston DDR3 1333 16GB (4GBx4)
Graphics Card(s)
nVidia GTX 460m 1.5GB
Sound Card
EAX Advanced HD 5.0, THX TruStudio
Monitor(s) Displays
17.3 in. primary & 23 in. secondary
Screen Resolution
1920x1080
Hard Drives
Seagate Momentus XT (SATA II) 500 GB @ 7200 RPM
Hitachi (SATA II) 500GB @ 7200 RPM

Non Raid because ASUS was crappy to choose an HM65 Chipset
Keyboard
Built-in 102-Key Backlit Keyboard
Other Info
It's a Laptop.
Thanks V43L1N and Arkhi !!! The registry files are the ticket!

I will backup the registry tomorrow at work and run the two reg files. I'm guessing I need to run batch file assoc first then the HCHU reg file.?.

Not ashamed to say I am new to this and really do appreciate all your help. This is the first server I ever rebuilt from scratch. Built one head guess and brain drain at a time. I had to replace both Raid 1 HDD's which meant it was actually a total rebuild from scratch. Worse was I had never setup a Raid drive. It was kool but a lot of head scratching and several pots of coffee and 5-Hour energy bottles.

All was good until I started doing the server lock-downs from a different server built document. Which told me to associate the .bat extension to notepad.exe. After that when i entered a bat file to execute it would only open it in notepad (duh me - thats what i had changed it too and thats when I realized I screwed the pooch).

When I searched the registry there was no .bat or batfile entries. That meant no way to know for sure what to put in the file associations fields to (re-)associate how the entry's were run when the bat file was run from the command prompt.. i.e. what program(s) open/run a batch file command.

What I have managed to do to date is - Currently I can run the bat file but all it does is bring up the command prompt. Then I have to retype the command at the command prompt instead of it running as it should the first time it was input in the Run command.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Asus CG1330
OS
Win7 64bit Home Premium
CPU
AMD Phenom(tm) II X6 1035T Processor
Motherboard
ASUSTeK Computer INC. CG1330 Rev X.0x
Memory
8GB Installed - 7.75 Usable
Graphics Card(s)
ATI Radeon HD 5700 Series & ATI Radeon 3000 Graphic
Sound Card
AMD High Definition Audio
Monitor(s) Displays
LG E2350 23" LED & Viewsonic VX2035wm 20"
Screen Resolution
LG ~ 1920x1080 60Hz; Viewsonic 1680x1050 60Hz
Hard Drives
(1) WD - WD1001FALS-99Y6A0 SATA 1TB, (1) 1.5TB USB HDD (2) Seagate 1TB USB HDDs
PSU
450WT
Case
Factory ASUS CG1330
Cooling
Factory ASUS with modified 120MM Inlet 180MM Exhaust
Keyboard
Logitech G15 Gamer
Mouse
Logitech MX500 IE Gamer
Internet Speed
RoadRunner ~ There is never Enough Speed!
Antivirus
Sym Ent 12.x
Browser
IE10 Build 10.0.9200.16635 ~ Ver 10.0.7
Other Info
BIOS Date: 01/28/2011 Ver: 05.01
That is strange, so the command prompt is not running the batch files, It just opens a command prompt and waits for input?

Have you used the batch file on other systems successfully? It sounds like the batch file you are using is a little off. If you have, I am out of ideas.

I will ask some of the senior members to take a look at this thread when you reply.
 

My Computer

Computer Manufacturer/Model Number
Custom Rig
OS
Windows 7 Ultimate 64-Bit SP1
CPU
Intel Core i7-2600k OC'd @ 5.0Ghz
Motherboard
ASUS Maximus IV Extreme-Z
Memory
16 GB Corsair Vengeance PC3-12800 (4x4GB)
Graphics Card(s)
XFX 695X DD (x2) in Crossfire
Sound Card
Realtek ALC889 (Integrated)
Monitor(s) Displays
XFX Triple Monitor Display w/ 3 ASUS 23.6" LCD
Screen Resolution
5760x1080 (AMD Eyefinity)
Hard Drives
OCZ Vertex 3 SATA III (120GB)
WD Caviar Black 1.5 TB x2
PSU
XFX ProSeries Black Edition 1000w 80+ Platinum Certified
Case
Cooler Master HAF X Blue Edition
Cooling
Corsair H100 w/ Noctua NF-S12B FLX (x4) Push/Pull
Keyboard
Razer Lycosa
Mouse
Razer Naga & Razer Nostromo
Other Info
ASUS ROG G74SX
-240GB OCZ Vertex II x2 (Raid 0)
The batch runs normally on other systems.

Since I had to unassociate the .bat extenstion it wiped all the fields. It also wiped out the registrys entries for "batfile". I am hoping that running your reg file and HKCU keys should reset everything back to normal. ? .

The command to run the "run" is "%1" %* that much I do know. The "runs with application" field was changed when it was "unassociated" and that is what calls and executes the run command. I don't know what to put in there. Just the command it call to "run" is what I dont know. And of course the other commands for "edit" and "print".
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Asus CG1330
OS
Win7 64bit Home Premium
CPU
AMD Phenom(tm) II X6 1035T Processor
Motherboard
ASUSTeK Computer INC. CG1330 Rev X.0x
Memory
8GB Installed - 7.75 Usable
Graphics Card(s)
ATI Radeon HD 5700 Series & ATI Radeon 3000 Graphic
Sound Card
AMD High Definition Audio
Monitor(s) Displays
LG E2350 23" LED & Viewsonic VX2035wm 20"
Screen Resolution
LG ~ 1920x1080 60Hz; Viewsonic 1680x1050 60Hz
Hard Drives
(1) WD - WD1001FALS-99Y6A0 SATA 1TB, (1) 1.5TB USB HDD (2) Seagate 1TB USB HDDs
PSU
450WT
Case
Factory ASUS CG1330
Cooling
Factory ASUS with modified 120MM Inlet 180MM Exhaust
Keyboard
Logitech G15 Gamer
Mouse
Logitech MX500 IE Gamer
Internet Speed
RoadRunner ~ There is never Enough Speed!
Antivirus
Sym Ent 12.x
Browser
IE10 Build 10.0.9200.16635 ~ Ver 10.0.7
Other Info
BIOS Date: 01/28/2011 Ver: 05.01
Okay, let's be sure here. Run the regedit file below FIRST. This removes bat file entries so you can start with new ones. After you do that, run the two reg files I have above. It doesn't matter what order. Restart computer and let us know.

Thanks

Code:
Windows Registry Editor Version 5.00
 
[-HKEY_CLASSES_ROOT\.bat]
[-HKEY_CLASSES_ROOT\batfile]
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat]
 

Attachments

My Computer

Computer Manufacturer/Model Number
Asus G73SW-XN2
OS
Windows 2000 5.0 Build 2195
CPU
Intel Core i7-2630QM@2GHz(2.9GHz Turbo Boost) [Sandy Bridge]
Motherboard
Asus G73SW (Intel HM65 Chipset)
Memory
Kingston DDR3 1333 16GB (4GBx4)
Graphics Card(s)
nVidia GTX 460m 1.5GB
Sound Card
EAX Advanced HD 5.0, THX TruStudio
Monitor(s) Displays
17.3 in. primary & 23 in. secondary
Screen Resolution
1920x1080
Hard Drives
Seagate Momentus XT (SATA II) 500 GB @ 7200 RPM
Hitachi (SATA II) 500GB @ 7200 RPM

Non Raid because ASUS was crappy to choose an HM65 Chipset
Keyboard
Built-in 102-Key Backlit Keyboard
Other Info
It's a Laptop.
It Worked!! Thanks bunches!!

You're Awesome !!
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Asus CG1330
OS
Win7 64bit Home Premium
CPU
AMD Phenom(tm) II X6 1035T Processor
Motherboard
ASUSTeK Computer INC. CG1330 Rev X.0x
Memory
8GB Installed - 7.75 Usable
Graphics Card(s)
ATI Radeon HD 5700 Series & ATI Radeon 3000 Graphic
Sound Card
AMD High Definition Audio
Monitor(s) Displays
LG E2350 23" LED & Viewsonic VX2035wm 20"
Screen Resolution
LG ~ 1920x1080 60Hz; Viewsonic 1680x1050 60Hz
Hard Drives
(1) WD - WD1001FALS-99Y6A0 SATA 1TB, (1) 1.5TB USB HDD (2) Seagate 1TB USB HDDs
PSU
450WT
Case
Factory ASUS CG1330
Cooling
Factory ASUS with modified 120MM Inlet 180MM Exhaust
Keyboard
Logitech G15 Gamer
Mouse
Logitech MX500 IE Gamer
Internet Speed
RoadRunner ~ There is never Enough Speed!
Antivirus
Sym Ent 12.x
Browser
IE10 Build 10.0.9200.16635 ~ Ver 10.0.7
Other Info
BIOS Date: 01/28/2011 Ver: 05.01
Back
Top