October 6, 201510 yr Hi,i built up a nice answer file and added some AsynchronousCommands. One of these commands does something like:cmd /K echo "test"When setup has finished and desktop has loaded a cmd window opens... so far so good. But i noticed, that this fucking command runs on every log on, although the documentation says:AsynchronousCommand specifies a single command to run the first time that a user logs onto the computer.I checked the registry and find my defined AsynchronousCommands inHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Runbut as far as i know, this is a key where one add to run commands on every log on, like Nvidia drivers or makinboards drivers, you know what i mean? Something is really confusing me... I only want to run a command once on logon. Can someone help? Thanks in advance!
October 9, 201510 yr HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run This is used to run on every logon just like startup item[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]but this is used for run only once on next logon but not every time i never given any command in my answer file i just make a self deletable .cmd file and i use the path of it to run Edited October 9, 201510 yr by kmaheshkumar
November 6, 201510 yr Got exactly the same problem - AsynchronousCommand runs on every login, instead of just once. Here is the offending article on M$ site:https://technet.microsoft.com/en-us/library/ff715901.aspx
November 9, 201510 yr I have replicated this using Windows 10 Pro x64 using this XML: <?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="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>en-us</UILanguage> </SetupUILanguage> <InputLocale>en-us</InputLocale> <UILanguage>en-us</UILanguage> <SystemLocale>en-us</SystemLocale> <UILanguageFallback>en-us</UILanguageFallback> <UserLocale>en-us</UserLocale> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <InputLocale>0409:00000409</InputLocale> <SystemLocale>en-us</SystemLocale> <UILanguage>en-us</UILanguage> <UserLocale>en-us</UserLocale> </component> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><LogonCommands> <AsynchronousCommand wcm:action="add"> <CommandLine>cmd /K echo "test"</CommandLine> <Description>Description_of_command1</Description> <Order>1</Order> </AsynchronousCommand></LogonCommands> </component> </settings> <cpi:offlineImage cpi:source="catalog:d:/sources/install_windows vista business.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /></unattend>Happens using /generalize or not. Writes the contents of CommandLine object to the Run key.Documentation notes that SynchronousCommand (FirstLogonCommands) now will act like AsynchronousCommnand.https://msdn.microsoft.com/en-us/library/windows/hardware/dn917933(v=vs.85).aspxHowever I tested that and FirstLogonCommand does not write anything into the Run key, and as such does not run on each logon.
Create an account or sign in to comment