Open infamoussabre opened 3 years ago
@infamoussabre you need to run it in cmd prompt from data directory. @rynho can you add checks to make sure we're running from proper place (and maybe update instructions), because double-clicking indeed runs script in system32?
The .cmd does not appear to be written to be run from the /data directory. If it was, it would not contain "cd data". If the author intends for it to be run from within /data, they should put it in /data. That still wouldn't fix the issue, however.
Double clicking the .cmd works just fine. If one intentionally runs it as an administrator, this is when the issues occur. As you said, checks are necessary.
Sorry @infamoussabre.. The .cmd was directly translate line by line from .sh, which is not considering windows binaries. It’s a problem when you double-click the .cmd from any parent folder of unintended windows folders, e.g., c:\; or right-click and choose “run as admin”, because windows would launch cmd in “system32” folder, thus making damage.
@isage, I fixed in pull-request #12, by adding working folder check.
As the title says, prepare.cmd will delete random .exe and .dll from System32 if run as an administrator. This only resulted in having to reinstall DirectX and GPU drivers for me, but YMMV.