apostolakisl Posted November 21, 2019 Author Posted November 21, 2019 1 hour ago, io_guy said: Yeah, but does running the bat file as admin make things that the bat file runs also run as admin.
io_guy Posted November 21, 2019 Posted November 21, 2019 Of course it will. And if you want to save doing that every time (or add it to a startup folder), just create a shortcut to the cmd file and enable this:
apostolakisl Posted November 21, 2019 Author Posted November 21, 2019 3 hours ago, io_guy said: Of course it will. And if you want to save doing that every time (or add it to a startup folder), just create a shortcut to the cmd file and enable this: Unless you have some trick for getting rid of the UAC, that won't work as an automated startup option. Someone has to click through the UAC window. The way I get around that is by running it from a scheduled task and creating a shortcut to the scheduled task. The shortcut itself runs with regular privileges, but the scheduled task can be configured to run other programs with admin rights. When task scheduler runs a program as admin (or highest privileges as it is called there), there is no UAC produced.
io_guy Posted November 22, 2019 Posted November 22, 2019 I always disable UAC, it's useless. But yes, if you want UAC just use task scheduler, that's what MS wants. No sure why this is a problem.
apostolakisl Posted November 22, 2019 Author Posted November 22, 2019 38 minutes ago, io_guy said: I always disable UAC, it's useless. But yes, if you want UAC just use task scheduler, that's what MS wants. No sure why this is a problem. I didn't know you could disable UAC. But anyway, uac is a problem because it requires a person to be sitting there to click through it. So putting a program in your start folder that requires a uac click through won't work on a computer startup that happens with no one there. A computer that runs in a closet for the sole purpose of running blue iris and nodelink, most reboots are not initiated by me. Either it is an extended power failure or it is MS update.
simplextech Posted November 22, 2019 Posted November 22, 2019 Just throwing in my 2 cents. Windows 10 doesn't play nicely with the startup folder method any longer and UAC is a PITA. I disable UAC on my "servers" running Windows 10 and setup local accounts with auto login since they are headless anyways. For things that are proper windows services like Blue Iris I set them up that way. For other things that are not windows services I use startup delayer https://www.r2.com.au/page/products/show/startup-delayer/ It's a nice little tool to startup anything after boot and provide order of startup as well as other nice features.
Scyto Posted November 22, 2019 Posted November 22, 2019 Never disable UAC, it also turns off process virtualization. This means anything you installed that uses process virtualization when UAC was enabled may break as it won’t be able to find virtualized file system that was written to when running / installed.. Reverse is also true, if you install with UAC off and then later enable UAC, any app that uses process virtualization will start looking in the virtualized filesystem and not the location files were written to at install (for example system32). really trust me on this, bottom line if you installed tons of stuff with UAC enabled leave it enabled, if you installed tons of stuff with UAC disabled leave it disabled (and don’t bitch when the app compat layers don’t fix your apps). Why they hid 3 different unrelated options behind one UI slider will be something I will never understand, and I knew the PM who made that decision, he was a fuckwit. (yes UAC slider is even more broken than you ever knew, this virtualization issue (not talking hyper-v) is root of many mysterious issues, you can change between the 3 too slider states with no ill effects).
simplextech Posted November 22, 2019 Posted November 22, 2019 6 minutes ago, Scyto said: Never disable UAC As much as I agree to that statement for a "desktop" I do not agree for a Windows 10 headless system aka "pretend server" box that will not have "users" touching it. Your points on what UAC touches and such are probably valid (I don't know so until I do I won't pretend I do). These unknowns are another reason why I TRY very hard not to run any "server" on Windows. I recently got rid of my Blue Iris server (again) hopefully this time for good so now I'm fully Linux/FreeBSD except for my desktop which hopefully will be Linux very soon as well (again).
Scyto Posted November 22, 2019 Posted November 22, 2019 As a product manager who worked on windows server for a while I agree. Only windows server I have is a VM to run AD, AAD sync, DNS and DHCP (all integrated) everything else is docker and Synology (which is my VM host). I still don’t disable UAC, I have seen the horror stories it can result in, there is no need to turn it off esp on a headless server as you should be doing everything via powers shell, mmc remoting or that new admin web thingy (why did they make that so kludgy!?) and would never see a a UAC prompt anyway. i think you missed my point too, it isn’t turning UAC prompts off that is the issue, it is that that UI control affects two other systems - the app compat shim layers and the file system and registry virtualization. Turning these off is a nightmare ( for example a bad app that wants to write to system32 will get denied rather that the file system virtualization handling it). There are still crappy coded new apps coming out every day. also take a look at size difference of the node link docker container I published, the windows one is huge in comparison, and I used a very small windows container image..../s
io_guy Posted November 22, 2019 Posted November 22, 2019 I've disabled UAC on every Windows system that has it, at work/home and desktop/server, literally a couple hundred systems. Never a single issue.
apostolakisl Posted November 22, 2019 Author Posted November 22, 2019 Well for my part, for the occasional program that requires admin, the trick of using a scheduled task is a one-time thing I just do that takes maybe 90 seconds. I like to do it even if the program is one I manually run. Reason is that half the time I forget to run as admin and then end up having to restart it, or I get all worked up wondering why the hell the program isn't working right and then remember, oh yeah, needed to run as admin. Most commonly I forget when using auto hotkey. If I am asking auto hotkey to do something to a program that runs as admin, then AHK also has to be running as admin. I will put a scheduled task short-cut on my desktop or wherever and assign the icon that goes with the program to the shortcut. It always works, including when I put the shortcut in the startup folder.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.