|
Answer» I am using Windows Server 2003.
My problem is that after creating the batch file with .bat extension, when i try to run it by doulbe clicking it, then it is opened in Notepad instead of exececution.
Moreover, the icon of the batch file is ALSO of Notepad.
If you created it in notepad, very likely it has a .txt extension
Check your explorer view and ensure that 'Hide extensions for known file types' is unchecked
GrahamOr just open the file with Notepad and go to File --> Save As --> file.batThanks for the reply.
I have made sure that extension of these files is bat.
These files run successfully when i run them from command prompt but could not run by mouse double click.
I REMEMBER, once i tried to add bat extension in the folder OPTIONS box at Tools->Folder Options to open these in Notepad which i removed after that.
From that time, i am getting this problem. Try this from a command prompt ASSOC .bat will show you what is associated with .bat files ASSOC .bat=
should remove the association if it isnt what you want
not too sure if that will RESTORE the NORMAL operation or not
Graham Right click any batch file in Explorer. Choose "open with...", select cmd.exe, and check "always use for files of this type". DOH! even easier GI can't do that here. When I right click a Batch File, it doesn't give ma an 'Open With' option...
Edit: Wait, This is Windows XP and he is using Windows 2003 Server. Might be different, I don't know.Thanks for all that help.
My problem is solved when i executed the following command on the command prompt
ASSOC .bat=batfile
Excellent ! my post wasnt wasted after all Graham
|