On Fri, May 20, 2005 at 07:35:35AM -0500, Brian Hellman enlightened us:
> Cool, that should work, now the next problem. I have some .dat files 
> that store some config info that need to be in the c:\documents and 
> settings\%username%\ directory. Is there any way to have the auto 
> created user log in instead of the administrator account during the 
> setup process?
>

Yes, but it's ugly. I have a piece of software that has to be installed as
the one user it is permitted to run as. Here's what my .bat file looks like:

todo.pl "net localgroup Administrators math251 /delete"
todo.pl .reboot
todo.pl "del /q C:\Netinst\autolog.reg"
todo.pl "reg import C:\Netinst\autolog.reg"
todo.pl "%Z%\bin\shortcut.pl \"%PROGRAMFILES%\MTBWINST\MTB12ST.EXE\" 
special:desktop\Minitab"
todo.pl "move \"%ALLUSERSPROFILE%\Start Menu\Programs\Minitab Student 12\" 
\"%USERPROFILE%\Start Menu\Programs\""
todo.pl "%Z%\packages\minitab\setup.exe /s /sms 
/f1%Z%\packages\minitab\setup.iss /f2C:\netinst\logs\minitab.log"
todo.pl .reboot
todo.pl "autolog.pl --logon=1 --user=math251 --password=secretword"
todo.pl "net localgroup Administrators math251 /add"
todo.pl "%Z%\bin\nopwexpire.pl math251"
todo.pl "net user math251 secretword /ADD /passwordchg:no 
/homedir:\"S:\math251\" /scriptpath:minitab.bat"
todo.pl "echo net use S: \\bing\mathematics /persistent:no > 
\"%systemroot%\System32\Repl\Import\Scripts\minitab.bat\""
todo.pl "if not exist \"%systemroot%\System32\Repl\Import\Scripts\\\" md 
\"%systemroot%\System32\Repl\Import\Scripts\\\""
todo.pl "if not exist \"S:\math251\" net use S: 
\\bing\mathematics/persistent:no"
todo.pl "reg export 
\"HKLM\Software\Microsoft\WindowsNT\CurrentVersion\WinLogon\" 
C:\Netinst\autolog.reg"

Hope that helps...

Matt

-- 
Matt Hyclak
Department of Mathematics 
Department of Social Work
Ohio University
(740) 593-1263

Attachment: pgpOXycbbqoqg.pgp
Description: PGP signature

Reply via email to