Run .bat files with cmd again

Hey, I accidentially went to go and run a .bat file and I (instead of using cmd) chose the default application to be notepad.exe
I attempted to reset the .bat extensions registry, however that did not work. How do I make it go back to default app being cmd?
P.s. Some of those files name(s) were changed to fool people into thinking they do something they don’t (it’s a prank lol)
Thanks guys!!! (Also, I couldn’t find anything on Google… Maybe I wasn’t searching up what I needed to…)
– BlackVikingPro | blackvikingpro.com

if changing the register didn’t solved that yes :‘(
also
black00vikingpro: it’s just a prank bro
s4m p3pp3r confirmed
WaRWolFz crew

K, unless I was changing the registry to something else, or not the right thing. Whats your registry for the .bat files?
– BlackVikingPro | blackvikingpro.com

Just do right click on file, open with –> choose other and set one program by default
In your case you would choose cmd as default program when it’s about .bat format file :)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\’‘ at line 1


these are the only options I get in the context menu………..
– BlackVikingPro | blackvikingpro.com

Go to properties
@dloser lol.. again
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\’‘ at line 1

Sometimes it works if you just plug off your graphics card and plug it back in, for me it worked several times. The only problem is when you have a laptop, if this is the case unfortunately you have to completely format your laptop. Be sure to take a backup of all your files, including the registry so that you can restore it back.

*Sigh
Here:
assoc .bat=batfile
PS.: Start C:\Windows\System32\cmd.exe with elevated rights first (Administrator) before executing the command.



http://prntscr.com/ak48hm < Sorry @DOSmaster , the cmd thing did not work :/
– BlackVikingPro | blackvikingpro.com

The hell?
Did you retry to open it? :D
Maybe this is what you need.
ftype batfile=C:\Windows\System32\cmd.exe "%1" && assoc .bat=batfile
Before:
After:
Then retry opening the file.
Might there be an issue then:
procedure OpenHelp;
const
helpUrl = 'http://superuser.com/questions/29717/associate-a-file-type-with-a-specific-program';
begin
ShellExecute(Application.Handle, 'open', PChar(helpUrl), nil, nil, SW_SHOWNORMAL);
end;

Excellent last bit of code there DOS master, seems like this will really help OP.
Will also give him a place for his questions.
I sense your tolerance for pibcac is wavering.

@DOSmaster This didn’t work either. Plus, I dunno where to execute that last bit of code…
It did change the registry though, back to it’s original, unchanged form.
I really don’t know how I messed it up THIS much. Kinda dissapointing though. I can still run .bat files, just have to have the .cmd extension instead of .bat…… The .cmd extension still works!
– BlackVikingPro | blackvikingpro.com

Are we still on this? :P
The default settings are:
C:\>ftype batfile && assoc .bat
batfile="%1" %*
.bat=batfile
C:\>
@DOSmaster**: cmd.exe doesn’t accept a command line (edit: or executable) as argument.





What about:
- SHIFT+Right clic on a .bat file
- “Open with”
- Browse
go to: C:/windows/systme32/
Select: cmd.exe
- select: “remember this option”.
Done.
LINUX is simple, it just takes a genius to understand its simplicity
Dennis_Ritchie


Or in other way:
Try gnome-terminal, konsole, xterm, rxvt, kvt, nxterm or eterm…. with sh (bourne shell),ash,bash,dash,zsh,or ksh if you want, but don’t use microsoft…From DOS to powershell, you’ll never have the same experience ;)
ok i ->[ ]
LINUX is simple, it just takes a genius to understand its simplicity
Dennis_Ritchie

You array? :P
And PS isn’t as easy as it looks either, when you get into managing servers with it.
But I strongly agree on Linux distros being waaay better then Windows. (Unless you’re called OpenSuse or Ubuntu.)
PS.: I think you forgot to write Bourne-again shell (B.A.Sh or BASH as we know it.) as it’s the Linux version of the Unix v7 Bourne Shell (SH) {It could be that 32v has it as well, but I am not sure about that.}

[quote=DOSmaster]PS.: I think you forgot to write Bourne-again shell (B.A.Sh or BASH as we know it.)[/quote]
No no, i don’t:
with sh (bourne shell),ash,
bash ,dash,zsh,or ksh if you want
[Mode history on]
The Bourne shell (Sh) was the default shell for Unix Version 7. (made in 1977)
https://en.wikipedia.org/wiki/Bourne_shell
bash = Bourne-again shell is a Unix shell and command language for the GNU Project as a free software replacement for the Bourne shell. (made in 1989)
[Mode history off]
And :
POWERSHELL: First appeared the 14 November 2006 :)
Microsoft take 29 year to realize that CLI is better than GUI ;)
my first answer makes perfect sense, for a windows question, need a windows answer…
the array[] goes… :p
PS: We don’t know yet if BlackViking have succeeded for his probleme!
LINUX is simple, it just takes a genius to understand its simplicity
Dennis_Ritchie


LINUX is simple, it just takes a genius to understand its simplicity
Dennis_Ritchie