Help - Search - Members - Calendar
Full Version: A few questions...
MSFN Forums > Member Contributed Projects > Other Member Contributed Projects > Windows Installation Helper Utility

   
Google Internet Forums Unattended CD/DVD Guide
ZileXa
Sorry for creating a new topic... couldn't find a suitable topic to place these...

I have 3 questions:

- Is it possible Wihu restarts automatically, without me having to press the 'completed' or 'done' (or something similar, I use Dutch version) button?
(the 'restart' box is checked automatically... but still have to press the 'done' or 'completed' button.)


- Wihu changes the path of My Documents etc for me.
If I create a useraccount, when pressing next (twice) I get a warning message about systemfolders that are being moved. How to disable this warning?


- is it possible that wihu creates a folder? (I want it to create D:\shared docs)
This is what I have so far:

[Environment]
DefaultProfilesDir = HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfilesDirectory

Personal = D:\%ThisUser%
My Pictures = D:\%ThisUser%\My Pictures
My Downloads = D:\%ThisUser%\My downloads
My Music = D:\Music
My Video = D:\Movies
Common Documents = D:\Shared Documents

;help.x = helpfile.rtf

Not working (logical cos they are no shellfolders):
My Downloads and Common Documents

How do I get wihu to create these folders? I want WIHU to do it because if I install on a new harddrive, I create partition D:\ (at the beginning of Windows setup) but ofcourse it has not been formatted yet!
I was really impressed when I discovered WIHU to give a message it will format the unformatted partition biggrin.gif
WiHU is great, but a bit more documentation would make it complete!
BenjaminKalytta
Concerning restart: This is currently not possible, but maybe I'll add an /NoFinishButton switch in future versions.

Concerning the shell folder change warning: please add DontShowNonDefaultShellFolderWarning = 1 in your [settings] section as described in my example install.ini

QUOTE (ZileXa)
is it possible that wihu creates a folder?


This was one of the features I want to add to my new Version 3.0, but currently I really don't have the time to work on WIHU that's the Problem. I get paid for another project which is important to finance my study. My idea was to create a plugin system to add more commands to be executed by wihu like:

CODE
command.x = @mkdir c:\test
description.x = Create new directory c:\test


Version 3.0 requires a complete rewrite of WIHU which would be a very time consuming task. Im currently even not able to complete my indexless ini file concept I feel a bit sheepish about it because i announced some news about this new format in this forum some weeks ago.

Benjamin Kalytta
ZileXa
Benjamin Kalytta, I like your ideas smile.gif
But I do understand you can not put much time in this project.
No problem, WIHU is great already... these are actually just minor things that would be handy if it was possible.
Please take your time, if there will be a 3.0 that would be great. But current version suits my needs for now.
midiboy
Hi !

@ZileXa:

I asked Benjamin about the common documents folder a while ago already. As long as he is not able to work on Wihu 3.0 you might try my "workaround". I created this for my unattended DVD and it works:

Add the following in your install.ini and adapt for your needs:

CODE
Description.1=Common Documents on D
command.1=CMD /C "%WIHU%\..\Diverses\common_onD.cmd"
workdir.1=%WIHU%\..\Diverses
selected.1=1


Then create cmd named common_onD.cmd in the appropriate folder and add this:

CODE
@echo off
if exist "%WINDIR%\system32\cmdow.exe" cmdow @ /HID
if not exist "D:\Gemeinsame Dokumente" md "D:\Gemeinsame Dokumente"
regedit /s .\common_onD.reg

xcopy /S /E /H /Y "%AllusersProfile%\Dokumente\*.*" "D:\Gemeinsame Dokumente\"

exit


Last but not least, there is the reg file. In my case it looks like this:

CODE
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
"Common Documents"=hex(2):44,00,3a,00,5c,00,47,00,65,00,6d,00,65,00,69,00,6e,\
 00,73,00,61,00,6d,00,65,00,20,00,44,00,6f,00,6b,00,75,00,6d,00,65,00,6e,00,\
 74,00,65,00,00,00


edit: donīt copy the above codes directly, the forum software seemingly does not allow to display the correct codes ?!? It always edits them in some strange way ...


Now, the above is for a german Windows, you cannot directly copy this if you use any other language windows.

You not only have to change the Common documents name in the cmd to suit your specific windows version but more importantly, you have to first change the location of the path to the new location in the registry and then export that into the above reg file. This exported reg file will have the correct hex codes. It only works correctly with those hex values, it does not work if you import the path directly, I tried that. yes.gif


The reason for copying the content of the common documents folder is simple: Some programs like Adobe Acrobat copy some essential files in there and wonīt work correctly if they are not at the location.


Hope it works for you !
Bye,
Alex
ZileXa
Thanks Alex! Very useful.
I already apply the neccesary regtweaks with my tweakfile, so that I only had to create the folders.
I will try this 2night!
ZileXa
Allright, now why doesn't WIHU execute this correctly:

CODE
cmdow @ /HID
@echo off

if not exist "D:\Gedeelde documenten" md "D:\Gedeelde documenten"
if not exist "D:\Gedeelde documenten\Afbeeldingen" md "D:\Gedeelde documenten\Afbeeldingen"
if not exist "D:\Movies" md "D:\Movies"

EXIT


install ini: command.0= "%WIHU%\createfolders_on_D.cmd"

If I do it the way midiboy explains above.... I still see the black window with some text quickly... that's why I tried this usual method..
Ooh and I get a code 0000004 error using Midiboys method..
using my method its a code 1 or 2 I think..

It should not be so difficult just to execute a simple cmd should it?
BenjaminKalytta
Did you get an error (batch file wasn't executed) or a warning (batch file was executed but returned an error code) ?

Btw. exit code is undefined in your batch file. If you use EXIT you should return an exitcode like EXIT 0.
ZileXa
I guess it was a bit too late for me last night..

With a batchfile starting with:
CMDOW @ /HID
@ ECHO OFF

and command.0 = CMD /C "%WIHU%\thebatchfile.cmd"

It works perfectly.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.