- Device
- LG Stylo
Ran into an interesting problem coding my ModIDE program tonight after i had my computer hijacked by windows 10 required creator's update (yeah you can delay, ignore, even mess with registry to try to avoid those, one day or another they lock you into these dam updates)
Anyways, Microsoft has been pushing powershell, cmd(command line) replacement since windows 7. (Skip next part for tip)
///RANT
Obviously 95% of windows users have no clue what that is and panic when they see a scary black box on their screen, usually end up calling customer hotlines and feel they are helped by these IT techs answering questions like "is your computer plugged in"
The other 5% use linux primarily and wouldn't dream of switching to windows for shell computing, or outside of that 100% are not windows users and won't switch, my point is windows is too little too late, nobody wants a souped up windows shell and they aren't making any converts so stop screwing with the one stable thing windows had left arggggh
///END RANT
ok i feel a little better, so heres the issue. in the new update, not only have they put powershell as the default shell (fixable in settings or typing cmd in search), they upped the security for commands, probably a good thing but you get useless error messages like "unable to open output file" if using a folder like root c:\ for example. took me awhile to figure this out when im trying to access ildasm programmatically thru my project
but, found a way to rewrite the command that works in both powershell and cmd
tl;dr answer
1. Move the file to a designated lower security area, like documents, downloads, etc, not root, desktop or the like(alternatively you can change security on desired folder, but bad idea)
2. write your command so output is in a less secure folder as well
3. unless commands original folder is in PATH, command won't work EVEN IF .EXE IS IN SAME FOLDER. the workaround that works either way includes explicet typing of the folder, for example i had ildasm in my folder, the command
C:\userfoo\documents\ildasm.exe assembly-charp.dll /out=windows-sucks.il /all
wouldnt work. The correct way now is
C:\userfoo\documents\.\ildasm.exe assembly-charp.dll /out=screwyou_gates.il /all
Notice the additional ".\" added. That technique will work for both shells when in a user-writable folder.
Hopefully you wont have to deal with this, but if so hope that helps you out and happy modding!
Anyways, Microsoft has been pushing powershell, cmd(command line) replacement since windows 7. (Skip next part for tip)
///RANT
Obviously 95% of windows users have no clue what that is and panic when they see a scary black box on their screen, usually end up calling customer hotlines and feel they are helped by these IT techs answering questions like "is your computer plugged in"
The other 5% use linux primarily and wouldn't dream of switching to windows for shell computing, or outside of that 100% are not windows users and won't switch, my point is windows is too little too late, nobody wants a souped up windows shell and they aren't making any converts so stop screwing with the one stable thing windows had left arggggh
///END RANT
ok i feel a little better, so heres the issue. in the new update, not only have they put powershell as the default shell (fixable in settings or typing cmd in search), they upped the security for commands, probably a good thing but you get useless error messages like "unable to open output file" if using a folder like root c:\ for example. took me awhile to figure this out when im trying to access ildasm programmatically thru my project
tl;dr answer
1. Move the file to a designated lower security area, like documents, downloads, etc, not root, desktop or the like(alternatively you can change security on desired folder, but bad idea)
2. write your command so output is in a less secure folder as well
3. unless commands original folder is in PATH, command won't work EVEN IF .EXE IS IN SAME FOLDER. the workaround that works either way includes explicet typing of the folder, for example i had ildasm in my folder, the command
C:\userfoo\documents\ildasm.exe assembly-charp.dll /out=windows-sucks.il /all
wouldnt work. The correct way now is
C:\userfoo\documents\.\ildasm.exe assembly-charp.dll /out=screwyou_gates.il /all
Notice the additional ".\" added. That technique will work for both shells when in a user-writable folder.
Hopefully you wont have to deal with this, but if so hope that helps you out and happy modding!
