I'm building an unattended win7 install, and running into one final problem:
My current process will install a bunch of programs in the post-install phase, and then run some batch scripts and registry keys to clean up the start menu, desktop, and context menus.
Everything seems to work, except that after logging in for the first time and Preparing Your Desktop etc., some of the icons and context menu items return / are generated on first login.
I have written a batch file that corrects every single one of these undesired changes, but I cannot for the life of me figure out how to get it to auto-run after that preparation phase is done.
- having my script copy it into the start menu's Startup - this doesn't work as it doesn't have admin rights that way
- having my script copy a run-as-admin shortcut to the script into Startup - this doesn't work because, i think, startup won't do run-as-admin shortcuts?
- running all the instructions in the post-install phase - this doesn't work because some of the stuff i'm removing seems to be generated in the desktop preparation phase
I need to be able to have this script run automatically upon first login, after desktop-prep, and to build that functionality into my unattended ISO. It would be nice to not have to accept a UAC prompt, but I don't think that's possible - so a UAC prompt is acceptable.
To be clear, if I manually execute this script I've written, and accept the UAC prompt, it does everything i want perfectly. I just cannot seem to get it to auto-trigger at the right time.
Is there any way to do this entirely within the windows install media?