midiboy Posted August 24, 2005 Share Posted August 24, 2005 Hi Benjamin,this is a very very strange problem that has haunted me for months now. I decided to finally find the cause of it. Here´s the problem.I am calling the following cmd file in Wihu during software installation AFTER user installation at which time I am creating the user Alexander as a default user. So as far as I know, the software installation that follows will be installed as that user. right or wrong ?Now, the part of the ini that calls the cmd looks like this:Description.10=Trillian Einstellungencommand.10=CMD /C "%INIDIR%\..\..\Einstellungen\Trillian\silent_install.cmd"workdir.10="%INIDIR%\..\..\Einstellungen\Trillian"selected.10=1The silent_install.cmd looks like this:@echo offif exist "%WINDIR%\system32\cmdow.exe" cmdow @ /HIDcopy /Y .\profiles.ini "%PROGRAMFILES%\Trillian\users\global\"if exist "D:\Alexander\Desktop\Trillian.lnk" del "D:\Alexander\Desktop\Trillian.lnk"copy /Y "%AllUsersProfile%\Startm~1\Programme\Internet\Trillian Pro 3.lnk" "%USERPROFILE%\Startm~1\Programme\Autostart\"Now please take a look at what happened to the variable "%Userprofile%" during installation in Wihu: see pic !As you can see, the variable will be resolved as "Default User" instead of "Alexander". Why´s that ?I am having this problem with 5 of my programs that I install. The rest installs fine. Is this a problem in Wihu or some other problem ? I wouldn´t know where else to look for that though ... Thanks for your help !Alex Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted August 25, 2005 Share Posted August 25, 2005 Hi midiboy,are you calling WIHU from GuiRunOnce?May be you can't overwrite environment variables like USERPROFILE or USERNAME. I'll test it soonBtw. just use %ThisProfile% and %ThisUser% so far ... it's also possible!Benjamin Link to comment Share on other sites More sharing options...
midiboy Posted August 25, 2005 Author Share Posted August 25, 2005 are you calling WIHU from GuiRunOnce?Hi Benjamin,no, from RunOnceEx like this:REG ADD %KEY%\051 /V 1 /D "%CDROM%\Setup\Wihu\wihu.exe /INI=%ini2% /beep=4 /NoCancel /NoRestartChange" /fwhere %ini2% = a different ini depending on the existance of a special file.Btw. just use %ThisProfile% and %ThisUser% so far ... it's also possible!MHh, I would like to avoid that because sometimes I am calling this cmd outside of Wihu too ... Thanks for testing this ...The strange thing with this error is that it works fine with all other installations, just with 5 (out of 50) this happens (and it is always the same 5 that do not work)-Bye,Alex Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted August 25, 2005 Share Posted August 25, 2005 (edited) Update: I found the problem, thanks for reporting this.Problem was, that CreateEnvironmentBlock function doesn't set %USERPROFILE% variable in certain cases.Just download the newest version.Benjamin Kalytta Edited August 25, 2005 by BenjaminKalytta Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted August 26, 2005 Share Posted August 26, 2005 I've completely rewritten Environment Variable Code, would be nice if you could test this new version. %USERNAME% for example may also be used in description.x now which wasn't possible so far.Benjamin Kalytta Link to comment Share on other sites More sharing options...
midiboy Posted August 27, 2005 Author Share Posted August 27, 2005 (edited) Hi Benjamin,thanks for the new version, I downloaded it a few hours ago and already used it in a Windows installation in VMWare.Unfortunately, this version is a bit buggy I made a few screenshots and added them iso you can see what I am taking about. Sorry for the quality, I had to reduce the a lot so I could upload them.1. Screenshot1 and 2:The drive formatting feature has a problem now. Used to work fine in earlier versions but now it does not detect the drive anymore. If I point it to the relevant drive (D) then it works but this question comes up 4 times (once for each redirected folder)2. Screenshot 3:I have the following in my ini:[Users]Home=%PERSONAL%[Environment]Personal=D:\%ThisUser%Yet, as you can see in the screenshot, the user Alexander which I created in Wihu has the standard homedrive/homepath values. This bug has been in Wihu at least 3 times before, then I remind you, you fix it and a few versions later it happens again 3. Screenshot 4 and 5:There is a new folder on C: after installation called DUSERPROFILE%. Contents of this folder is on screenshot 4.4. The bug I mentioned here is still there too. Don´t know if you fixed that yet or not.As for the issue mentioned in the topic of this thread, I cannot say if it is fixed or not because this issue happened only with software I don´t have on my unattended DVD so I would need to do a real installation on my system to find out if this is fixed. I will do that but first I would like to wait until the other bugs are fixed if you have the time :-)Sorry for busting your weekend with this Bye,Alex Edited August 27, 2005 by midiboy Link to comment Share on other sites More sharing options...
BenjaminKalytta Posted August 29, 2005 Share Posted August 29, 2005 @midiboy. Thanks again for being so helpfull. I think I fixed all the bugs you mentioned (expected bug 4 which is on my todo list)Benjamin Kalytta Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now