Patrick J. LoPresti writes:> Arguments="/s %SystemRoot%\fixes\fixsamba.reg"
Urs Rau <[EMAIL PROTECTED]> writes:
What and where would you add the "regedit /s WinXP.reg" command? Adding it as a step to be done by the "postinst.bat" appears to be "too late".
Almost anywhere is going to be too late; the workstation joins the domain during the network configuration part of Windows Setup. I believe even cmdlines.txt will not run until after Windows is done installing, so that will not help.
You could try something like the following:
[GuiUnattended] DetachedProgram="%SystemRoot%\regedit.exe"
The DetachedProgram is probably the earliest place where you can get
> one of your commands run. At this point very little is installed, and > it's way before the network starts. If a reboot is neede between
the time you change rehistry and the time you join the domain, this
> won't work. Also note that at this point no commandline utilities > will work, probably because the fonts aren't installed yet.
Thanks. I tried both ways using cmdlines.txt and/or GuiUnattended and nothing happened. (meaning the regedit program did not run and the registry didn't get updated), but I am still wondering if I am doing something fundamentally wrong.
As I am evidently not getting anything executed either by either doing the cmdlines.txt way or the GuiUnattended way.
here is the steps I took
1. I am creating the %z%\os\winxpsp1\i386\$OEM$ dir
2. creating %z%\os\winxpsp1\i386\$OEM$\$$ dir
3. creating %z%\os\winxpsp1\i386\$OEM$\$$\fixes
4. copying fixsamba.reg to %z%\os\winxpsp1\i386\$OEM$\$$\fixes
5. adding the following to %z%\site\unattend.txt in the [GuiUnattended] section DetachedProgram="%SystemRoot%\regedit.exe" Arguments="/s %SystemRoot%\fixes\fixsamba.reg"
6. copying fixsamba.reg to %z%\os\winxpsp1\i386\$OEM$
7. copying regedit.exe to %z%\os\winxpsp1\i386\$OEM$
8. copying Cmdlines.txt to %z%\os\winxpsp1\i386\$OEM$
9. have of course also double-checked that the %z%\site\unattend.txt file does say OemPreinstall=yes in the [Unattended] section.
Is it a "consequence" of the "UnattendMode=HideDefault" switch that the cmdlines.txt does not get executed? I can't find any documentation that would suggest that though.
++++++++++++++ Cmdlines.txt +++++++++++++++++++++++++ ".\regedit.exe /s fixsamba.reg" +++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++ fixsamba.reg +++++++++++++++++++++++++ Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SeCEdit\Reg Values\MACHINE/System/CurrentControlSet/Services/Netlogon/Parameters/RequireSignOrSeal] "ValueType"=dword:00000004 "DisplayType"=dword:00000000 "DisplayName"="Domain member: Digitally encrypt or sign secure channel data (always)" [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Netlogon\Parameters] "requirestrongkey"=dword:00000000 "requiresignorseal"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Netlogon\Parameters] "requirestrongkey"=dword:00000000 "requiresignorseal"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters] "requirestrongkey"=dword:00000000 "requiresignorseal"=dword:00000000 +++++++++++++++++++++++++++++++++++++++++++++++++++++
Note the fixsamba.reg file actually has the long lines on one-line correctly, it's just my email program that wraps it wrongly. ;-(
There might some way to hack the source media to patch the
> registry... But a better idea is to join the domain in the > post-install scripts, after the installation finishes.
You just need a command-line utility to join a domain. I assume
> there is one out there somewhere, but since this is Windows XP you > could easily roll your own in Perl using WMI. See:
> http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_computersystem.asp
In particular, see the JoinDomainOrWorkgroup method.
The biggest problem is deciding how to obtain/store/delete the password.
I realise that I might be appearing to be loosing too much time over this. But actually there is a whole slurr of other settings that I would like to be able to make at the time that cmdlines.txt (or GuiUnattended) runs as registry settings done at that time will make it into the default user registry (according to MS docs) and as far as I know it is not going to be nearly as easy to do these changes anytime later and get them to apply to the default user (so it affects all future users) and the already existing users on that XP pc. Note: I am trying to do all this inside a samba pdc 2.2.x server environment (essentially looking like a nt4 domain environment) where there is NO MS active directory (and hopefully never will be).
The easiest way is probably using netdom to join the domain.
If it comes down to doing it in perl & wmi or from the commandline, I know I would want to do it in perl & wmi, but realistically (considering my perl&wmi skills) it is likeley going to end up being netdom.exe and a batch file. ;-(
Thanks for the helpful comments and pointers.
Urs Rau
PS:
Just discovered that there is a fair amount of sample/template code inside the unattended perl code (fixtz.pl, instances.pl, instsrv.pl, rdconfig.pl, setenv.pl, srconfig.pl, startup-type.pl, todo.pl) that might help me achieving this learning goal of mine. So if all goes well I hope to have a working perl & wmi JoinDomainorWorkgroup perl script sometime this century. But anybody wanting to kickstart me in the writing of perl wmi scripts is of course very welcome to do so. Or just sendme helpful pointers on the subject. (maybe better off the list - as I start to feel guilty about the amount of traffic I am causing on this topic)
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ unattended-info mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/unattended-info