Forum: Poser Python Scripting


Subject: How do you avoid UAC problems writing to poser.AppLocation() subfolders ?

3dcheapskate opened this issue on Apr 23, 2020 ยท 38 posts


ironsoul posted Mon, 27 April 2020 at 2:04 AM

I believe the purpose of the %APPDATA% location in Windows is a safe place for applications to store data, the folder is normally hidden in explorer so less likely a user will delete when spring cleaning their c: drive. For Mac Users there appears to be a similar folder called "~/Library" - I'd recommend you check this with a Mac user rather thsn take my word for it.
Assuming this is correct you could do the following

if os is windows
myFolder = os.environ['APPDATA'] + '/ 3DCheapskate-Poser-DAZ-SmartPlus'
else if os is macos.
myFolder = '~/Library/3DCheapskate-Poser-DAZ-SmartPlus'

Another suggestion is to create a file called README.txt in the 3DCheapskate-Poser-DAZ-SmartPlus directory that contained a brief explanation what the directory is used for.