LesFerch / WinSetView

Globally Set Explorer Folder Views
MIT License
951 stars 39 forks source link

File not found: .\AppData\Win10.ini #49

Closed ryan-hyer closed 1 year ago

ryan-hyer commented 1 year ago

Thanks for this! I hope I can get it to work. Explorer's persistent grouping is killing me.

Everything seems to work fine until I hit Submit, then a terminal window opens and I get the "file not found" error. Not sure what to do differently. I followed the instructions exactly, extracting the folder as directed. I can see that the file in question is actually present. I changed nothing in the dialog before hitting Submit. This is a personal PC, and I am the admin. Windows 11 Home 22H2 22621.819.

LesFerch commented 1 year ago

Hi Ryan. I haven't seen that before. Let's get more details. What's the full path where WinSetView.hta is located?

ryan-hyer commented 1 year ago

Sure, thanks. C:\Users\ryan_\Downloads\WinSetView-main\WinSetView.hta

LesFerch commented 1 year ago

I don't see any issue with the path. Underscores are fine. Even spaces are fine. But in case there's something we can't see, try moving the WinSetView-main folder to the root of C: and see if it works from there.

ryan-hyer commented 1 year ago

Okay, the path is now "C:\WinSetView-main\WinSetView.hta", but nothing changes. I still get the "File not found" error.

LesFerch commented 1 year ago

That appears to eliminate the path as the issue. It's unlikely your download is corrupted, but it couldn't hurt to delete it and download a fresh copy, if you haven't tried that already. Is there anything more to the error in the PowerShell console? If you run it again and hold down the Alt key when you click Submit, that will keep the console display on screen.

LesFerch commented 1 year ago

And what aniti-virus or anti-malware software is installed?

ryan-hyer commented 1 year ago

Alright, I've downloaded and extracted a fresh copy. However, I still get the same error. The PowerShell window doesn't immediately disappear. It displays the error, followed by "Press any key to continue:", which is itself inaccurate, since the only key that actually closes the window is the Enter key. If I hold down the Alt key like you said, the window doesn't close, but I just get dropped back to the usual command prompt.

The only anti-virus I have is the built-in Windows one. I do have MalwareBytes installed, but it does not run in the background.

LesFerch commented 1 year ago

Can you post a screenshot of that console window?

LesFerch commented 1 year ago

If you enter the following command (after getting dropped back at the console prompt) do you get the same error?

.\WinSetView.ps1 .\AppData\Win10.ini

ryan-hyer commented 1 year ago

That command seems to have worked! Awesome, thank you!!!

Let me know if you want me to do any more troubleshooting around the error, but otherwise, I'm happy.

The only clue I might have found is that, after moving on from the error, the command prompt I get in PowerShell displays the path I set up as the default in my PS profile, which is not the folder where I put WinSetView. Could the script be erroneously looking for Win10.ini in that folder somehow? I'm not sure if that makes a difference or not, but it's the only thing that stood out to me as a possibility.

Thanks again! You're a lifesaver.

LesFerch commented 1 year ago

Yes, that must be it. The script uses relative directory paths. I'll play around with changing the PS profile and I should be able to replicate the error and then figure out a fix. Thank you!

LesFerch commented 1 year ago

I guess you created a Profile.ps1 file in either the machine or user's PowerShell (or WindowsPowerShell) folder that contains a set-location command to change PowerShell's default folder. I was able to replicate the error that way.

And, of course, when you entered the command .\WinSetView.ps1 .\AppData\Win10.ini, and it worked, you must have first changed your current directory to the directory containing WinSetView. It would have been nice to tell me that. 😉

I'll work on a fix for this and, while I'm at it, I'll change that prompt (that hopefully never appears) to say press the Enter key to continue.

LesFerch commented 1 year ago

Fixed in version 2.45 which is now available for download.

ryan-hyer commented 1 year ago

Yes, you are correct. I changed my default directory using a profile.ps1 file. And, correct again, I had to change the directory before I could run your terminal command, and that's why the thought occurred to me in the first place. :)

Thanks again! 🎉

LesFerch commented 1 year ago

👍