DMD Posted January 23, 2023 Share Posted January 23, 2023 (edited) Good morning. I am struggling with a strange RunOnceEx situation. I have been using this procedure for years from W7 up to W11 22H2 and it works regularly on both HOST PC and virtual machine, but these days an unexplainable thing happens to me. When I run this procedure on a newly built pc with Ryzen 9 7950X and still running W11 22H2, the RunOceEx does not run, when I try the same ISO with RunOnceEx on another PC or virtual machine it runs. I have been going crazy for a few days and can't figure out why and don't know what solution to look for. Any ideas? This is the "setupcomplete.cmd" script that I have always uitilized. ------------------------------------------------------------------------- @echo off for %%w IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%w:\sources\install.wim SET CDROM=%%w: REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /v Flags /t REG_DWORD /d "20" /f REG ADD %KEY% /V Title /D "Post Installation..." /f >NUl REG ADD %KEY%\06 /VE /D "Calculator Legacy" /f >NUL REG ADD %KEY%\06 /V 1 /D "%CDROM%\Software\Calculator_Legacy_2.0.exe" /f >NUL REG ADD %KEY%\07 /VE /D "7-Zip 22.01" /f >NUL REG ADD %KEY%\07 /V 1 /D "%CDROM%\Software\7z2201.msi /quiet /norestart" /f >NUL EXIT -------------------------------------------------------------------------------------------------- Sincerely thank you Edited January 23, 2023 by DMD Quote Link to comment Share on other sites More sharing options...
SunLion Posted February 20 Share Posted February 20 (edited) Hello @DMD, I also use a similar script and everything runs smoothly. Maybe you have install.ESD in your sources folder and not install.WIM. If so, the script will not find the wim file and nothing will be processed. This is just a hypothesis, it would be up to you to check it. In my script I use: for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\sources\install.* set CDROM=%%i: Good luck! Edited February 20 by SunLion Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.