Jump to content

[Solved] FirstlogonCommands


Recommended Posts

Hey folks :)

I already successfully managed to get an unattended method, installing my applications by using the audit mode.

However, I'd love to try out to run installation scripts by using "<FirstlogonCommands>" aswell

For some reason, commands listed under <FirstlogonCommands> don't seem to be executed, when I login with user "Sony" the 1st time.

Below is my AutoUnattend.xml. Would you mind givin it a shot ? Maybe some experienced user finds an error I got in there.

As you can see, I'd like to have it run the C:\install\install.cmd script (I already tried replacing "c:" with %systemdrive%, no go either), which is copied over from the dvd ($oem$\$1\MyFolders) during setup (working properly).

But for some reason it just ain't executed.


<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UILanguage>de-DE</UILanguage>
<UserLocale>de-DE</UserLocale>
<SystemLocale>de-DE</SystemLocale>
<InputLocale>0407:00000407</InputLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserData>
<ProductKey>
<WillShowUI>OnError</WillShowUI>
<Key>xxxxx-xxxxx-xxxxx-xxxxx</Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>Sony</FullName>
<Organization>-</Organization>
</UserData>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows Vista HOMEPREMIUM</Value>
</MetaData>
</InstallFrom>
<WillShowUI>OnError</WillShowUI>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
</OSImage>
</ImageInstall>
<UseConfigurationSet>true</UseConfigurationSet>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Security-Licensing-SLC-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TimeZone>W. Europe Standard Time</TimeZone>
<ProductKey>xxxxx-xxxxx-xxxxx-xxxxx</ProductKey>
<ComputerName>SonyOne</ComputerName>
<CopyProfile>true</CopyProfile>
<RegisteredOrganization>-</RegisteredOrganization>
<RegisteredOwner>-</RegisteredOwner>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UILanguage>de-DE</UILanguage>
<UserLocale>de-DE</UserLocale>
<SystemLocale>de-DE</SystemLocale>
<InputLocale>0407:00000407</InputLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
<TimeZone>W. Europe Standard Time</TimeZone>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Group>Administrators</Group>
<Name>Sony</Name>
<DisplayName>Sony</DisplayName>
<Password>
<Value>mypassword</Value>
<PlainText>false</PlainText>
</Password>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>c:\install\install.cmd</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-PnpSysprep" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:d:/vlitework/sources/install.wim#Windows Vista HOMEPREMIUM" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

Thanks to everyone in advance :)

Regards

Sony

Update:

Nevermind. I added a "pause" into the script. Actually it was executed, but gave an error inside and closed immediately. Way too fast for the eye to capture.

Nevertheless, I will stick to this thread should I run into problems again :)

Edited by SonyXP
Link to comment
Share on other sites

  • 4 months later...

  • 2 weeks later...

I'm almost sure but don't sue me if I am wrong.

For first logon commands you have to configure the .xml with autologon and the name of the user in autologon has to be "administrator".

- <AutoLogon>
<Enabled>true</Enabled>
<LogonCount>1</LogonCount>
<Username>Administrator</Username>
</AutoLogon>

Edited by COOLCOMPUTERGUY
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...