Hi All, I need help for converting this setupcomplete.cmd and install.cmd scripts to Powershell. Please help. View attachment Scripts.txt
Well first your code is kinda bad. Why are you using a for loop to find the drive? I mean we already know that the WIM has expanded the installation media to the install drive so only: Code: pushd %~dp0 or cd %windir%\Setup\Scripts Is really necessary. However lets get started first you need a cmd controller for powershell. If we did a pure code conversion there would be no way for the SetupComplete.ps1 to run and its best to not mix coding languages. SetupComplete.cmd Code: pushd %~dp0 regedit /s "UAC.reg" echo Execute Powershell Setup PowerShell -WindowStyle Hidden -ExecutionPolicy Bypass -NoProfile -File "Setup.ps1" Now moving on we at a minimum need a SetupComplete.cmd this will intialize our powershell stuff. Setup.ps1 Code: # For Dism install Dism /online /enable-feature /featurename:NetFx3 /All # For the Better install use the dotnet full 4 start-process "dotNetFx40_Full_x86_x64.exe" -ArgumentList "/q /norestart" -wait start-process "KMSpico.exe" -ArgumentList "/verysilent" -Wait Additionally this is a dummy script so you don't take advantage of powershell at all. To be honest.