Windows Permissions

Sorry for really basic questions, I’m a Mac user…

For my customer, the application needs to be able to be run by a non-admin. I can install it from an admin account (or with admin permissions) if needed.
I’ve set it to run as Admin and I found that I cannot drag and drop into the app, which is essential.
If I downgrade to User privileges, I cannot save into a required folder.

There are other applications out there that require an admin to install, but then allow the user to drag and drop as required and to install into this “special” folder.

I’m guessing there is some mismatch of permissions between the user account and application instance that is mucking this up.

Can someone tell me the right way to configure this?

I’m going to add to this.
If I build with “user” permissions the drag and drop works (not sure why drag and drop would fail for a file that I can navigate to and open from the same app), but I cannot write to the directory where the files need to go.

I can see in Xojo that the path is not writable.

However, I can go to the desktop and drag and copy a file into that directory without the OS complaining.

Does this make sense?

yup
drag and drop across security zones came up on another thread
let me go find it

EDIT : this one

[quote=485787:@Chris Halford]I’ve set it to run as Admin and I found that I cannot drag and drop into the app, which is essential.
If I downgrade to User privileges, I cannot save into a required folder.[/quote]
I’m not an IT person, but I’ve seen it before where User Access Control (UAC) sees that your app is running with elevated Administrator rights, but Windows File Explorer is running under the context of the current User - which is not elevated. I’m pretty sure this is what prevents the user from dragging files from Explorer into you app. Because in that case Explorer is requesting permissions (from a lower level), which is the opposite of your app doing the file opening. If that makes sense.

One solution may be to run File Explorer as Admin also.

I hope that helps to get you where you need to go.

Read only Permissions …

What “special” folder?

For not sensible folders, you can use your admin installer to set the folder permissions to allow read and write for everyone.

It’s certainly not read only (the drag and drop)

The app saves to the ICC Profile folder. It’s just odd that logged in normally, i can copy files in and out of that directory, but when running an app, it shows up as read only.

And obviously it’s a huge security risk. I mean… what might happen if a user just copied an ICC profile into their ICC Profile folder? Imagine that… their Colour would be right. We can’t let that happen.

Good grief.

The solution is that I’ll advertise my hourly rate as 250% of my programming rate for dealing with installation permission issued, and I’ll be clear that I’m no good at it. That will solve it… for me anyway…

Really need @ to comment as he knows this stuff pretty well
Like on that other thread about this
I’m not sure there is a way to deal with this since its actually the OS blocking certain things - not the app

That is inside the WINDOWS folder. All of its sub folders are Read Only for non admin users. The explorer can be elevated to write in a system folder with the confirmation dialog.

You could use CACLS to change the folder permissions during your install.

SOLUTION:

Xojo reports that the folder is not writeable but I wrote and it worked anyway…
I guess I just don’t check, but wrap my writing in a try/catch and report failure when there is a problem.

Yes there are issues with IsWriteable in windows, try/catch is the best route, glad you got to the bottom of it.