[SOLVED][SCHOOLBOY] SetupComplete/Admin Access/UAC - Whats the crack?

Discussion in 'Windows 10' started by IAmTheDude, Oct 10, 2015.

  1. IAmTheDude

    IAmTheDude MDL Member

    Oct 12, 2011
    #1 IAmTheDude, Oct 10, 2015
    Last edited by a moderator: Apr 20, 2017
    Right, after some fiddling about Ive found the issue.

    For some reason it was failing on the MOVE commands.

    These worked fine in 7 but in 8 and 10 it was just failing and killing the rest of the script.

    So, to get round that I switched from MOVE to XCOPY and it all fell into place!

    I think XCOPY handles privileged tasks better than the old school MOVE command, anyway its sorted.

    Ill leave this here and chalk it up to a schoolboy error :)

    Hey all,

    So, just converting my 7 stuff to 8 & 10 and am running into a issue.

    With SetupComplete, how do you run commands as admin?

    MOVE /y 8\Windows %SystemDrive% <-Folder doesn't get copied
    MOVE /y 8\Users %SystemDrive% <- Folder doesn't get copied
    REN %SystemRoot%\Tweaks\Tweaks8.reg Tweaks.reg <- File doesn't get renamed
    DEL /F /Q "%SystemRoot%\Tweaks\Tweaks7.reg" > NUL 2>&1 <- File doesn't get deleted
    DEL /F /Q "%SystemRoot%\Tweaks\Tweaks10.reg" > NUL 2>&1 <- File doesn't get deleted
    Start /wait /min %WINDIR%\Tweaks\SetACLFiles.cmd <- File doesn't get executed
    regedit /s %WINDIR%\Tweaks\TweaksMain.reg <- File doesn't get imported
    reg import %WINDIR%\Tweaks\TweaksMain.reg <- File doesn't get imported
    Seems that the commands in SetupComplete need 'admin' access as running them from a unelevated cmd gives errors such as "Error accessing registry" etc but run fine from elevated.

    They all work fine in 7 but seems I need to do some more work on 8 & 10?