Jump to content

Windows XP SP2 Post Install Script Pack V1.02


Recommended Posts

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.

Link to comment
Share on other sites


BINGO

I find troble wos in winnt.sif

below i put my good winnt.sif

[GuiUnattended]AdminPassword="password"

AutoLogon=Yes

EncryptedAdminPassword=NO

OEMSkipRegional=1

TimeZone = 020

OemSkipWelcome=1

DetachedProgram="%systemdrive%\Video.exe"

Arguments="-play"

[userData]

ProductKey=xxxxxxxxxxxxxxxxxxxxxxxx

FullName="Joe Camel"

ComputerName=Smokes

OrgName="RJ Reynolds"

and 500_Settings.ini

[cmdlines]CompressThreshold=10

CopySourceThreshold=40

Custom130File=130_Student-Streets.vbs

Custom130Title=Student and Streets

Custom140File=140_CreateShrtcuts.vbs

Custom140Title=Create Shortcuts

DL1Name=ActiveX.7z

DL1URL=http://www.EarlyMorningHours.net/Files/ActiveX.7z

DL2Name=Cookies.7z

DL2URL=http://www.EarlyMorningHours.net/Files/Cookies.7z

DL3Name=Domains.7z

DL3URL=http://www.EarlyMorningHours.net/Files/Domains.7z

LogonDomain=%computername%

LogonPassword=password

LogonUserName=Administrator

now i have next question

170_ConfigAccounts.vbs this one skript do new Admin account and looking for 171_NameSettings.hta

but in 171_NameSettings.hta should be

thisone from 500_Settings.ini

[ConfigAccounts]BuiltinAdminName=GROM

BuiltinGuestName=Maria

FakeAdminYN=Yes

LogonDomain=%computername%

LogonPassword=grom

LogonUserName=GROM

ProcessAdminYN=Yes

ProcessGuestYN=Yes

but we see like this

configaccounts16qh.png

Yurek3

Edited by Yurek3
Link to comment
Share on other sites

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 reboot

snap11qk.th.jpg

snap22oy.th.jpg

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

snap30oq.th.jpg

Yurek3

Edited by Yurek3
Link to comment
Share on other sites

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 reboot

It 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

Link to comment
Share on other sites

In time Create Acount i write whot is below next did reboot

acount18oy.th.jpg

afrer i get thisone screans whot i show abowe

i get pagedfrg.exe in my %OEM%/$$/system32 and before rebot work verygood in 150_DefragHD.vbs time

this is problem after change acount.

Edited by Yurek3
Link to comment
Share on other sites

I have proposition

170_ConfigAccounts.vbs should starting before 150_DefragHD.vbs and 160_ConfigPageFile.vbs will good

150_DefragHD.vbs starting do DefragHD and Defrag pagefile.sys next we do chande acount, nex reboot and

now 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 to

REG ADD %KEY%\003 /VE /D "Create User" /f

REG ADD %KEY%\003 /V 1 /D "%CDROM%\GROM\H\CreateUser.exe" /f

work perfect.

I do not to want broken your idea this is only proposition . Sir you Autor tisone post and idea i only want use

it 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 Too

Yurek3

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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)!!

Link to comment
Share on other sites

  • 2 weeks later...

i try more time this topik and now i can tell in winnt.sif sould by

[GuiUnattended]AdminPassword="password"

AutoLogon=Yes

only

[GuiUnattended]AdminPassword=password

AutoLogon=Yes

work good you do not see screan -Admnisrator - installation going straight

this is realy profrsional UA installation.

whot i try more i will write here

Yurek3

Edited by Yurek3
Link to comment
Share on other sites

  • 3 weeks later...

RogueSpear

I rewrite your sript 170_ConfigAccounts.vbs for CreateUser.exe

see thisone topik

http://www.msfn.org/board/index.php?showtopic=70510&st=0

here is your script for CreateUser.exe

for 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 Explicit

On Error Resume Next

Dim ws, fs, wn, sysdrv, objReg, strComputer, strPath, objComp, colDrives, objDrive, strOEM, OEM

Dim INIFILE, DelASPNET, DelHelpAssistant, DelSUPPORT, FakeAdminYN, ProcessAdminYN, ProcessGuestYN

Set 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.ComputerName

strPath = ("WinNT://" & strComputer)

Set objComp = GetObject(strPath)

Set colDrives = fs.Drives

For Each objDrive in colDrives

If fs.FileExists(objDrive.DriveLetter & ":\WIN51") Then strOEM = objDrive.DriveLetter & ":\OEM"

Next

If fs.FileExists(sysdrv & "\" & WScript.ScriptName) Then

OEM = sysdrv

Else

If fs.FileExists(strOEM & "\" & WScript.ScriptName) Then OEM = strOEM

End If

INIFILE = 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 If

End 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.SetInfo

End 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.SetInfo

End 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.SetInfo

End 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 + 2

End 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 If

End Sub

'**********************************************************************

'** Run Tasks **

'**********************************************************************

If ProcessAdminYN = "Yes" Then Call ProcessAdmin

If ProcessGuestYN = "Yes" Then Call ProcessGuest

If FakeAdminYN = "Yes" Then Call FakeAdmin

If 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,True

Else

ConfigAutoLogin

End If

WScript.Sleep(2000)

CopyDefUser

If 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 by Yurek3
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 If
Next
End Sub

VMtools*.exe were made using 7z auto-exe, using FAQ posted on MSFN.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...