amakvana / SwitchEmuModDownloader

SwitchEmuModDownloader - A Cross-Platform One-Click Games Mod Downloader for Switch emulators. Formerly YuzuModDownloader.
GNU General Public License v3.0
567 stars 35 forks source link

Unmanaged exception: if program is in C:/Program Files (x86)/ and you run it for the first time, you will face "Access Denied" error #11

Closed dag7dev closed 2 years ago

dag7dev commented 2 years ago

Describe the bug If program is in C:/Program Files (x86)/ and you run it for the first time, you will face "Access Denied" error

To Reproduce Steps to reproduce the behavior:

  1. make a new folder in the default install folder
  2. run yuzumoddownloader
  3. click on "download yuzu game mods"
  4. unmanaged exception will prompt

Expected behavior The program should refuse to run, if it doesn't have required permissions on its folder.

However, a nicer solution should be found (e.g. saving everything in %appdata%)

Desktop/Laptop (please complete the following information):

dag7dev commented 2 years ago

Extract contents of the YuzuModDownloader.zip file into your Yuzu root folder

Didn't read this.

However, the exception is still there, it would be nice to have that exception managed in any way!

amakvana commented 2 years ago

I will look into handling the exceptions better, displaying user friendly messages. That was thrown because the program was placed inside a folder that doesn't grant write permissions without elevating.

Usually Emulators in general are advised against being stored inside %programfiles% or %programfiles(x86)% due to needing write permissions

dag7dev commented 2 years ago

I will look into handling the exceptions better, displaying user friendly messages. That was thrown because the program was placed inside a folder that doesn't grant write permissions without elevating.

I think this could be helpful in any way: https://stackoverflow.com/questions/21755835/check-if-path-is-in-program-files