i have created $oem$\$1\unattended folder in ...\sources folder. it copy the unattended folder in c:\ i need to run automatically a file c:\unattended\install.cmd at the first time windows goes to desktop i've tried some solutions but i'm not so good someone helps me ?
The standard structure for using $OEM$ folder is: Code: $OEM$\$$\Setup\Scripts Put the $OEM$ folder inside the "ISO:\Sources" folder and the script should be called setupcomplete.cmd, for automated running of the script. Now all content of the "$OEM$\$$\Setup\Scripts" folder will be copied to "c:\windows\setup\scripts" and the setupcomplete.cmd will run automated with the highest system rights. Like the $OEM$ folder from KMS_VL_ALL v28, i believe i showed you before.
Quite easy . To process files during setup, it needs the Scripts folder as mentioned by @Enthousiast above. Create a file named setupcomplete.cmd and place in that folder. Content of setupcomplete.cmd: Code: @echo off pushd "%~dp0" cd %~dp0 Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx" /v Title /t REG_SZ /d BootTask /f Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx" /v Flags /t REG_DWORD /d 2 /f Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001" /v MyScript /t REG_SZ /d "%windir%\Setup\Scripts\install.cmd" /f exit Place your install.cmd script beside setupcomplete.cmd. The RunOnceEx task will run one time at first user boot after setup.