Deploying maxscripts and Vista

I know most people that released script packs would put them in (root)/Scripts/(their folder), and use a startup launcher in (root)/Scripts/Startup/, or something similar. But Vista doesn’t allow writing to Program Files (I think?), or at least it is discouraged/a pain. I assume most of us at work are using a versioned local directory that has nothing to do with Max, and calling a startup script from max to that dir, but since this is for a non-standard distribution, what is a good way around this (I don’t think people would appreciate making new folders on the C:\ drive for scripts…)?

Do you just put them in the user directory, or somewhere else? Is it worthwhile to put them in Program Files if under XP, or the user directory if Vista? If you’ve never considered this question, how would you feel about scripts and tools being installed to your user directory?

I just keep putting them in ‘Program Files \ 3dsMax \ scripts’, even under Vista.

I hate, hate hate the whole user folder thing.
I really hate it so much.
But that is probably just me.
Luckily Autodesk has only half-switched to using it, instead of forcing us to put everything in the User folders without an option to change it.

So far I’ve not had a problem with writting scripts in ‘program files \ 3dsmax’ if you use a proper installer.exe. I believe Vista is ok with installers using Program Files (obviously).

I did run into an issue where i was trying to write a .ini while the program was running in the Program Files under Vista.
For that I now check to see if the user.ini can be put in the Program Files / 3dsMax folder and if it can’t, then i will put it in the user folder.

I myself really prefer to keep everything cleanly under the 3dsMax root folder in sub-folders instead of having some things in the max folder and other things in the User folders and perhaps even more things somewhere else.

Yeah that’s the thing, I don’t want to use an exe, I want to move them around (and write to ini’s, for example, like you are) via python or maxscript.

Hmmm, maybe I’ll just have to use the user directory.

Just the FYI, writing files anywhere except C:'s root (and probably protected directories, like /Windows, if that exists on vista) worked fine. You could even create and remove subdirectories in C:, but not write to C:\ itself, funny enough. The User Account Control thing comes up only for exe’s, I think, and not for other stuff.

What I am doing is to ignore the user directories, as I originally wanted to do, and work directly with Program Files. I also had to break the habit of writing temp files to C:\ and am now using temporary files

(dotNetClass "System.IO.Path").GetTempFileName()

and in python:

(tempfile.mkstemp())[1]

Vista’s “shadowing” of the Program Files is just a very very bad idea. “Was the write to Program Files successful?” Yes. “But the file is not there!” Correct. “Where is it?” It’s in the user’s shadow copy of the Program Files since users should not write to Program Files. It gets even hairier if some silly program still uses a “settings.ini” file in the Program Files folder. Once the user tries to modify it, you end up with two “settings.ini” files in different Program Files locations. AAAARGH.

What is kind of funny is that from MaxScript a “makedir “C:\Logs”” works on some machines but does not on some. I still haven’t figured out why exactly.

SamiV.