Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FirstlogonCommands broke in OOBE

Featured Replies

I'm ripping my hair out trying to get dog gone firstlogoncommands to run during a Windows 7 Enterprise edition autounattend.xml installation in the OOBESystem section. Code excerpt is below:

<FirstLogonCommands>

<SynchronousCommand wcm:action="add">

<Order>1</Order>

<CommandLine>regedit /s c:\windows\setup\scripts\image_registry.reg</CommandLine>

<Description>Configures registry settings</Description>

<RequiresUserInput>false</RequiresUserInput>

</SynchronousCommand>

<SynchronousCommand wcm:action="add">

<Order>2</Order>

<Description>Image lockdown</Description>

<RequiresUserInput>false</RequiresUserInput>

<CommandLine>cmd.exe /c powershell.exe "c:\Windows\setup\scripts\image_lockdown.ps1 > c:\Windows\setup\scripts\image_lockdown.log"</CommandLine>

</SynchronousCommand>

</FirstLogonCommands>

No matter what I do, these commands do not run. I've confimed the path to the registry file exists, as that's include in my $OEM$ directory. I can manually run the command after the system installs, and the registry value is changed. The powershell script is not running either, but that could be because the registry mod to set powershell security to remotesigned is not being set because command #1 is broke.

Ideas? I've done a ton of research, and everything I've seen shows this should work without flaw. I've spent the better part of an entire day trying various things without any success.

Edited by yngdiego


  • Author

I also tried a very simple command like "mkdir c:\test" in the OOBE system, and it does NOT get executed. However, it looks as though when the commands are in the specialize section, they DO get executed.

Edited by yngdiego

look at FirstLogonCommands in the Unattend.chm for more

If you create a user account that does not include administrative privileges, the commands may not be executed:

  • Author

I also tried a very simple command like "mkdir c:\test" in the OOBE system, and it does NOT get executed. However, it looks as though when the commands are in the specialize section, they DO get executed.

I found the issue. When in "audit" mode most of the OOBESystem directives are ignored, including any commands. The solution was to use step 6, AuditUser to add the commands, which are run in audit mode.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.