SetupComplete and Elevated permissions

PhsMu

Active Member
So I'm using SetupComplete for some automated installs, but nowadays the script only runs if forced (via autounattend.xml) for some odd reason or another.

Therein lies a problem: Forced SetupComplete runs as Admin, and not Elevate-As-Needed, meaning some odd programs do not work correctly (BionusImgBrdGrabber doesn't show at all, Notepad++ misses some features like styles and themes, and Spotify installs but for the Admin account and user doesn't sees it.)

Is there a way to have two scripts, one that run as admin and one that runs as user?
 
setupcomplete.cmd runs automatically with full permissions on my iso's.

from setupcomplete.cmd i can call unlimited scripts. with call command.... just end the script with exit /b to return setupcomplete.cmd after called script finishes
 
Yes, and as mentioned that is part of the problem. Some programs do NOT install correctly when launched with admin permissions.
 
Is ou know ()there a way to have two scripts, one that run as admin and one that runs as user?

If you know (or find out) how to run a command with another user account, you can create an user account in setupcomplete (the new account is added to the Users group) and run the setup with the (non admin )user account. After setup is done, you can delete the user account.
 
:/ Tried that.

Spotify and Grabber are installed for that user account and deleted along. Notepad++ appdata folder with the resources goes as well, and simply copying it back gives me error messages.

Trying to work on getting Setupcomplete back on track. I suspect there is some tweak that interferes with it.
 
Trying that.

Notepad++ gives me problems because Replacer (which runs afterwards) needs the admin permissions. *sigh*

...onwards to more testing
 
I know how to add things to runonce, yes. What I didn't had was time to test with a functional run yet, my previous attempt had a bad update (something onedrive related) so it didn't run setupcomplete correctly apparently. Trying again without that update later today.

Also Spotify I managed to install silently via Runonce. ; )

Thanks for the help!
 
Back
Top