Forum: Poser Python Scripting


Subject: Best way to help less advanced users to correctly install a Poser script?

HartyBart opened this issue on Oct 28, 2022 ยท 5 posts


ironsoul posted Mon, 31 October 2022 at 1:41 PM

Excellent idea, just include/drop the install file in the same directory as the python scripts and run

I always think that automation/install scripts follow a 10/90 rule where 10% of effort achives 90% of the functionality but the remaining 10% takes 90% of the time.


These are the thoughts I try to follow when automating a process like an install


 1. Don't modify/delete a users existing files without their consent

 2. Don't trash either the application or other peoples scripts

 3. Use atomic operations where possible so its easy to revert if the script fails

 4. Don't mess up the users hard drive with unnecessary files

Sure there are others, helps to be paraniod :)


Point 1 - Display files to be changed and use set /p to seek confirmation

Point 2 - More difficult, use unique file nameing conventions so less likely to overwite another persons files

Point 3 - Rename function is very powerful when building complex installs - generate new files in temp area and if all works ok at the end just rename file/directory. This is important if the program is running and may lock a file, easier a rename a directory than wind back many ops incase of a failure

Point 4  - Need to consider if version specific and also if user runs the script if no install exists


Just from a discussion point of view, Immediate thought on script is what what happens if more than one version of Poser install

For version specific installs the reg command might help (might be possibe to refine reg command line other otherwises a "for" + "findstr" might do the trick



To find current active version of Poser the "ftype" command, again I wondering if the for command can be used to pull this into an environ var