Jump to content

Windows Installer Helper Utility


xper

Recommended Posts

Things was added in new version 2.1 beta:

- User specific environment variables which will be available per user also after WIHU terminates. This will be stored in registry HKCU\Environment

Usage Example:

[Users]
default=0
user.0=New User

[environment.0]
uservar=Hallo test from user 0

[Test's]
command.0=cmd.exe /k @echo %uservar%
description.0=User Environment Variable Test

These private variables can also be edited with WIHU.

Here registry variables like var=HKCU:path\var as in [environment] section aren't supported.

Benjamin

Edited by BenjaminKalytta
Link to comment
Share on other sites


As v2.1 is beta, have you linked to the 2.0.0.1 sources somewhere (on your website)?

OK, I'm not exactly forcing you, you don't need to provide me the source. I just got curious as to where the sources are now - your website mentioned something about sources linked to at the bottom of the page. Also, since your previous releases of WIHU had the sources as well in the ZIP download.

Link to comment
Share on other sites

Hi Benjamin !

Thanks for your new version ! Getting better and better ! :-) Since you are implementing user specific environment variables ....

There are so called "Volatile Environment" variables in HKCU\Volatile Environment. There you can find Homepath and homedrive variables for instance.

Would you mind supporting those too ? I would still love to change Homedrive and Homepath dependent on the Personals folder of that user. To do this I currently call a batch file which reads the Personals folder from the registry and assigns the drive letter to Homedrive and the path to Homepath:

FOR /F "TOKENS=3" %%i in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal') do REG ADD "HKCU\Volatile Environment" /v HOMEDRIVE /t REG_EXPAND_SZ /d "%%~di" /f 
FOR /F "TOKENS=3" %%j in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Personal') do REG ADD "HKCU\Volatile Environment" /v HOMEPATH /t REG_EXPAND_SZ /d "%%~pnj" /f

However, it would be much nicer if this functionality could be somehow integrated into Wihu.

By the way .... maybe it is the right time now to think about making the user creation/shellfolder/environment variables part of Wihu available as a cpl ? Wihu is already much better than the Windows user creation tools ! :rolleyes:

Bye,

Alex

PS: I will donate something in a few weeks ( as soon as I get some money ! :) )

Link to comment
Share on other sites

@midiboy: Hmm, I don't really know why you want change volatile environment since this is volatile (german: veränderlich, unbeständig) which mean it will be created every time the user will log on.

Adding or changing any variable in this registry path will only valid until user logs off. It can be compared with my WIHU variables %SRCPATH%, %WIHU%, %CURDIR% which also will only be available while WIHU is running. AFAIK this will be generated by windows every logon time based on various system information like computer name, userprofile path and so on.

But if you only want to change this HOME... Data just add home.x=path to your users ini ... It can also edited with WIHU now.

In this case home path will be set and volatile environment will always loaded with the data entered in home.x

Benjamin

Link to comment
Share on other sites

Hi Benjamin,

@midiboy: Hmm, I don't really know why you want change volatile environment since this is volatile (german: veränderlich, unbeständig) which mean it will be created every time the user will log on.

Adding or changing any variable in this registry path will only valid until user logs off. It can be compared with my WIHU variables %SRCPATH%, %WIHU%, %CURDIR% which also will only be available while WIHU is running. AFAIK this will be generated by windows every logon time based on various system information like computer name, userprofile path and so on.

Thanks for the explanation ! I call this batch file I made at every bootup using the Run command in HKCU so maybe thats why it works fine ...
But if you only want to change this HOME... Data just add home.x=path to your users ini ... It can also edited with WIHU now.

In this case home path will be set and volatile environment will always loaded with the data entered in home.x

Mhh, can this be used in the [Environment] section in install.ini also so that it will affect each user ? Something like this: Home = %Personal% ( if %Personal% is defined before )

Thanks,

Alex

Link to comment
Share on other sites

@midiboy: Ok was added. It will be called "DefaultHome". May be I should also rename Shellfolders to DefaultXxx ?

I also added "ThisHome" and "ThisProfile" as volatile user environment variable ([users] section).

Usage example:

[users]
user.0=New user
home.0=%personal%
profile.0=%ThisHome%\%ThisUser%

Profile path can be specified also with the new beta release.

Benjamin

Edited by BenjaminKalytta
Link to comment
Share on other sites

Hi Benjamin,

tried your latest beta but somehow this DefaultHome" variable did not work or maybe I am doing something wrong ?

This is my install.ini:

[users]

DefaultHome=%Personal%

[Environment]

Personal=D:\%ThisUser%
My Video=D:\%ThisUser%\Eigene Videos
My Music=D:\%ThisUser%\Eigene Musik
My Pictures=D:\%ThisUser%\Eigene Bilder
Favorites=D:\%ThisUser%\Favoriten

Theoretically, every user created in Wihu will now have a home variable pointing to their Personal folder, right ? But it did not work. First, nothing appeared under "Private Umgebungsvariablen" in Wihu and after the user had been created and I logged in as that user there was no "home" variable and Homedrive and Homepath still pointed to C: and the standard userprofile.

One more suggestion ...

it is maybe becoming a bit complicated now ... you have a users.ini plus 2 user specific sections in install.ini [user] and [user] .... couldn´t this be somehow combined into one place ? Just a suggestion .... :)

Thanks,

Alex

Link to comment
Share on other sites

you have a users.ini plus 2 user specific sections in install.ini [user]and [user] .... couldn´t this be somehow combined into one place ?

Yes I already planed to combine users.ini and install.ini. Will be in final version 2.1.

Btw. there is no section [user] in install.ini.

This is called [users] (btw. names are case insensitive)

2, You have to put DefaultHome in [environment] section.

3. There will never be a private environment variable called "home". Windows will create this automatically after user logon.

Benjamin

Link to comment
Share on other sites

You have to put DefaultHome in [environment]section.

Thanks, that did it ! I was just confused because you put the explanation of DefaultHome inside the [users] section of install.ini. :rolleyes:

Thanks ! Thanks ! :)

Alex

Link to comment
Share on other sites

Benjamin, great work on the program so far!

Could we have an option to hide an item (or at least grey it out) when the file.x or key.x comparators determine that the item shouldn't be installed? The small yellow triangle with the exclamation mark looks nice, but the meaning may not be clear to everyone who sees it.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...