Debugging is fun {not} -- i have had my fair share of time wasted finding those little bugs that can be so subtle you end up pulling hair out trying to find them. The worst type are those intermittent errors that occur under certain scenarios nailing those is a job i detest the most as you have to get the timing just right to make it happen!
I don't see any windows at all, Windows 7 will wait at the "Preparing Desktop" login screen until everything is complete. So, I cannot see any errors, either. Looks like the ISOs created earlier were all duds. And my UltraISO license finally pays off.
I have had UltraIso since 2006 best money i spent of software, i did have magicIso too but that had some weird bugs , i did report them and they got fixed but it just couldnt get along with it, so i not use that now.
I think at that stage SETUP/OOBE prevents any echo/display to screen until the desktop appears... not sure how to get around that unless using msgbox type things as i know they show up as i used to have a msgbox pop up telling me if w7 was activated or not and some details and a OK button.
I know s1ave77 used to have a interactive script that run in OOBE no idea if it still on MDL, i not used it myself so never took a copy not sure if it was w10 only...
Results: No log files from WinTel at all, that means it didn't even run, although the log still tells me it has been processed. At a loss.
does wintel run ok with no errors if you call it manually after install ? hopefully it may shine light on any errors
I'll check, currently, retrying with Enterprise (in case the OEM:SLP activation prevents it to run). Edit: Enterprise is the same, it's not due to OEM. Running WinTel manually as Admin shows and processes the interactive element fine, runs fine and all routes are available. Possible conclusion: MRP runs in parallel to the last part of Setup (entering account etc.). This part also includes Network Setup (selecting Network profile and finalizing). In other words - WinTel might run when the Network Setup isn't complete, and route commands barf. If it even runs at all, MRP says yes, but, no log files with the Debug version are ever created. Must find a way to have it run only after login, maybe with a RunOnce entry (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce) or a Task.
Yeah m$ call it synchronous - i think - so it all seems to run at same time, not much i can do about it sorry I think setupcomplete is called first then any run once run items which is the MRP's Addon-manager part that then calls usertweaks and other scripts... If i had MRP call the usertweaks etc before that stage ie during early oobe before username etc setup then any HKCU registry stuff will not be run as that registry hive is not setup until after the section where the username is created.
Well, I'll try placing the WinTel.cmd into the Startup directory of the Default account. It's a crazy idea, but might work. And the file destroys itself, so, it'll only run once per new account. Edit: Basic principle works, but won't run elevated. Crap.
probably only task method left but i could never get the scheduler to work how i wanted -- always asked for username/password even when no password was set and it just never worked - i guess it some security thing to prevent malware from being run, yet that stuff manages to find a way around it!
or create a OSUpdates.cmd file that sets up a runonce to a renamed usertweaks and/or wintel file(s) so that MRP runs the OSUpdates file to set those runonce commands up and then it should run them on the next reboot with higher rights..... I have the clean up file set that way so when MRP completes it runs that cleanup file on the reboot to tidy things up and set a few options that require a double run...
OSUpdates.cmd is a file i use (and Enth) to run other stuff such as updates and tools etc. MRP also looks for that file and calls it the same as usertweaks but it was originally for those individual updates, i left it in as it can come in handy when just adding a few bits and pieces later.. I use it for installing Winrar, 7Zip and at one time openshell
Something like below added to OSUpdates.cmd : Code: REG add "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v "!SpecialFiles" /t REG_SZ /d "<PathToScripts>\renamed-Usertweaks-etc.cmd" /f >NUL 2>&1 I use the ! (called Pling?) to make sure that if the script isn't run it gets retried on the next reboot as some things needs a 2nd reboot not sure why but that usually sorts it...
I need to continue tomorrow, need a rest (and my HDD, too). Will look into that method. Still a mystery why that file isn't run by MRP but the MRP log says it has run...
It is very strange! MRP says it run as all that it can detect is a return from the 'call' of the script. I did try the START /W /B command but i found it not reliable enough and would run through the script then messed up MRP's logs The runonce way should run your tweaks etc but you will need to reboot the pc once the desktop appears and all loaded up after setup has completed, it should then run your stuff as soon as the pc has logged back in. Important: Just make sure your runonce called scripts are not in the Scripts folder as MRP will auto delete that folder unless you set the option not to, so put your scripts in another location and set the runonce path to the new location. Thanks for letting me know as i can keep an eye on it for Win7 users..
Just rechecked MRP's code that runs the usertweaks/wintel scripts, it does use 'start' command I now remember why, because if you use 'CALL' and there is a fatal error in the called script, which then aborts that script, then control is not returned to the originator script and so aborts everything. Using the 'Start' command, with the '/Wait /B' parameters, it gives back control to the originator script, even if an error occurs, because it is using a separate cmd process.. Code: Start "UserTweaks Module" /Wait /b cmd /c "%SLoc%\UserTweaks.cmd" The SLoc variable is set to the "<SystemDriveLetter:>\Windows\Setup\Scripts" folder location. Same type code is used for running the 'Wintel' script. I thought it maybe that the Start(ed) process was not running as Admin/System rights, but it technically should be as it works ok for 8.x and above, it shouldn't be any different for Win 7 the reason being that the originator script (MRP's addon manager one) is run with those admin/system rights... I guess you could add into your usertweaks/wintel at the top of the code the check for admin rights and then ask for them? That way hopefully on win7 it should work as the UAC prompt should show during OOBE's silent part too because the msgbox is a system generated one... It should wait until the user has clicked an answer button.