Jump to content

FirstLogonCommands failing


Recommended Posts

As far as I'm aware the install doesn't crash at all. But installing it somehow causes the profile to be bust.

I exported the HKCU to a regfile after an install without dotnet at firstruncommands time where it was fine and exported it when dotnet had installed and thus the profile was bust.

Comparing the 2 files with diffmerge I see a few litle changes around the place the the biggest are where some filenames are in the ok regfile as strings but in the broke regfile they are lots of hex blocks. The other main difference is the themes and visualstyles registry sections are msising in the broken on. So the issue is why does dotnet installing somehow take these away from the HKCU or stop them ever being put in there?? Gah :/

I've attache the 2 regfiles in a zip so anyone can take a look and see. The only differenece, remember, is that broke.reg was after dotnet4 has installed at firstruncommands time ...

profiles.zip

Link to comment
Share on other sites


But installing it somehow causes the profile to be bust.

Thats crashing to me. After so long I speak in short terms. Log option will perhaps tell you what happened

The FirstLogonCommands setting specifies commands to run the first time a user logs on to the computer.

So in reality it is trying to modify and load the user profile at this point and perhaps why it is not working

Commands in the Setupcomplete.cmd file are executed with local system privilege.

Link to comment
Share on other sites

Well like I said from the start - I'd love to use the setupcomplete.cmd timeframe to install from (on XP it was T-13 minutes it would run your startup scripts and show you and command windows you opened so you could watch them run through) but not only does it not show you the command window showing your script progressing so you can see where it's upto (I could probably live with that I guess) but it sits there saying "setup is testing video performance". That's not really an acceptible screen to leave running for 16 minutes while dotnet4 installs! I will try to get the dotnet4 install to use the logging option in the offchance it reveals something :/ Then I may try to turn on verbose user logon logging. But I'm not sure either will reveal how running dotnet4 setup at logon rather than setupcomplete causes a profile to break (and if you complete the files above you see how little has changed - mainly just the visual styling of the profile)

To clarify my customisations - I did a few removals/tweaks with RT7lite and the rest I've done manually with autounattend.xml and this startup script I'm trying to run. I've attached the lastsession.inf

Lastsession.inf

Edited by leozack
Link to comment
Share on other sites

I run dxsetup-apr2011-x64.exe at setupcomplete and it actually comes up and I can see it cause I run it manually. I have tried countless times to get scripts to show but they don't.

I've tried shift F10 but there are no other cmd windows I can tab to.

Might be able to compile the .cmd to exe like with bat2exe and use Title to show progress but I haven't done it.

MS left us short on this for some reason

Link to comment
Share on other sites

Well dotnet4 installed fine on setupcomplete.cmd again - but it had a dialog open showing what it's doing and a cancel button (why cant I get rid f cancel better)

Here are the udpated profiles from notbroke (no dotnet4), broke (dotnet4 firstlogoncommands time), and setupcomplete.cmd (dotnet and not broken).

Also attached is dotnet4 setup logs - 1 from when it works and 1 from when it breaks the profile using firstlogoncommands install time

Can't type am falling asleep will try more tomor hopefully, lmk if you can source the problems.

I've seen a couple of eventlog errors and have yet to test the just win7sp1 barebones install to see if they're still there or if dotnet4 is somehow causing problems

Link to comment
Share on other sites

You can try to add a user account inside your Autounattend.xml


<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<PlainText>false</PlainText>
<Value>xxxxxxxxxx</Value>
</Password>
<Group>Administrators</Group>
<DisplayName>myselfidem</DisplayName>
<Name>myselfidem</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>

More help:

Unattended Setup Known Issues

Automatically shutting down the computer by using FirstLogonCommand

[Added July 13, 2009]

You might experience problems automatically shutting down the computer by using FirstLogonCommands. Windows continues to process features and settings while a user is logged on to the computer and the processing time varies depending on the hardware configuration. If the computer shuts down while Windows features are still being processed, you might experience unexpected behavior. In some cases, user profile folders or libraries might not be properly created. Windows Backup and other applications might rely on these user profile settings being configured.

Workaround: Test the Windows features you intend to use. If you experience problems with the user account, use the /t option to add a delay to the shutdown command. For example, to add 60 seconds before the shutdown command executes, use the following command: shutdown -r -t 60.

http://technet.micro...etupKnownIssues

Edited by myselfidem
Link to comment
Share on other sites

What would I be testing by adding a user during setup - what would that change?

I considered that my script shuts it down and that might cause problems - but in reality if I rem out dotnet then the script runs and shutsdown fine and there are no problems - and installing dotnet takes 16 minutes so there shouldn't be anything still needing to setup after all that time whereas I'd have expeted more chance of trouble shutting down without installing dotnet as there wasn't a delay while it installed - yet I only get the problem when installing dotnet!

I dunno - I'm reluctantly thinking maybe let it install during setupcomplete with the silly videotest screen appearing all that time :(

I'm also wondering if it's a good idea to integrate all the win7 updates since sp1 (is there a list anywhere?) or at least install those at setupcompletes/firstlogoncommands too

Link to comment
Share on other sites

Well I'm still not sure what anyone was suggesting as an answer - I see no answer - other than to give in and install dotnet4 at setupcomplete.cmd time which I am now doing.

I also integrated all the updates since sp1 and the dotnet3.5.1 updates into the WIM

I also set my FirstRun.bat to install the 7 dotnet4 updates

I also then set the FirstRun.bat to not reboot as there doesn't seem a need

I thiiiiiiiiiink it should now be ok - though install might now take 5m+20m+10m or something. Still wish there was a reason/solution for installing dotnet4 itself at firstlogon rather than setupcomplete but nvm.

Link to comment
Share on other sites

Why not just install it all in audit mode? I recently just figured it out. I hated the setup complete for the same reason as you do plus it took forever and a day to get some kind of progress bar. To me firstlogoncommands works better and looks better and you can reboot as needed.

Small edit: for .net stuff I use /passive instead of quiet so I can at least see its progress.

Edited by gotenks98
Link to comment
Share on other sites

Audit mode is somethin you do manually though - you also have to interject the right keycombo at the right time ot get to it. That doesn't flow well with an unattended install you can fire off and come back to a pc setup and ready to customise for the site but with as much stuff already done/on it as possible.

So I've now integrated all updates since SP1 along with some dotnet 3.5.1 updates and setupcomplete runs dotnet4 install (like you I'm now using /passive, and I found the cancel button is greyed ut (yay) and it even appears over teh "checking video performance" screen so that kinda gets rid of that annoyance) and firstlogoncommands runs dotnet4 updates.

Sounds perfect. Except my application event log shows lots of silly warnings (.net runtime optimization service - error 1130 - version or flavor did not match with repository). I removed my dotnet4 updates from the script and tried again but still had them so I guess they're from the dotnet 3.5.1 udates I integrated - doh! Guess I have to go back and start a new setup source and not integrate those and then see if I can find out precisely what causes them (unless there is a fix?) I also found currently installing from my USB to this fizzbook it's 15m win7 install, 15m dotnet4 script install, then 30m installing all 7 dotnet4 updates! Ouch

I also just found 2 errors (security-spp - error 8200 - license acquisition failiure details) & (security-spp - error 8208 - aquisition of genuine ticket failed).

I also get asp.net warning 1020 cos I don't have IIS installed but that's ok.

I also notice a user profile service error 1530 which I think I always seem to see at least 1 of saying registry file in use by other applications or services

At least my system log is clean!

Attached my files for you rperusal

Unattended.zip

Edited by leozack
Link to comment
Share on other sites

Audit mode is somethin you do manually though - you also have to interject the right keycombo at the right time ot get to it.

You can also install Windows with an autounattend.xml that boots the system into Audit mode, without having to worry about key combinations.

Link to comment
Share on other sites

OK - so what happens in audit mode? I install stuff manually? The idea here is that I have it all working without installing stuff manually. What does booting to audit mode give me?

Also audit mode reboots to normal mode and since I'll probably hve to join domains/reboot etc while configuring a client I wouldn't be staying in audit mode.

Link to comment
Share on other sites

All of it can be done on auto in audit mode. I have recently been working on this for the past few months on vista to make a disc that does it all. Just slipstream updates(some may need to be done in a certain order), autoinstall those that cant be slipstream like the .net stuff. Then any apps or reg tweaks. It works extremely well.

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