Tomasz Chmielewski wrote:
Julien TOUCHE wrote:

Tomasz Chmielewski a écrit :

Any clue how to do it?



it has been discussed before (search the archives):

i use the following scripts when installing on a pristine win system


So - if I understand it right - it should be done as below:

After OS and software is installed by Unattended, something is added to a registry, that runs a script as an Administrator (a srcipt run from \\server\location\update.bat) of that machine each time it is booted; in this script there is a definition what software should be installed where.

Is my thinking correct?

More or less. Since these machines were installed using unattended, all that is needed is to get unattended going again. The things that are needed are:


1. C:\netinst\todo.txt will contain the commands to be run by the todo command. The contents should be something like:

        z:\scripts\newscript.bat
        autolog.pl --logon=0
        del c:\netinst\tempcred.bat /F
        .reboot


2. C:\netinst\tempcred.bat contains the username/password combo for connecting to the server. This file was deleted at the end ot the installation.


        @SET Z_USER="username"
        @SET Z_PASS="password"

3. Edit the registry to makt the machine autologon as administrator

4. Edit the registry to make sure the machine will run todo.pl at next logon.

5. Boot the machine.

For point 1 and 2, try aborting a current unattended install and inspecting todo.txt and tempcred.bat from that install.

3-5 Can be replaced with logging on locally as loacal admin and just running:
c:\netinst\mapznrun.bat z:\bin\todo.pl -go


Here is the contents of a batch file that does all this remotely. The lines are broken, so you'll need to reassemble them. Please note that unless you're using ipsec, this command will transfer both the local adminpassword for the machine and the password for the install share in cleartext over the network. This is not a good thing in an untrusted network.

@echo off
if not "%2" == "" then goto ok
echo usage: %0 machinename adminpassword
echo usage: machinename WITHOUT \\ in front.
exit /B
:ok

copy /Y todo.txt \\%1\c$\netinst\.
copy /Y tempcred.bat \\%1\c$\netinst\.

reg add "\\%1\hklm\software\microsoft\windows nt\currentversion\winlogon" /V DefaultDomainName /T REG_SZ /D %1 /F

reg add "\\%1\hklm\software\microsoft\windows nt\currentversion\winlogon" /V DefaultUserName /T REG_SZ /D Administrator /F

reg add "\\%1\hklm\software\microsoft\windows nt\currentversion\winlogon" /V AutoAdminLogon /T REG_SZ /D 1 /F

@reg add "\\%1\hklm\software\microsoft\windows nt\currentversion\winlogon" /V DefaultPassword /T REG_SZ /D %2 /F

reg add "\\%1\hklm\software\microsoft\windows\currentversion\runonce" /V MapZnrun.bat /T REG_SZ /D "c:\netinst\mapznrun.bat z:\bin\todo.pl -go" /F

shutdown -r -m \\%1 -f -t 10


-- Dag Nummedal ([EMAIL PROTECTED])



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to