SetupComplete.cmd Not Running After Installation

  • Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Malware Removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  • Hello everyone We want to personally apologize to everyone for the downtime that we've experienced. We are working to get everything back up as quickly as possible. Due to the issues we've had, your password will need to be reset. Please click the button that says "Forgot Your Password" and change it. We are working to have things back to normal. Emails are fixed and should now send properly. Thank you all for your patience. Thanks, PCHF Management
Status
Not open for further replies.

AMQB

PCHF Member
Jan 25, 2020
13
1
Dar es Salaam
Hi,

I've got a SetupComplete.cmd file in my sources \$OEM$\$$\Setup\Scripts folder which from my understanding runs once after installation is completed. I'm trying to do an unattended install and have my autounattend.xml file configured and working as required though I'm struggling with having the setupcomplete.cmd run as I don't see the required results.

For testing purposes, this is what I've got in my setupcomplete.cmd:
Code:
wmic cpu get Name > C:\cpu.txt
wmic bios get serialnumber  > C:\SerialNumber.txt
devmgmt.msc /s

Neither do I see those 2 files created, nor does the device manager open up.

I'm using an OEM image, and found an article (https://docs.microsoft.com/en-us/wi.../desktop/add-a-custom-script-to-windows-setup) which mentions:
This setting is disabled when using OEM product keys.

Is that why I'm not seeing results from the setupcomplete.cmd file? How can I workaround this? Is it something I can achieve via RunSynchronousCommand? I also want to make some more modifications such as adding desktop icons to the desktop and disable sleep on power being connected (even though drivers are not installed).
 
Status
Not open for further replies.