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


3dcheapskate posted Sat, 25 April 2020 at 4:04 AM

Okay, back to square one.

  1. What is the problem I ran into ?

If, and only if, (a) Poser was installed in the Windows-recommended location under C:Program Files, and (b) my script is run from an external runtime not on the C: drive, then my Smart+ script crashes when it tries to (over)write.

Using _poser.TempLocation() _instead of poser.AppLocation() resolves that, and _shouldn't _cause any new problems. Except that poser.TempLocation() is not available in Poser 6 - it was introduced in either 7, 8,or 9.

  1. And what exactly am I trying to do here regarding 'datafiles' ?

Considering just the Smart+ script, I have a single datafile, SmartPlusData.txt, used by both Poser and DAZ Studio.

If the user has multiple versions of Poser I want them all to use the same datafile.

If the user has both Poser and DAZ Studio I want them both to use the same datafile.

The solution I adopted 4 years ago was to put the datafile in any single Poser runtime (I chose an external Poser 6 runtime) and to ensure that runtime was mapped from every Poser version and every DAZ Studio version that I had installed.

Since the scripts have only ever had to read this datafile I've had no problem so far.

However, now that I want to write to this datafile (and I want to be able to write to it from** any** of the Poser or DAZ Studio versions that I have installed) I can see a similar UAC problem coming.

So I'm trying to decide on the best location for this datafile. Windows and MacOS.


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident. And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU or something else.
*soon only to be available in two flavours - 
 DAZ and Renderosity