My user account does not have permission to rename an ApplicationData support folder.
Trying to rename from old name to new name of app.
If I manually do it inside this user account, it throws a permissions dialog for my user account.
If I do it in code, it crashes my app even though I have all kinds of error handling including try catch around it and
Exception handlers at bottom of the code.
1). Is there a way to rename it with the right permissions
2). what exception gets thrown and how do I handle it
3). give up and try to do it in the installer which I guess has more elevated permissions
Why are you trying to rename it ?
Are you sure you’re in ApplicationData and not SharedApplicationData because the user should have permissions to modify in their own ApplicationData folder.
Here is what I’m using…
finit = SpecialFolder.ApplicationData.Child(“Torrid Technologies”).Child(“Retirement Savings Planner”)
Does “Torrid Technologies” exist? You need to check for this folder first. And then you can try with the “Retirement Savings Planner”.
An installer doesn’t have elevated permissions automatically. As usual you have to ask for it - for instance with AuthorizationMBS in your main app.
Considering that Finder itself asks for elevated permissions, I believe this actually is a permissions issue.
It could have been caused if the initial folder was created by an installer to begin with.
Other theories include:
- User inadvertently locked it
- Permissions got changed at some point for some reason
- Repair Permissions went horribly wrong
- User hasn’t attempted Repair Permissions yet
- Ghosts in the machine
Pertinent question still unanswered :
Obviously it is not Tim Turner’s app. Should not the user contact torrid-tech instead of him ?
@Michel: I meant the folder and not the company itself. But thanks for the link anyways. What a delightful website and the app is very special at the moment.
[quote=312321:@Tim Turner]My user account does not have permission to rename an ApplicationData support folder.
Trying to rename from old name to new name of app.[/quote]
Probably do it read-only (for reading old values),
and create a completely NEW folder with the name in request.
My point was that he is messing with another company’s critical files, and the first reflex should be to contact that company for support, instead of trying to hack.
Heck, he does not even say on which system this is.
I bet this is one case of poorly uninstalled app, but since the OP does not want to explain anything, I would be inclined to let him sit in his crap.
That is a rather harsh response
How is it possible to help without even knowing on which system this is ?
That is the proper way. If it was your app, would you like people do haphazard stuff with a possibly critical folder ?
The people at Torrid Tech spent time making sure everything was in the right place with an installer. Why try to second guess them ?
I don’t see where any one even ASKED that… not to mention most of this topic discussion has occured AFTER the last time the OP was even logged on… give the poor guy a chance
That explains a lot. Thanks.
Michel B [quote]My point was that he is messing with another company’s critical files, and the first reflex should be to contact that company for support, instead of trying to hack.[/quote]
Hey guys it’s Monday morning and I’m just now reading all of these responses. I was out of town for a wedding and it WAS the weekend. Sometimes I do work on the weekend but this one I did not. So that’s why I was not responding.
This app is MY APP… the company is mine. So I am “the people at Torrid Tech”…
The company folder is there. Underneath that is a folder with the old app name which I was trying to rename to the new app name. But doing that manually on the hard drive was a Test just to see if it was a permissions problem… and voila it did ask me to type in the user’s password for the account I was testing on. Which explains why my app can’t rename it either.
I think I am just going to not rename the folder and just leave things the way they are so I can get this release out the door.