Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

xxx.bat problem.

- - - - -

  • Please log in to reply
15 replies to this topic

#1
tanfwc

tanfwc

    Newbie

  • Member
  • 17 posts
  • Joined 15-December 03
I am unable to open or edit any file that end with .bat

I also cannot create a new .bat file also. :)

Posted Image

Please help.

I think the file assicotion(sorri for my wrong spelling) is missing.


How to remove advertisement from MSFN

#2
leeleeleelee

leeleeleelee

    Member

  • Member
  • PipPip
  • 256 posts
  • Joined 20-October 03
Open Notepad and drag & drop the .bat file onto Notepad. After editing just click File > Save.

To make a new batch file, again open Notepad and write your text. When finished (or anytime before that) click File > Save as... For the name of the file type "filename.bat" with the quotes. You must add the double quotes if you want to save the file with extensions other than .txt.

Let us know if this helps.
Posted Image

#3
tanfwc

tanfwc

    Newbie

  • Member
  • 17 posts
  • Joined 15-December 03
erm...i am unable to execute the all .bat file...

#4
pkk

pkk

    Newbie

  • Member
  • 20 posts
  • Joined 07-January 04
sry any permissions, propertis, securiti

my computer
Open tools, folder options,file types tab
if you find bat here
simply delete it
because *.bat
dont need a be associated wih any program
at all.

#5
FthrJACK

FthrJACK

    I am a PC...

  • Patrons
  • 3,394 posts
  • Joined 16-August 01
  • OS:Server 2008 x64
go to any folder in windows, then to Tools > Folder Options > View Tab

Untick "Hide Extensions For Known File Types"

theres another reason why you should do this, ill explain why at the end of the post.

Now try rename a text file to filename.bat
If you had file extensions hidden before and you where trying to rename them it would rename them to filename.bat.txt because the .txt part was hidden.

id also recommend creating your bat files in EDIT rather than notepad as then you dont have to keep renaming them all the time when you create them. Open command window, and type "EDIT" without the quotes, create your files in there.

Open regedit, go to start > run type in REGEDIT, press OK.
Look in:

HKEY_CLASSES_ROOT

then .bat

whats in there? there should be a folder called "PersistentHandler" select that and it should have a key on the right hand side window.

have you tried right clicking on a .bat file and doing Open With... and selecting command window?

As for turning on file extensions, apart from making renaming files easier, sometimes viruses are disguised. You can create an .exe file with a zip icon for its icon, then name the file somefile.zip.exe

Now, when downloaded onto a windows XP system it looks just like a zip, shows up as somefile.zip, and how do most people open zips? by left clicking on them! (i nearly always right click, extract to *** folder)


Let us know if you get any closer to solving your problem tanfwc

#6
edeichinger

edeichinger

    computerguywannabe

  • Member
  • 20 posts
  • Joined 01-January 04
fathrjack is right, I think...file association prob..
the shortcut is what he suggested...
go to RUN and type EDIT
see if you can open and edit the *.bat files in there
you should be able to fix any problems from there.
Nice pic btw
Ed
I reserve the right to be wrong please let me know if I am so I can admit it - if what I wrote helps you,, take the time to write me back please- The world is a better place one person at a time -

#7
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,889 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
tanfwc
This may help
Batch File Association Fix
May need reboot
http://www.dougknox..../file_assoc.htm
Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#8
tanfwc

tanfwc

    Newbie

  • Member
  • 17 posts
  • Joined 15-December 03

tanfwc
This may help
Batch File Association Fix
May need reboot
http://www.dougknox..../file_assoc.htm

thank you. It works now.

#9
tanfwc

tanfwc

    Newbie

  • Member
  • 17 posts
  • Joined 15-December 03
there is another problem is that i cannot right click and edit the bat file...how?

#10
Aaron

Aaron

    The MSFN Banana

  • Patrons
  • 5,767 posts
  • Joined 17-August 01
  • OS:Windows 7 x64
  • Country: Country Flag
tanfwc, if you are familiar with the registry make sure you have these keys listed, especially the edit entry:

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]

[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}"



#11
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,889 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
These are the other registry entries needed for .bat
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bat]
@="batfile"

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

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment]
"PATHEXT"=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Control\Session Manager\Environment]
"PATHEXT"=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"PATHEXT"=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH"

[HKEY_CLASSES_ROOT\CLSID\{5e941d80-bf96-11cd-b579-08002b30bfeb}]
@="Plain Text persistent handler"

[HKEY_CLASSES_ROOT\CLSID\{5e941d80-bf96-11cd-b579-08002b30bfeb}\PersistentAddinsRegistered]

[HKEY_CLASSES_ROOT\CLSID\{5e941d80-bf96-11cd-b579-08002b30bfeb}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}]
@="{c1243ca0-bf96-11cd-b579-08002b30bfeb}"


EDIT: forgot the CLSID
Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#12
FthrJACK

FthrJACK

    I am a PC...

  • Patrons
  • 3,394 posts
  • Joined 16-August 01
  • OS:Server 2008 x64
to edit them, you will need to rename the file to somefile.txt and open in notepad, or open in EDIT as described earlier.

if you are going to rename it, make sure you have unticked the hide extensions for known file types as explained before.

#13
tanfwc

tanfwc

    Newbie

  • Member
  • 17 posts
  • Joined 15-December 03
it is not inside. How do i add it in?

#14
tanfwc

tanfwc

    Newbie

  • Member
  • 17 posts
  • Joined 15-December 03

tanfwc, if you are familiar with the registry make sure you have these keys listed, especially the edit entry:

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]

[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}"

it is not inside..how?

#15
FthrJACK

FthrJACK

    I am a PC...

  • Patrons
  • 3,394 posts
  • Joined 16-August 01
  • OS:Server 2008 x64
copy and paste the blue text below into an empty notepad document, and save it. then rename it to somefile.reg

now double click it. a box will pop up asking if you want to add the information to the registry, click yes and it should report back that it was done.

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]

[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}"



#16
Ralle

Ralle
  • Member
  • 9 posts
  • Joined 12-January 04
To edit a .bat file (or any other text based file) on right-click, you could just drop a copy of notepad in the Send To folder:
C:\Documents and Settings\[user name]\SendTo\




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users