extractZipFile problem
-
@Christoph-Hart - yeah that works - I guess the end-user will have to run the installer as admin..
Thanks.
-
@Christoph-Hart said in extractZipFile problem:
What happens if you start HISE as administrator (via right click)?
There‘s not much you can do here on my side - either you have the permission or not.
-- tell me how does this not trip up inno then? (Because I don't think it has permission..)
Unless of course inno tells the os(Windows) that it intends to change something and requires admin access, at which point(before the UI appears) Windows pops its "Will you allow this app to do its thing?" dialog. If so, and I think this is the case, what do we need in HISE to enable this windows call on execution?
-
Or can I just set the "Run as Administrator" Flag in the compiled apps properties , and this would make my downloaded app run as administrator every time?
It should be clear I have no idea about this , anyone have any experience?
-
@Lindon An Inno installer will prompt for permission I think
-
@d-healey said in extractZipFile problem:
@Lindon An Inno installer will prompt for permission I think
yeah -- and I think I might know how to make my app ask for permissions too.... just testing with a 3rd party now....
-
@Lindon Excellent, let us know your results. I need this feature too, in fact I've already implemented it but I didn't test it on Windows and MacOS yet, I might try this afternoon if I have some time.
-
@d-healey sadly the simple "set in my window for all users" - doesnt work...we need a mechanism to define our app to open in admin mode...
-
looks like it could be a setting in the manifest file in the Linker...
https://stackoverflow.com/questions/19617955/c-run-program-as-administrator
-
@Lindon Working on a test project now, I'll report my results.
-
Something I just saw in the docs which might be of interest but isn't a solution to the problem:
This method will extract a standard ZIP file (without password protection) to the given target directory (which can be either a file path String or a File object).
So you don't need to use
FileSystem.fromAbsolutePath()
, you can just pass in the string. -
I can confirm the issue on my system, can't extract to anywhere on the C drive. I'll keep investigating.
I've made a simple little test application for anyone who wants to play around with this. A test zip file is included in the project folder.
-
@Lindon Yep you're correct. Add
/MANIFESTUAC:level='requireAdministrator'
to the linker flags section in Projucer and when your app starts you'll be prompted to give permission. Not sure how this will affect plugins, I'm going to test it now. -
@d-healey yeah I did this the other way(via VisualStudio)
and this seems to work too...
-
@Lindon I tested in a plugin and it doesn't work. I assume that the plugin takes on the same privilege level as the host.
I'm going to test on MacOS now.
-
@d-healey said in extractZipFile problem:
@Lindon I tested in a plugin and it doesn't work. I assume that the plugin takes on the same privilege level as the host.
I'm going to test on MacOS now.
-- test a stand alone on MacOS? yes? say yes, go on say yes...
-
@d-healey said in extractZipFile problem:
@Lindon I tested in a plugin and it doesn't work. I assume that the plugin takes on the same privilege level as the host.
I think this may well be why NI Native Access and Arturia Software Centre etc. are stand alone programs only....they wont work as plugins because of this permissions issue...
-
-- test a stand alone on MacOS? yes? say yes, go on say yes...
Yes. Just tested and it works fine, no permission issues. At least on my system.
I'm going to add that linker flag to my HISE fork's standalone template so it will automatically be added every time I export a standalone project.
-
@d-healey - yeah I think MacOS is a bit more permissive than Windows - no surprise - it gets hacked a lot less.. but good to know, on to the next problem - well done.
-
I've added a note about this to the docs - https://github.com/christophhart/hise_documentation/commit/0ced485944bc94c2bade19ab6a037d10c6db4c04
-
@d-healey yes but please don‘t make this the default - most people won‘t need admin access and it will look weird for a random eq plugin to ask for write access to the system folders.