RogueSpear Posted April 17, 2006 Author Posted April 17, 2006 It's possible that if you include AutoLogon entries in your WINNT.SIF that the SIF file instructions are applied after cmdlines.txt is processed. I don't have any AutoLogon information in my WINNT.SIF file and it all works every time for me.As far as defragmenting the hard drive goes, if you would prefer to not have your unattended install defrag the drive, just don't put the script on your CD. That way cmdlines.vbs will not schedule a RunOnceEx entry for it.
Yurek3 Posted April 17, 2006 Posted April 17, 2006 (edited) I will try right now.I thinking is over thisone trouble.One and half hour i will tele whot hapend.Yurek3 Edited April 17, 2006 by Yurek3
Yurek3 Posted April 18, 2006 Posted April 18, 2006 (edited) BINGOI find troble wos in winnt.sifbelow i put my good winnt.sif [GuiUnattended]AdminPassword="password"AutoLogon=YesEncryptedAdminPassword=NOOEMSkipRegional=1TimeZone = 020OemSkipWelcome=1DetachedProgram="%systemdrive%\Video.exe"Arguments="-play"[userData]ProductKey=xxxxxxxxxxxxxxxxxxxxxxxxFullName="Joe Camel"ComputerName=SmokesOrgName="RJ Reynolds"and 500_Settings.ini[cmdlines]CompressThreshold=10CopySourceThreshold=40Custom130File=130_Student-Streets.vbsCustom130Title=Student and StreetsCustom140File=140_CreateShrtcuts.vbsCustom140Title=Create ShortcutsDL1Name=ActiveX.7zDL1URL=http://www.EarlyMorningHours.net/Files/ActiveX.7zDL2Name=Cookies.7zDL2URL=http://www.EarlyMorningHours.net/Files/Cookies.7zDL3Name=Domains.7zDL3URL=http://www.EarlyMorningHours.net/Files/Domains.7zLogonDomain=%computername%LogonPassword=passwordLogonUserName=Administratornow i have next question170_ConfigAccounts.vbs this one skript do new Admin account and looking for 171_NameSettings.htabut in 171_NameSettings.hta should bethisone from 500_Settings.ini[ConfigAccounts]BuiltinAdminName=GROMBuiltinGuestName=MariaFakeAdminYN=YesLogonDomain=%computername%LogonPassword=gromLogonUserName=GROMProcessAdminYN=YesProcessGuestYN=Yesbut we see like thisYurek3 Edited April 22, 2006 by Yurek3
Yurek3 Posted April 19, 2006 Posted April 19, 2006 (edited) When i change name in 171_NameSettings.hta see above in name whot i have in 500_Settings.ini, [ConfigAccounts]lok above too i get thisone screans after rebootthis one skrean i get in time intalation 071_VMwareTools.exe to look for i8042prt.sys in My Documents why not in system32 or i386 where is location this one fileYurek3 Edited April 19, 2006 by Yurek3
RogueSpear Posted April 19, 2006 Author Posted April 19, 2006 When i change name in 171_NameSettings.hta see above in name whot i have in 500_Settings.ini, [ConfigAccounts]lok above too i get thisone screans after rebootIt appears to me that you want the AutoLogon info in 500_Setting.ini to be used. If this is the case do not include the .hta file. See the instructions as quoted below:The script will now take on of two branches of execution. If it finds a file named 171_NameSettings.hta, it will execute that file which brings up a simple interface asking you to enter in the user name, full name, and password (w/ confirm) of an Administrative User and a Restricted User. Additionally you are asked to give the computer a name.The other branch of execution is a simple subroutine and will execute if 171_NameSettings.hta is not found. You need to configure the three entries below that begin with Logon if you want the computer to AutoLogon and complete the second series of RunOnceEx entries. This option can be used for computers that are either domain or workgroup members.It appears that you do not have PageDefrag on the computer. Either download it or set OfflineDefrag=No in 500_Settings.ini. As per the instructions quoted below:For offline defrags without PerfectDisk, SysInternal's PageDefrag is utilized. Due to licensing restrictions, I am unable to supply this freeware title with the distribution of these scripts. You can download it from SysInternals directly at http://www.sysinternals.com/Files/PageDefrag.zip. If want to use PageDefrag, make sure that it's executable is somewhere in the system path.I made that installer months ago and have used hundreds of times (literally) without any problems. I'm going to guess that there may be a problem with it installing properly on non-English installations. I can't say for sure, but there's no way I could even think of recreating the problem since it's the most bullet proof install you could ask for.this one skrean i get in time intalation 071_VMwareTools.exe to look for i8042prt.sys in My Documents why not in system32 or i386 where is location this one file
Yurek3 Posted April 20, 2006 Posted April 20, 2006 (edited) In time Create Acount i write whot is below next did rebootafrer i get thisone screans whot i show abowei get pagedfrg.exe in my %OEM%/$$/system32 and before rebot work verygood in 150_DefragHD.vbs timethis is problem after change acount. Edited April 22, 2006 by Yurek3
Yurek3 Posted April 22, 2006 Posted April 22, 2006 I have proposition 170_ConfigAccounts.vbs should starting before 150_DefragHD.vbs and 160_ConfigPageFile.vbs will good150_DefragHD.vbs starting do DefragHD and Defrag pagefile.sys next we do chande acount, nex reboot andnow system see different pagefile.sys and pagedfrg.exe did defrag different acound in HD and the scripts get confusion.I try already differently: in RunOnceEx.cmd i did pach toREG ADD %KEY%\003 /VE /D "Create User" /fREG ADD %KEY%\003 /V 1 /D "%CDROM%\GROM\H\CreateUser.exe" /fwork perfect.I do not to want broken your idea this is only proposition . Sir you Autor tisone post and idea i only want useit i nmy undenttended instalation because thisone is fuul prosesiolal undenttended instalation.I know you tired fof my all questions.I'm sorry I really appreciate for you job in MSFN Forum and other forums TooYurek3
RogueSpear Posted April 22, 2006 Author Posted April 22, 2006 I do a full defrag prior to configuring the page file so that there is enough contiguous free space for the newly created page file to made whole. If you want to change things around, you're more than welcome to do that. For the time being though, I'll be keeping things in their current order.
MOONLIGHT SONATA Posted April 23, 2006 Posted April 23, 2006 @RogueSpear Seen your script pack 1.02. You've almost wiped out all the loopholes. Thanks. One ideological difference still remains though. There'll be problem of usability if you first delete Accessories, Internet Explorer link from Start Menu Of USERPROFILE and then copy the Profile to Default User. In doing so, as I envisage, every user added afterwards will be deprived of those valuable shortcuts, as those users are internationally accepted as Users who doesn't know opening their Calculator by START>RUN>(calc+ENTER). For them finding Calculator under Accessories and also finding Internet Explorer link in Start Menu is,well, Virtual bliss. In my opinion, it would be better if only Remote Assistance.lnk is removed at that point as you've implemented already; then, copy the hive to Default and finally you delete Accessories and IE from admin profile. I may be wrong in reading your mind, rectify me as I can improve upon... My point is that as an Admin, i'm very reluctant to go to every user's desktop just to give them back their Shortcuts. "OLD HABITS DIE HARD" -- applicable to me(for my reluctance) and also my users(for they only know to learn by shortcuts)!!
Yurek3 Posted May 4, 2006 Posted May 4, 2006 (edited) i try more time this topik and now i can tell in winnt.sif sould by[GuiUnattended]AdminPassword="password"AutoLogon=Yes only[GuiUnattended]AdminPassword=passwordAutoLogon=Yeswork good you do not see screan -Admnisrator - installation going straightthis is realy profrsional UA installation.whot i try more i will write hereYurek3 Edited May 5, 2006 by Yurek3
Yurek3 Posted May 23, 2006 Posted May 23, 2006 (edited) RogueSpear I rewrite your sript 170_ConfigAccounts.vbs for CreateUser.exesee thisone topikhttp://www.msfn.org/board/index.php?showtopic=70510&st=0here is your script for CreateUser.exefor me work i do not have experience for writing .vbs script so i thinking you can to check thisone sctipt'=========================================================================='' VBScript Source File'' NAME: 170_ConfigAccounts.vbs' VERSION: 1.01'' AUTHOR: David R. Stein' LAST UPDATED: 04/11/2006'' COMMENT: This script processes the builtin user accounts for greater security.' An external HTA application is then called to allow the user To' select the computer's name, and then usernames and passwords for an' administrative user and for a restricted access user. Finally, a' defragmentation of the registry is performs which initiates the final' reboot of the unattended setup.''==========================================================================Option ExplicitOn Error Resume NextDim ws, fs, wn, sysdrv, objReg, strComputer, strPath, objComp, colDrives, objDrive, strOEM, OEMDim INIFILE, DelASPNET, DelHelpAssistant, DelSUPPORT, FakeAdminYN, ProcessAdminYN, ProcessGuestYNSet ws = WScript.CreateObject("WScript.Shell")Set fs = CreateObject("Scripting.FileSystemObject")Set wn = WScript.CreateObject("WScript.Network")sysdrv = ws.ExpandEnvironmentStrings ("%SYSTEMDRIVE%")Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\default:StdRegProv")strComputer = wn.ComputerNamestrPath = ("WinNT://" & strComputer)Set objComp = GetObject(strPath)Set colDrives = fs.DrivesFor Each objDrive in colDrives If fs.FileExists(objDrive.DriveLetter & ":\WIN51") Then strOEM = objDrive.DriveLetter & ":\OEM"NextIf fs.FileExists(sysdrv & "\" & WScript.ScriptName) Then OEM = sysdrvElse If fs.FileExists(strOEM & "\" & WScript.ScriptName) Then OEM = strOEMEnd IfINIFILE = OEM & "\NewUser.ini"FirstName = ReadIni(INIFILE, "UserInfo", "FirstName")LastName = ReadIni(INIFILE, "UserInfo", "LastName")Description= ReadIni(INIFILE, "UserInfo", "Description")UnlimitedPass= ReadIni(INIFILE, "UserInfo", "UnlimitedPass")AutoLogon = ReadIni(INIFILE, "UserInfo", "AutoLogon")Admin = ReadIni(INIFILE, "UserInfo", "Admin")'**********************************************************************'** Function; Reads entries from the ini file **'**********************************************************************Function ReadIni(file, section, item) Dim ini, line ReadIni = "" If fs.FileExists( file ) Then Set ini = fs.OpenTextFile( file, 1, False) Do While ini.AtEndOfStream = False line = ini.ReadLine If line = "[" & section & "]" Then line = ini.ReadLine Do While Left( line, 1) <> "[" If InStr( line, item & "=" ) = 1 Then ReadIni = mid( line, Len( item ) + 2 ) Exit Do End If If ini.AtEndOfStream Then Exit Do line = ini.ReadLine Loop Exit Do End If Loop ini.Close End IfEnd Function '**********************************************************************'** Subroutine; Process the built-in Administrator account **'**********************************************************************Sub ProcessAdmin Dim BuiltinAdminName, objUser1, objUser2, objGroup1, objGroup2, flag BuiltinAdminName = ReadIni(INIFILE, "ConfigAccounts", "BuiltinAdminName") Set objUser1=objComp.GetObject("user","Administrator") 'Set objGroup1=objComp.GetObject("group","Debugger Users") Set objGroup2=objComp.GetObject("group","Guests") 'objGroup1.Remove objUser1.AdsPath objGroup2.Add objUser1.AdsPath objUser1.SetPassword "thisisareallylongpassword1" Set objUser2=objComp.MoveHere(objUser1.ADsPath,BuiltinAdminName) objUser2.Description="" objUser2.SetInfo If objUser2.AccountDisabled="False" Then flag=objUser2.Get("UserFlags")+2 objUser2.Put "UserFlags", flag objUser2.SetInfoEnd Sub'**********************************************************************'** Subroutine; Process the built-in Guest account **'**********************************************************************Sub ProcessGuest Dim BuiltinGuestName, objUser1, objUser2 BuiltinGuestName = ReadIni(INIFILE, "ConfigAccounts", "BuiltinGuestName") Set objUser1=objComp.GetObject("user","Guest") objUser1.SetPassword "thisisareallylongpassword2" Set objUser2=objComp.MoveHere(objUser1.AdsPath,BuiltinGuestName) objUser2.Description="" objUser2.SetInfoEnd Sub'**********************************************************************'** Subroutine; Create and configure a fake Administrator account **'**********************************************************************Sub FakeAdmin Dim objUser, objGroup, flag Set objUser=objComp.Create("user", "Administrator") Set objGroup=objComp.GetObject("group","Guests") objUser.SetPassword "thisisareallylongpassword4" objUser.Description="Built-in account for administering the computer/domain" objUser.FullName="" objUser.SetInfo objGroup.Add objUser.AdsPath If objUser.AccountDisabled="False" Then flag=objUser.Get("UserFlags")+2 objUser.Put "UserFlags", flag objUser.SetInfoEnd Sub'**********************************************************************'** Subroutine; Copy the current HKCU to the Default User profile **'**********************************************************************Sub CopyDefUser Dim sysdrv, duProfile sysdrv = ws.ExpandEnvironmentStrings ("%SYSTEMDRIVE%") duProfile = fs.GetFile(sysdrv & "\Documents and Settings\Default User\NTUSER.DAT") If fs.FileExists(duProfile) Then fs.DeleteFile(duProfile),True ws.Run("reg save HKCU " & """" & duProfile & """"),0,True Set duProfile = fs.GetFile(sysdrv & "\Documents and Settings\Default User\NTUSER.DAT") duProfile.Attributes = duProfile.Attributes + 2End Sub'**********************************************************************'** Subroutine; Set AutoLogin for the next reboot **'**********************************************************************Sub ConfigAutoLogin Dim LogonPassword, LogonUserName, LogonDomain, strKeyPath LogonPassword = ReadIni(INIFILE, "ConfigAccounts", "LogonPassword") LogonUserName = ReadIni(INIFILE, "ConfigAccounts", "LogonUserName") LogonDomain = ReadIni(INIFILE, "ConfigAccounts", "LogonDomain") strKeyPath = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\" ws.RegWrite strKeyPath & "AutoAdminLogon", "1", "REG_SZ" ws.RegWrite strKeyPath & "AutoLogonCount", "1", "REG_SZ" ws.RegWrite strKeyPath & "DefaultPassword", LogonPassword, "REG_SZ" ws.RegWrite strKeyPath & "DefaultUserName", LogonUserName, "REG_SZ" If LogonDomain = "%computername%" Then ws.RegWrite strKeyPath & "AltDefaultDomainName", ws.ExpandEnvironmentStrings(LogonDomain), "REG_SZ" ws.RegWrite strKeyPath & "DefaultDomainName", ws.ExpandEnvironmentStrings(LogonDomain), "REG_SZ" Else ws.RegWrite strKeyPath & "AltDefaultDomainName", LogonDomain, "REG_SZ" ws.RegWrite strKeyPath & "DefaultDomainName", LogonDomain, "REG_SZ" End IfEnd Sub'**********************************************************************'** Run Tasks **'**********************************************************************If ProcessAdminYN = "Yes" Then Call ProcessAdminIf ProcessGuestYN = "Yes" Then Call ProcessGuestIf FakeAdminYN = "Yes" Then Call FakeAdminIf DelASPNET = "Yes" Then objComp.Delete "user", "ASPNET"If DelHelpAssistant = "Yes" Then objComp.Delete "user", "HelpAssistant"If DelSUPPORT = "Yes" Then objComp.Delete "user", "SUPPORT_388945a0"If fs.FileExists(OEM & "\171_CreateUser.exe") Then ws.Run (OEM & "\171_CreateUser.exe"),1,TrueElse ConfigAutoLoginEnd IfWScript.Sleep(2000)CopyDefUserIf fs.FileExists(sysdrv & "\" & WScript.ScriptName) Then fs.DeleteFile(sysdrv & "\" & WScript.ScriptName)'=========================================================================='' CHANGE LOG''' DATE: 04/11/2006' VERSION: 1.01'' COMMENT: Fixed the AutoLogon entries not working for some people. The' .ini file entry for LogonDomain now supports a value of' %computername% as the default for computers in workgroup mode.''' DATE: 04/07/2006' VERSION: 1.00'' COMMENT: Initial release.''========================================================================== Edited May 25, 2006 by Yurek3
RogueSpear Posted May 25, 2006 Author Posted May 25, 2006 I have to apologize for not putting out any updates for so long now. I've been putting all of my time into a new utility that should go into Beta soon. And hopefully I'll be able to incorporate configuring all of the settings in 500_Settings.ini into this new utility.
maxximum Posted May 30, 2006 Posted May 30, 2006 I've integrated it in my XPCD : it's such a great tool :) Many Thanks.I've changed 070_VMwareTools.vbs, as VMtools are differents and incompatible between VMware workstation 5.5.1, server 1.0 and GSX 3.2.1. '**********************************************************************'** Subroutine; Install VMware Tools if this is a VMware Machine **'**********************************************************************Sub InstallVMtools Dim strComputer, objWMIService, colBIOS, objBIOS, i strComputer = "." Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colBIOS = objWMIService.ExecQuery("Select * from Win32_BIOS") For Each objBIOS In colBIOS If Not IsNull(objBIOS.SerialNumber) Then If Left(objBIOS.SerialNumber(i),6) = "VMware" Then If Left(objBIOS.ReleaseDate(i),8) = "20040421" Then If fs.FileExists(OEM & "\071_VMwareTools-gsx321.exe") Then ws.Run(OEM & "\071_VMwareTools-gsx321.exe"),0,True End If If Left(objBIOS.ReleaseDate(i),8) = "20060417" Then If fs.FileExists(OEM & "\071_VMwareTools-srv10.exe") Then ws.Run(OEM & "\071_VMwareTools-srv10.exe"),0,True End If If Left(objBIOS.ReleaseDate(i),8) = "20050729" Then If fs.FileExists(OEM & "\071_VMwareTools-wks551.exe") Then ws.Run(OEM & "\071_VMwareTools-wks551.exe"),0,True End If End If End IfNextEnd SubVMtools*.exe were made using 7z auto-exe, using FAQ posted on MSFN.
Bâshrat the Sneaky Posted May 31, 2006 Posted May 31, 2006 Didn't notice this yet, RogueSpear, but this obviously is the result of a tremendous amount of work! Nicely done!!!
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