POV-Ray : Newsgroups : povray.windows : Install for multiple users Server Time
22 Dec 2024 06:50:20 EST (-0500)
  Install for multiple users (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Erich
Subject: Install for multiple users
Date: 6 May 2011 13:10:01
Message: <web.4dc4274092d8768d9b17e07a0@news.povray.org>
Preface:  I do desktop setups (among other things) and am not a POV-Ray user.

When I install POV-Ray v3.7rc3 as an administrator and select the option to
install it into c:\Program Files, it creates files in my install-user's "My
Documents".  If I move/delete that "POV-Ray" folder inside of "My Documents" and
then start POV-Ray, it gives me an error about not finding "Colors.inc".

The problem is that I need to install this so that users other than myself (who
may or may not be admins or have logged in yet) can use POV-Ray.  Ideally, when
POV-Ray is run for the first time, it would check if these files exist in
the default location inside the current user's profile (wherever that might be)
and creat them there if needed.  Everybody could be happy then.

It also doesn't appear that I can simply copy this folder to the default user's
profile (so that it is picked up for new users at least) because some of the
files have the install-user's profile path coded in (particularly povray.ini and
pvengine.ini).  Can I use system variables (like %userprofile%) in these files?
I don't really want to do it this way though because copying the nearly 2000(!)
files and folders really slows down first logins for everyone (when only a small
percentage will be using POV-Ray).

[An aside: Do users really need to edit 1800+ files?  Couldn't there be default
settings in a folder under "Program Files\POV-Ray" that are overridden if the
user chooses to create any specific file/setting in their "POV-Ray profile"?
That would keep the number of user-side files small, allow administrators to
define the defaults they want, and still allow customization by knowledgeable
users.]

I'm willing to use another option (though also not ideal) and put the folder
into the "Public Documents" folder so that all users could function, but I don't
know how to get POV-Ray to recognize that location.  The error for "Colors.inc"
not being found indicates that I can point to alternate locations, but I can't
find any (working) information on how to do that.

I will appreciate any insight you can offer.

Thanks,
Erich


Post a reply to this message

From: Alain
Subject: Re: Install for multiple users
Date: 6 May 2011 13:39:29
Message: <4dc43251$1@news.povray.org>

> Preface:  I do desktop setups (among other things) and am not a POV-Ray user.
>
> When I install POV-Ray v3.7rc3 as an administrator and select the option to
> install it into c:\Program Files, it creates files in my install-user's "My
> Documents".  If I move/delete that "POV-Ray" folder inside of "My Documents" and
> then start POV-Ray, it gives me an error about not finding "Colors.inc".
>
> The problem is that I need to install this so that users other than myself (who
> may or may not be admins or have logged in yet) can use POV-Ray.  Ideally, when
> POV-Ray is run for the first time, it would check if these files exist in
> the default location inside the current user's profile (wherever that might be)
> and creat them there if needed.  Everybody could be happy then.
>
> It also doesn't appear that I can simply copy this folder to the default user's
> profile (so that it is picked up for new users at least) because some of the
> files have the install-user's profile path coded in (particularly povray.ini and
> pvengine.ini).  Can I use system variables (like %userprofile%) in these files?
> I don't really want to do it this way though because copying the nearly 2000(!)
> files and folders really slows down first logins for everyone (when only a small
> percentage will be using POV-Ray).
>
> [An aside: Do users really need to edit 1800+ files?  Couldn't there be default
> settings in a folder under "Program Files\POV-Ray" that are overridden if the
> user chooses to create any specific file/setting in their "POV-Ray profile"?
> That would keep the number of user-side files small, allow administrators to
> define the defaults they want, and still allow customization by knowledgeable
> users.]
>
> I'm willing to use another option (though also not ideal) and put the folder
> into the "Public Documents" folder so that all users could function, but I don't
> know how to get POV-Ray to recognize that location.  The error for "Colors.inc"
> not being found indicates that I can point to alternate locations, but I can't
> find any (working) information on how to do that.
>
> I will appreciate any insight you can offer.
>
> Thanks,
> Erich
>
>
>
>

The user only need to edit, or personalise, some of the files.
Those are: povray.ini and pvengine.ini

Then, those files can point to the location where the common files are 
located: Have everyone use the same include folder.

Edit povray.ini to point to the actual location of the include folder by 
adding this line:
input__File_Name=<path to the include folder>

And add those lines to the pvengine.ini:
[Permitted Input Paths]
1=<path to the include folder>
Make sure that each users have read permission to that folder. They 
don't need write permission.

Do that before you copy those to each user's folder so you only have to 
edit it once.

You can also have all renders sent to the same folder:
In povray.ini:
Output_File_Name=d:\common images folder\

In pvengine.ini:
[Permitted output Paths]
1=d:\common images folder\
Use your actual path. You can use a location in the All Users folder or 
any other location of your choice.

In that case, it's also advisable to add that location as a possible 
input path, as one scene can be used to generate an image map or height 
field for another.

The user can always create he's own inc and ini files that can reside in 
the same folder as his pov files.

Apart from the 2 mentioned ini files, you realy only need to copy the 
Scenes folder to the user's folders.





Alain


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Install for multiple users
Date: 6 May 2011 13:50:32
Message: <4dc434e8$1@news.povray.org>
On 06.05.11 19:08, Erich wrote:
> Preface:  I do desktop setups (among other things) and am not a POV-Ray user.

OK, then first note that POV-Ray does not need to be installed by an 
administrator. It is perfectly happy if installed with just user privileges.

> When I install POV-Ray v3.7rc3 as an administrator and select the option to
> install it into c:\Program Files, it creates files in my install-user's "My
> Documents".  If I move/delete that "POV-Ray" folder inside of "My Documents" and
> then start POV-Ray, it gives me an error about not finding "Colors.inc".

Of course, users do need access to those files for most sample scenes 
includes with POV-Ray.

> The problem is that I need to install this so that users other than myself (who
> may or may not be admins or have logged in yet) can use POV-Ray.  Ideally, when
> POV-Ray is run for the first time, it would check if these files exist in
> the default location inside the current user's profile (wherever that might be)
> and create them there if needed.  Everybody could be happy then.

Isn't this a function available via Windows admin tools? If you have a 
concrete idea how this should work, I think it would be interesting if you 
could contribute such an extension to the POV-Ray installer.

> It also doesn't appear that I can simply copy this folder to the default user's
> profile (so that it is picked up for new users at least) because some of the
> files have the install-user's profile path coded in (particularly povray.ini and
> pvengine.ini).  Can I use system variables (like %userprofile%) in these files?

I do not think that you can use environment variables in regular POV-Ray INI 
files. As far as I know the Windows implementation of fopen will not 
automatically consider them. There certainly is no Windows-specific code in 
POV-Ray to resolve any environment variables in the INI files.

> I don't really want to do it this way though because copying the nearly 2000(!)
> files and folders really slows down first logins for everyone (when only a small
> percentage will be using POV-Ray).

I would suggest to then have a batch file that users select when they first 
run POV-Ray. This batch file can then add a proper link to pvengine.exe in 
the Windows menu, the desktop and where ever you want it, plus copy the files.

> [An aside: Do users really need to edit 1800+ files?  Couldn't there be default
> settings in a folder under "Program Files\POV-Ray" that are overridden if the
> user chooses to create any specific file/setting in their "POV-Ray profile"?
> That would keep the number of user-side files small, allow administrators to
> define the defaults they want, and still allow customization by knowledgeable
> users.]

Yes, users do need those files, and they do need write access to them. These 
files are not files needed by POV-Ray itself. They are files users can add 
to the scene files they create in any way they like.

> I'm willing to use another option (though also not ideal) and put the folder
> into the "Public Documents" folder so that all users could function, but I don't
> know how to get POV-Ray to recognize that location.  The error for "Colors.inc"
> not being found indicates that I can point to alternate locations, but I can't
> find any (working) information on how to do that.

The default library path folder are kept in povray.ini .

	Thorsten


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Install for multiple users
Date: 6 May 2011 14:01:02
Message: <4dc4375e@news.povray.org>
On 06.05.11 19:39, Alain wrote:
> Then, those files can point to the location where the common files are
> located: Have everyone use the same include folder.

Generally that is a bad idea and specifically this is the reason why the 
POV-Ray installer no longer puts this folder into the application's folder.

> Edit povray.ini to point to the actual location of the include folder by
> adding this line:
> input__File_Name=<path to the include folder>
>
> And add those lines to the pvengine.ini:
> [Permitted Input Paths]
> 1=<path to the include folder>
> Make sure that each users have read permission to that folder.

> They don't need write permission.

Nope, that is incorrect.

> Do that before you copy those to each user's folder so you only have to edit
> it once.
>
> You can also have all renders sent to the same folder:
> In povray.ini:
> Output_File_Name=d:\common images folder\

This seems highly undesirable in a university environment that he is in (I 
know because this IP used for posting to the news server traces back to an 
.edu domain).

> In pvengine.ini:
> [Permitted output Paths]
> 1=d:\common images folder\
> Use your actual path. You can use a location in the All Users folder or any
> other location of your choice.
>
> In that case, it's also advisable to add that location as a possible input
> path, as one scene can be used to generate an image map or height field for
> another.
>
> The user can always create he's own inc and ini files that can reside in the
> same folder as his pov files.
>
> Apart from the 2 mentioned ini files, you realy only need to copy the Scenes
> folder to the user's folders.

That is actually the last folder needed to be copied, as it is not needed by 
users as it only contains sample scenes. Essential is copying the include 
folder to all users.

Thorsten, POV-Team


Post a reply to this message

From: Erich
Subject: Re: Install for multiple users
Date: 6 May 2011 16:25:01
Message: <web.4dc4587a262955309b17e07a0@news.povray.org>
Thanks for the fast response(s)!

Thorsten Froehlich <tho### [at] trfde> wrote:
> OK, then first note that POV-Ray does not need to be installed by an
> administrator. It is perfectly happy if installed with just user privileges.

Yep, I know, but I think you are overestimating the practical capability of
highly educated people.  :)  Also, (since my .edu secret is out) in many
classroom/labs, machines are "frozen" to restore their state after every reboot.
 That would require every user to reinstall POV-Ray after every login.

> > The problem is that I need to install this so that users other than myself (who
> > may or may not be admins or have logged in yet) can use POV-Ray.  Ideally, when
> > POV-Ray is run for the first time, it would check if these files exist in
> > the default location inside the current user's profile (wherever that might be)
> > and create them there if needed.  Everybody could be happy then.
>
> Isn't this a function available via Windows admin tools?

Not that I know of (I'd love to know otherwise.)  I can create default user
profiles, but the more files in that profile, the longer the initial login.
Because apps may be installed on multi-user machines after some users have
already logged in and generated a profile, I find that almost all apps are happy
to create any user's app-specific settings or files the first time the app is
run for that user.

> If you have a concrete idea how this should work, I think it would be interesting if
> you could contribute such an extension to the POV-Ray installer.

It seems pretty concrete to me already, but I have no idea how to create an
extension to the/any installer.  I don't actually think it's an installer
function.  Look at Mozilla apps for examples.  I modify the default prefs.js
file for Thunderbird, but the default Windows profile has no Thunderbird
settings whatsoever.  When a user starts Thunderbird for their first time, it
makes no difference whether they were already a user on that system.
Thunderbird generates all the files they need, and pulls those defaults I
created for some settings I want all users to start with.

This allows me to give all users default settings, allows them to modify
settings for their personal use, and keeps the default Windows profile small so
that initial logins are fast.  If there is a disadvantage to this method for
anyone, I don't see it.

> I would suggest to then have a batch file that users select when they first
> run POV-Ray. This batch file can then add a proper link to pvengine.exe in
> the Windows menu, the desktop and where ever you want it, plus copy the files.

Ugh!  Yes, I can do this, (and probably will if my attempt - below - is no
good), but this is the only app in 100+ I install that requires a batch file for
multi-user usability.

> The default library path folder are kept in povray.ini .

At risk of exposing my stupidity, what files are considered libraries, vs other
things? Both "Scenes" and "Insert Menu" contain subfolders - do all those have
to be added to the path?  Will they even be found if I do add them?

Here is what I have so far, and I'm not getting any errors starting POV-Ray
(though I don't know how to go about testing it for functional use)...

In <user documents>\POV-Ray\v3.7\:
include (folder)
ini (folder)

In <user documents>\POV-Ray\v3.7\ini:
pvengine.ini
povray.ini
(nothing else)

In pvengine.ini:
- removed all references to current user's profile path (most of these are
regenerated when POV-Ray closes)
- Added the lines (not ideal, but acceptable):
  [Permitted Input Paths]
  1=C:\Temp\
  [Permitted Output Paths]
  1=C:\Temp\

In povray.ini:
- Added the lines:
  Library_Path="C:\Users\Public\Documents\POV-Ray\v3.7\Insert Menu"
  Library_Path="C:\Users\Public\Documents\POV-Ray\v3.7\scenes"
  input_file_name=c:\Temp\
  Output_file_name=c:\Temp\

The "include" folder is untouched.

The other folders and all their files/subfolders are in:
C:\Users\Public\Documents\POV-Ray\v3.7\

This reduces the footprint of the POV-Ray files duplicated at every login to
800k and 61 files which isn't terrible.  (It was 12MB and 1800+ files.)  Does
this seem like it would be functional?  Does POV-Ray create the other .ini files
(like "pvtools.ini", etc.) as needed like it does with the pvengine.ini file
that doesn't exist until the first time POV-Ray is run?

Thanks for your help,
Erich


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Install for multiple users
Date: 6 May 2011 17:44:40
Message: <4dc46bc8$1@news.povray.org>
On 06.05.11 22:22, Erich wrote:
> Thanks for the fast response(s)!
>
> Thorsten Froehlich<tho### [at] trfde>  wrote:
>> OK, then first note that POV-Ray does not need to be installed by an
>> administrator. It is perfectly happy if installed with just user privileges.
>
> Yep, I know, but I think you are overestimating the practical capability of
> highly educated people.  :)  Also, (since my .edu secret is out) in many
> classroom/labs, machines are "frozen" to restore their state after every reboot.
>   That would require every user to reinstall POV-Ray after every login.

Ah, ok, I have seen this kind of setup ... isn't it then sufficient to 
install POV-Ray using the user account that is restored, but set the restore 
point after POV-Ray was installed?

	Thorsten


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Install for multiple users
Date: 6 May 2011 18:03:30
Message: <4dc47032$1@news.povray.org>
Erich wrote:

> It seems pretty concrete to me already, but I have no idea how to 
> create an extension to the/any installer.  I don't actually think 
> it's an installer function.  Look at Mozilla apps for examples.  I 
> modify the default prefs.js file for Thunderbird, but the default 
> Windows profile has no Thunderbird settings whatsoever.  When a user 
> starts Thunderbird for their first time, it makes no difference 
> whether they were already a user on that system.

This is actually a form of installer functionality. The part of
the installer that creates per-user files could be "advertised" so
it runs when the user first attempts to start the application.

According to this thread,

http://news.povray.org/povray.beta-test/thread/%3Cweb.4c53e2dba045f70ec0721a1d0@news.povray.org%3E/?ttop=359570&toff=50

that was at least intended to be in the final release.

> I'm willing to use another option (though also not ideal) and put the
> folder into the "Public Documents" folder so that all users could 
> function, but I don't know how to get POV-Ray to recognize that
> location.

I think it's currently not possible, which is also inconvenient in
other scenarios. Note that Vista or higher seems to support symbolic
links, so it might be possible to avoid the copying into user
profiles and redirect to a shared location.


Post a reply to this message

From: Erich
Subject: Re: Install for multiple users
Date: 9 May 2011 09:25:01
Message: <web.4dc7ea98262955309b17e07a0@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> > in many
> > classroom/labs, machines are "frozen" to restore their state after every reboot.
> >   That would require every user to reinstall POV-Ray after every login.
>
> Ah, ok, I have seen this kind of setup ... isn't it then sufficient to
> install POV-Ray using the user account that is restored, but set the restore
> point after POV-Ray was installed?
>

This is a viable solution for machines with a single, generic login, but if
every user has their own (domain) account, any advantage is lost.  Their profile
is re-generated each time they first log to the computer since last reboot.  I
also have computers that are not frozen.

Erich


Post a reply to this message

From: Erich
Subject: Re: Install for multiple users
Date: 9 May 2011 09:40:00
Message: <web.4dc7ee38262955309b17e07a0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> This is actually a form of installer functionality. The part of
> the installer that creates per-user files could be "advertised" so
> it runs when the user first attempts to start the application.

Huh. I learn something new everyday.  :)

> According to this thread,
>
>
http://news.povray.org/povray.beta-test/thread/%3Cweb.4c53e2dba045f70ec0721a1d0@news.povray.org%3E/?ttop=359570&toff=
50
>
> that was at least intended to be in the final release.

(Interestingly, I couldn't see the link until I replied.)  There is another,
more elegant, (though likely complex to implement) solution too... use a sort of
settings "layering".  Have the default settings in .INIs under the install
(Program Files) directory, and if the user has any .INIs with settings in their
profile (in an installer-created folder structure), allow them to override.  An
additional layer could be put in place to have enforced settings that
won't/can't be overridden.  This would allow administrators to force some
settings, set others to default and give users the ability to set their own.
Apps like PowerShell and Privoxy do this.

> Note that Vista or higher seems to support symbolic
> links, so it might be possible to avoid the copying into user
> profiles and redirect to a shared location.

NTFS junctions may be a good solution.  I'll have to read up and do some
testing.

Thanks,
Erich


Post a reply to this message

From: Erich
Subject: Re: Install for multiple users
Date: 17 Jul 2012 10:45:00
Message: <web.500579b6262955302f9c6630@news.povray.org>
An update (in case anyone cares) now that I'm updating to RC6...

What has worked for us is to copy the folders that are placed in the
install-user's Documents directory, place them in the POV-Ray directory under
Program Files and delete the POV-Ray directory under Documents. Then we replace
all the program shortcuts with a disguised .bat file containing:

========
@echo off

if exist "%userprofile%\Documents\POV-Ray" goto _Launch

echo Initializing POV-Ray user files.
echo Please be patient, this may take a minute.

robocopy "C:\Program Files\POV-Ray\v3.7 RC6\ini"
"%userprofile%\Documents\POV-Ray\v3.7\ini" /e /copy:D /mt >nul
robocopy "C:\Program Files\POV-Ray\v3.7 RC6\include"
"%userprofile%\Documents\POV-Ray\v3.7\include" /e /copy:D /mt >nul
robocopy "C:\Program Files\POV-Ray\v3.7 RC6\Scenes"
"%userprofile%\Documents\POV-Ray\v3.7\Scenes" /e /copy:D /mt >nul
robocopy "C:\Program Files\POV-Ray\v3.7 RC6\Insert Menu"
"%userprofile%\Documents\POV-Ray\v3.7\Insert Menu" /e /copy:D /mt >nul

:_Launch
start "Launching POV-Ray" "C:\Program Files\POV-Ray\v3.7 RC6\bin\pvengine64.exe"
%*

==========

This isn't perfect as any third-party program that calls POV-Ray before the user
has run it through the script will hit some errors, but it is the best I've been
able to configure.  Obviously, this is for Win7 (x64), but the XP version only
needs changes to the paths and a switch to xcopy instead of robocopy.

If my stupid .bat file can do this, I think this kind of user-initialization
would be pretty darn easy to implement in the POV-Ray code itself;  On start,
check for the existence of basic user settings in the user's documents
directory, and if they don't exist copy the defaults over from the install
location.  That way POV-Ray could be default-installed by an administrator, and
every current and future user would be able to just use it.  Easy all the way
around even if it isn't "proper" by using the installer function to handle it.

The current method requires either every user to install it themselves, or the
administrator/installer to copy the settings files to the default profile (for
future users) AND copy them into each existing user's profile.  It seems
confusing and messy and rife for human error.

Anyway, I hope this helps someone, someday.


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.