BenjaminKalytta Posted July 26, 2004 Share Posted July 26, 2004 (edited) 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\EnvironmentUsage Example:[Users]default=0user.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 TestThese 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 July 26, 2004 by BenjaminKalytta Link to comment Share on other sites More sharing options...
prathapml Posted July 26, 2004 Share Posted July 26, 2004 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 More sharing options...
BenjaminKalytta Posted July 26, 2004 Share Posted July 26, 2004 @prathapml: WIHU 2.0 source was so bad that I decided to remove it from public ... if you want them I'll mail them to you.Benjamin Link to comment Share on other sites More sharing options...
midiboy Posted July 26, 2004 Share Posted July 26, 2004 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" /fHowever, 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 ! Bye,AlexPS: I will donate something in a few weeks ( as soon as I get some money ! ) Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted July 27, 2004 Share Posted July 27, 2004 @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.xBenjamin Link to comment Share on other sites More sharing options...
Cretak Posted July 27, 2004 Share Posted July 27, 2004 Thanks Benjamin! Great Work! Link to comment Share on other sites More sharing options...
midiboy Posted July 27, 2004 Share Posted July 27, 2004 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.xMhh, 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 More sharing options...
BenjaminKalytta Posted July 27, 2004 Share Posted July 27, 2004 (edited) @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 userhome.0=%personal%profile.0=%ThisHome%\%ThisUser%Profile path can be specified also with the new beta release.Benjamin Edited July 27, 2004 by BenjaminKalytta Link to comment Share on other sites More sharing options...
midiboy Posted July 27, 2004 Share Posted July 27, 2004 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 VideosMy Music=D:\%ThisUser%\Eigene MusikMy Pictures=D:\%ThisUser%\Eigene BilderFavorites=D:\%ThisUser%\FavoritenTheoretically, 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 More sharing options...
BenjaminKalytta Posted July 28, 2004 Share Posted July 28, 2004 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 More sharing options...
BenjaminKalytta Posted July 28, 2004 Share Posted July 28, 2004 New version is out. I fixed some bugs and also added (for completeness) roaming profile support.Benjamin Link to comment Share on other sites More sharing options...
midiboy Posted July 28, 2004 Share Posted July 28, 2004 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. Thanks ! Thanks ! Alex Link to comment Share on other sites More sharing options...
midiboy Posted July 28, 2004 Share Posted July 28, 2004 Hey Benjamin,wanted to ask you this before already .... what is this:(see pic )? Bye,Alex Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted July 28, 2004 Share Posted July 28, 2004 @midiboy: I don't really know. Sometimes I got this too.Benjamin Link to comment Share on other sites More sharing options...
deth Posted July 28, 2004 Share Posted July 28, 2004 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 More sharing options...
Recommended Posts