Autologon fails, blank username

G

Guest

I want my system to autologon so I created a user-component based on
(prototype) "User Account" with advanced settings:
cmiUserGroup = 1
cmiUserName = user_1
cmiUserPasword = pass_1

created a autologon-component based on (prototype) "Automatic Logon" with
advanced settings:
cmiAutoLogonUser = user_1
cmiAutoLogonPassword = pass_1

added them both in the TD and build the target image.

After instalingl the target image it doesn't logon automatically.
When I check the key "HKEY_LOCAL_MACHINE\1234\Microsoft\Windows
NT\CurrentVersion\Winlogon" I find that the value "DefaultUserName" is empty.
When this value is filled with "user_1" automatic logon works.

I loaded the registry hive SOFTWARE of the target image before install and
found that the "DefaultUserName" is already empty, so it's nothing that
occurs during FBA.

What am I mising here ??

Thijs
 
M

ms

hi,

I think, you don't need to create your own components. Just add the
original components (User account-component and automatic
logon-component) and fill the automatic logon settings with the user
account data.

lg

michael
 
G

Guest

The reason I created my own components is that I was multiple targets that
are only different in hardware. If I just add the "User Account" and
"Automatic Logon" I have to set the advanced properties for all my current
targets and all targets that will follow. This is the idea behind prototyping.

But when I check the settings of my AutoLogon-component in the TD I see the
normal "Automatic Logon Settings" tab but already filled out:
Domain name: ""
User name: "user_1"
Password: "pass_1"

If prototyping doesn't work with this component I'd like to know

Thijs
 
D

Daron Underwood \(eMVP\)

There is a thread on the system cloning component causing the autologon
username/password to reset. Look this up on msdn to see how to correct this
behavior.
 
G

Guest

Nope, it isn't the system cloning component. It's this:
"Allowing auto-resolve to add Windows Logon to a runtime causes the
automatic logon default username to be overwritten."
as described at
http://msdn.microsoft.com/library/d...icrosoftWindowsXPEmbeddedWithServicePack2.asp

So I have to manually remove and add the Windows Logon component. Don't like
this solution, so thought my own:

Added the following script to a customer User-component based on User Account
================================
Sub cmiOnEndBuild(dwFlags)
Dim oProp, sName, sPass
'Read UserName and UserPassword properties from User-component
For Each oProp In cmiThis.Properties
If oProp.Name = "cmiUserPassword" Then
sPass = CStr(oProp.Value)
ElseIf oProp.Name = "cmiUserName" Then
sName = CStr(oProp.Value)
End If
Next
'Write data to registry
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_SZ,
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon",
"DefaultUserName", sName, cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_SZ,
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon",
"AltDefaultUserName", sName, cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_SZ,
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon",
"DefaultPassword", sPass, cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_SZ,
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon",
"AutoAdminLogon", "1", cmiString
End Sub
================================

Thijs
 
S

steves

Thijs,

Nice script, but How do you go about adding this script to your
component? Do you open the component file as XML and hand edit? Or do
you have one of KM's super tools, or use the cmiExplorer, or what?

Would it be possible for you to post a short, generic explanation for
creating such scripts (maybe in a new thread), or point me to the docs
that got you started doing this?. Thanks in advance.

SteveS
stevesATeyeDASHimagingDOTcom
 
G

Guest

Hello Steve,

To add a script to your component open your component in the CD.
Under the the main component properties click the ">" button at the
"Component script" textbox. Select browse and just browse to your vbs-script.
For HTML it's the same, but at "Component DHTML".

If you create a new project in Visual Basic you can add the cmi.dll and
cmim.dll as references. These files files can be found under:
\Program Files\Common Files\Microsoft Shared\Windows Embedded
Now you can browse the "CMI Object Library v1.0" (cmi.dll) and
CMIM: CMI Middle-Tier 1.0 Type Library (cmim.dll) using the VB Object Browser.
VB is a handy environment to prepare your scripts due to the autocomplete.

I learned the most about the scripts in the SP2.sld file on the XPE-cd.
THe files can be found in the the folder "cooked" in the XPESP2.exe archive
on the root of the XPE-CD. When you open SP2.sld using notepad you will find
many script examples (may take a while, the file is 143MB)

Good Luck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top