Computing.Net > Forums > Programming > batch file not getting open

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file not getting open

Reply to Message Icon

Name: vasu_bidani2009
Date: January 6, 2009 at 07:20:33 Pacific
OS: Windows XP
CPU/Ram: p4 768mn
Product: Hcl india / Hcl ezeebee
Subcategory: Batch
Comment:

windows cannot open .bat files though cmd is intact and does open the file but not directly i think this is due to edit in file types in folder options plzz reply really urgent



Sponsored Link
Ads by Google

Response Number 1
Name: klint
Date: January 6, 2009 at 09:23:30 Pacific
Reply:

I don't think it's Explorer's File Types option. My copy doesn't mention BAT extension in there. It's more likely to be the registry settings. Save the following text file as a BAT.REG file and then double-click it:

[Disclaimer: if it goes wrong, it could mess up your whole system.]

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
REGEDIT4

[HKEY_CLASSES_ROOT\.bat]
@="batfile"

[HKEY_CLASSES_ROOT\.bat\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\.bat\ShellNew]
"FileName"="New.bat"

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

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

[HKEY_CLASSES_ROOT\batfile\shell]

[HKEY_CLASSES_ROOT\batfile\shell\edit]

[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@=hex(2):22,43,3a,5c,50,72,6f,67,72,61,6d,20,46,69,6c,65,73,5c,45,78,65,63,75,\
74,61,62,6c,65,73,5c,4e,6f,74,65,70,61,64,32,2e,65,78,65,22,20,25,31,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,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,33,32,5c,4e,\
4f,54,45,50,41,44,2e,45,58,45,20,2f,70,20,25,31,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}"


0

Response Number 2
Name: Judago
Date: January 6, 2009 at 12:27:33 Pacific
Reply:

I've found that one interesting thing about .bat and .cmd in xp's folder options is that they are not officially listed but can be accessed.

Here's how to edit them, goto Control panel>Folder options>File types. Hit the new button type in bat or cmd and hit the advanced button. The associated file type should load up to "MS-Dos batch file" for bat and "Windows NT command script" for cmd, if they are not automatically selected, select them from the drop down list and click on ok. If you don't hit the advanced button you will get an error that the file type is already in use.

You should now have access to edit openers and the like.

Repeat for every time you need to access the options for bat and cmd.


0

Response Number 3
Name: vasu_bidani2009
Date: January 6, 2009 at 22:17:46 Pacific
Reply:

thanks very much thankuuuuuuuuuuuuuu


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch file not getting open

batch file not finding exe files www.computing.net/answers/programming/batch-file-not-finding-exe-files/17578.html

Batch file, read data in email, open browser www.computing.net/answers/programming/batch-file-read-data-in-email-open-browser/19721.html

Batch file exits after GET command www.computing.net/answers/programming/batch-file-exits-after-get-command/15735.html