Jump to content

LoadUserProfile failed


Derkan

Recommended Posts

I've created a switchless SFX of Mozilla and also create an SFX for my user profile that I would like to both run at T-12 using XPlode with cmdlines.txt. Since I create the account in that step as well, I thought that installing the profile with a simulated user logon would work, but unfortunately, that fails.

Here are my XPlode.xml (based on the GFXInstall):

<XPlode4>
<config>
 <tokens>
 <token username="Test User" password="test" />
 </tokens>
 <environment>
 <display.title>XPlode Installation</display.title>
 <display.complete>completed</display.complete>
 <adduser.adduser>Adding user: #1#</adduser.adduser>
 <adduser.deluser>Deleting user: #1#</adduser.deluser>
 <adduser.addgroup>Adding group: #1#</adduser.addgroup>
 <adduser.delgroup>Deleting group: #1#</adduser.delgroup>
 <execute.string>Executing: #1#</execute.string>
 <misc.sfcos-disable>Disabling Windows File Protection</misc.sfcos-disable>
 <misc.sfcos-enable>Enabling Windows File Protection</misc.sfcos-enable>
 <misc.netstart>Starting #1#</misc.netstart>
 <misc.netstop>Stopping #1#</misc.netstop>
 <registry.read>Reading from registry</registry.read>
 <registry.write>Writing to registry</registry.write>
 </environment>
 <display plugin='#XPLODE#\XPlodeGFXInstall.x4d'>
 <show total='12' after='4' subcount='true' />
 <font face='Verdana' antialias='true' small='8' large='13' />
 <window width='420' height='750' position='2' />
 <windowmode border='true' ontop='false' />
 <colours>
   <header x='4' y='4' fore='#FFFFFF' />
   <footer x='4' y='730' width='410' fore='#D97D2B' />
   <progress border='#000000' back='#FFFFFF' fore='#008800' />
   <main x='16' y='40' width='388' fore='#FFFFFF' current='#FFFF00' description='#FFFF80' overlay='#FFFFFF44'/>
 </colours>
 </display>
</config>
<items>
 <item display="Adding users to #COMPUTERNAME#">
 <adduser display="Adding Test User">
   <username>"Test User"</username>
   <password>test</password>
   <group>Administrators</group>
   <arguments>accounts /maxpwage:unlimited</arguments>
   <hide>true</hide>
 </adduser>
 </item>
 <item display="Installing Internet Programs">
        <execute display="Installing Mozilla Suite">
   <program>#SOURCEDRIVE#\Software\Internet\mozilla\mozilla-1.8a6.exe</program>
   <wait>true</wait>
    </execute>
       <execute token="Test User">
   <program>#SOURCEDRIVE#\Software\Internet\mozilla\profile.exe</program>
   <wait>true</wait>
    </execute>
 </item>
</items>
</XPlode4>

and the log:

>>> Log session start at: 2005/02/09 05:44:21
XPlode4
  Adding environment variables
     #XPLODE# = 'F:\XPlode'
     #SOURCEPATH# = 'F:'
     #SOURCEDRIVE# = 'F:'
     #VERSION# = 'XPlode 4.00'
  XMLParser::LoadFile(F:\XPlode\XPlode.xml)
  Reading environment variables from XML
     #DISPLAY.TITLE# = 'XPlode Installation'
     #DISPLAY.COMPLETE# = 'completed'
     #ADDUSER.ADDUSER# = 'Adding user: #1#'
     #ADDUSER.DELUSER# = 'Deleting user: #1#'
     #ADDUSER.ADDGROUP# = 'Adding group: #1#'
     #ADDUSER.DELGROUP# = 'Deleting group: #1#'
     #EXECUTE.STRING# = 'Executing: #1#'
     #MISC.SFCOS-DISABLE# = 'Disabling Windows File Protection'
     #MISC.SFCOS-ENABLE# = 'Enabling Windows File Protection'
     #MISC.NETSTART# = 'Starting #1#'
     #MISC.NETSTOP# = 'Stopping #1#'
     #REGISTRY.READ# = 'Reading from registry'
     #REGISTRY.WRITE# = 'Writing to registry'
  Reading tokens from XML
     AccessToken::SetupTokens(Test User)
        Username: Test User
        Domain: WH56-0202
        Password: *****
  Loading XPlode plugins
     Loading display plugin: 'F:\XPlode\XPlodeGFXInstall.x4d'
        Plugin load successful: 'F:\XPlode\XPlodeGFXInstall.x4d'
     Loading effects plugins
        Plugin load successful: 'F:\XPlode\XPlodeRegistry.x4e'
        Plugin load successful: 'F:\XPlode\XPlodeMisc.x4e'
        Plugin load successful: 'F:\XPlode\XPlodeExecute.x4e'
        Plugin load successful: 'F:\XPlode\XPlodeAdduser.x4e'
  Registering XPlode commands
     Registering commands in 'F:\XPlode\XPlodeRegistry.x4e'
        Command registered: <registry ... />
     Registering commands in 'F:\XPlode\XPlodeMisc.x4e'
        Command registered: <sfcos-enable ... />
        Command registered: <sfcos-disable ... />
        Command registered: <netstart ... />
        Command registered: <netstop ... />
     Registering commands in 'F:\XPlode\XPlodeExecute.x4e'
        Command registered: <execute ... />
     Registering commands in 'F:\XPlode\XPlodeAdduser.x4e'
        Command registered: <adduser ... />
        Command registered: <addgroup ... />
        Command registered: <deluser ... />
        Command registered: <delgroup ... />
  Spawning display plugin
     Install log: Starting dialog
     Install log: Execution thread
     Executing tag: 'XPlode4(0).items(0).item(0).adduser(0)'
        Install log: Running: 'NET USER "Test User" test  /ADD' (hidden)
        Install log: Running: 'NET LOCALGROUP "Administrators" "Test User" /ADD' (hidden)
     Executing tag: 'XPlode4(0).items(0).item(1).execute(0)'
        Install log: Running: 'F:\Software\Internet\mozilla\mozilla-1.8a6.exe '
     Executing tag: 'XPlode4(0).items(0).item(1).execute(1)'
        AccessToken::LoadUserProfile(Test User) failed - The device is not ready.
        AccessToken::ImpersonateLoggedOnUser(Test User) succeeded.
        Install log: Running: 'F:\Software\Internet\mozilla\profile.exe '
>>> Log session end at: 2005/02/09 05:46:09

The installation of Mozilla worked, and in a sense also that of the profile. But since the logon didn't work, a different user profile was created on first logon, of course.

AccessToken::LoadUserProfile(Test User) failed - The device is not ready.

What exactly does it mean, the device isn't ready, and what did I do wrong? If I've missed a thread covering this already, please let me know.

Link to comment
Share on other sites


Btw, I'd actually prefer to have a display entry "Installing Mozilla Profile", the XML and log are just from another test I ran.

This is what I was thinking about:

<item display="Installing Internet Programs">
<execute display="Installing Mozilla Suite">
 <program>#SOURCEDRIVE#\Software\Internet\mozilla\mozilla-1.8a6.exe</program>
 <wait>true</wait>
</execute>
<execute token="Test User">
 <execute display="Installing Mozilla Profile">
   <program>#SOURCEDRIVE#\Software\Internet\mozilla\profile.exe</program>
 <wait>true</wait>
 </execute>
</execute>
</item>

Link to comment
Share on other sites

Sorry, I really should read things properly before posting.

The following is how to get network shares working during Windows setup.

All I can say is, make sure the secondary logon service is started, and test logging in afterward.

This is a known issue with WindowsXP - an inf setting was not created properly when the XP CD's were built.

MS KB Article + Fix:

http://support.microsoft.com/default.aspx?...b;EN-US;Q314543

The secondary logon service still needs to be started - use <netstart>seclogon</netstart>

This should work, but let me know if it doesn't. I haven't been able to test logging on during windows setup.

Link to comment
Share on other sites

Small update:

I've added the line in HIVESYS.INF as specified on the linked site:

HKLM,"SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder",,0x00000012

HKLM,"SYSTEM\CurrentControlSet\Control\NetworkProvider\Order",,0x00000012

These two lines are line 817 & 818 respectively now. (Mentioning this to save others a few minutes.)

Starting the secondary logon works. Using the code from my second post in this thread did not work, so it's not possible at the moment to have something display while autoloading a profile, I figure.

I can only guess what's up here since I'm just an amateur without formal schooling in programming, but from the log, it looks like <program></program> is immediately expected after the <execute token="Test User">.

Following are the pertinent parts of the XPlode.XML and the log. I'll test without the <execute display=""> in a second, just wanted to let you know (and also to not lose the log). More info when I have it.

<items>

  <item display="Adding users to #COMPUTERNAME#">

<adduser display="Adding Test User">

    <username>"Test User"</username>

    <password>test</password>

    <group>Administrators</group>

    <arguments>accounts /maxpwage:unlimited</arguments>

    <hide>true</hide>

</adduser>

  </item>

  <item display="Starting Secondary Logon">

<netstart>seclogon</netstart>

  </item>

  <item display="Installing Internet Programs">

      <execute display="Installing Mozilla Suite">

  <program>#SOURCEDRIVE#\Software\Internet\mozilla\mozilla-1.8a6.exe</program>

  <wait>true</wait>

  </execute>

  </item>

  <item display="Testing Registry">

      <execute token="Test User">

  <execute display="Installing Mozilla Profile">

      <program>#SOURCEDRIVE#\Software\Internet\mozilla\profile.exe</program>

      <wait>true</wait>

        </execute>

  </execute>

  </item>

</items>

Spawning display plugin

      Install log: Starting dialog

      Install log: Execution thread

      Executing tag: 'XPlode4(0).items(0).item(0).adduser(0)'

      Install log: Running: 'NET USER "Test User"  /ADD' (hidden)

      Install log: Running: 'NET LOCALGROUP "Administrators" "Test User" /ADD' (hidden)

      Executing tag: 'XPlode4(0).items(0).item(1).netstart(0)'

      Install log: Starting seclogon

      Install log: Running: 'net start "seclogon"' (hidden)

      Executing tag: 'XPlode4(0).items(0).item(2).execute(0)'

      Install log: Running: 'F:\Software\Internet\mozilla\mozilla-1.8a6.exe '

      Executing tag: 'XPlode4(0).items(0).item(2).execute(1)'

      AccessToken::LoadUserProfile(Test User) failed - The device is not ready.

      AccessToken::ImpersonateLoggedOnUser(Test User) succeeded.

      Install log: Running: ' ' <--- note this after logging on to Default User

      Install log: File not found.

      Error during execution: Invalid XML syntax - missing 'program' tag.

Link to comment
Share on other sites

Serves me right for not reading things again :)

Your XML syntax is wrong:

What you have:

 <item display="Testing Registry">
     <execute token="Test User">
   <execute display="Installing Mozilla Profile">
     <program>#SOURCEDRIVE#\Software\Internet\mozilla\profile.exe</program>
     <wait>true</wait>
       </execute>
   </execute>
 </item>

What it should be:

 <item display="Testing Registry">
     <execute token="Test User" display="Installing Mozilla Profile">
       <program>#SOURCEDRIVE#\Software\Internet\mozilla\profile.exe</program>
       <wait>true</wait>
     </execute>
 </item>

One thing to note, the execute plugin waits by default, so it's not necessarily needed.

Link to comment
Share on other sites

Oi, that was fast, Wraith. Consider me your guinnea pig for this problem btw. :)

I just got done with another try (this time without a password at all which won't let it execute at all).

I'll fix my code and try again - with a password.

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