Latest Windows Update Broke UnRen.bat

TheMann421

Newbie
May 13, 2017
94
66
Hey Folks,

Awhile back I ran across a batch file called unren.bat (can't find the original post), that worked 100% of the time for unpacking/adding devmode to renpy games.

Sadly, my recent update to Windows 10 1703 (Creators Update) has killed this. Everytime I run the file, it is filled with errors referring to Powershell.

Unrelated to this (kind of), I noticed that shift + right clicking a folder now provides the option of "Open Powershell Window Here" rather than command. It seems that powershell has taken over in the recent windows update, does anyone know how to reverse these changes or just simply restore UnRen.bat to working order?
 
  • Like
Reactions: InvincibleDespair

FallenLondon

Active Member
Aug 5, 2016
716
503
That's a lot of stuff to go into.
First: cmd.exe still exists. It's just slowly being phased out. PS will run everything that CMD does, but there's (at least) one big difference in using it. The current path is *not* in the search path (this was never a sane idea anyway, ask any *nix person). So if you want to run unren.bat from the active directory you'll have to type ./unren.bat. Or better, let PS do that for you: type un and press <tab>. This uses commandline completion and will complete ./unren.bat for you. There's also some tricky things like PS aliases having the same name as CMD-executables (and being called preferentially), so if a command doesn't work as you expect type the full path to the executable (commandline completion works here as well).
Second: you can switch to cmd.exe in PS by typing CMD. Return to PS by typing exit. Doesn't work in PS ISE.
Third: from explorer you can start a CMD window by typing CMD in the address bar. It opens in the location your explorer was at.
 

FallenLondon

Active Member
Aug 5, 2016
716
503
Interesting. You can also create a shortcut to cmd.exe in %appdata%\microsoft\windows\sendto. After that you can start cmd by rightclicking something and choosing send to -> cmd. It will start in c:\windows\system32 by default.
 

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,735
29,126
Just a quick note:

So, I was having the 'cant find directory' error. The extracted folder had some spaces and brackets in the filename, so I deleted the spaces and other unusual characters([ and ]) from the folder name, and unren.bat worked after I renamed it. Dunno if this relates to the .cmd issue y'all are talking about, but I figured this might help someone (read - with My Legacy).