I’m a junior web developer at my company. They give me a nice laptop with a dock that includes 2 additional monitors (neither of which go up to 1920X1080 resolution…). When I log into my pc, I have a profile set up for me on that pc. That profile is under the Administrator group.
You wanna know what’s funny about that? It’s a big damn lie.
I may be an “administrator” but I am not the Administrator of that PC. I’m only listed under my company groups as Administrator. The actual administrator on my pc? A profile with the username of “Administrator”. When googling, that’s known as the super admin, or super user of the PC.
Understand: The Administrator level is not the Super Administrator level.
So, many times on my pc, I have trouble installing things, or running programs, unless I right-click the application and choose “run as administrator”. Any time I try to install something inside program files, I have to run the installer as administrator. If I’m running a java-based installer, I’m screwed, because you can’t run a .jar as administrator… You have to find where your java installation is and make sure all executables within run as administrator…
This is a major pain in the ass, unfortunately.
Now, some of you say “oh, well, disable UAC then.” I did. I disabled it as both the super admin and as myself… no dice.
Having said all of this, there IS a way to solve this problem: changing ownership. Everything on this pc is owned by the Administrator profile rather than me, so that’s why everything’s such a pain in the ass to use.
What you do is change all the files and folders to be owned by you instead of whomever the company has deemed the owner. Look, I’m sure there’s a policy violation here or something, but when policy impedes progress of work, then their system fails.
Yes what I’m about to tell you is ethically wrong no matter how the hell I rationalize it, shut up. :)
Make a .bat file with this code in it:
1 | cd c:\ |
Now run the bat file, and wait a long time. What this .bat file is doing is changing the ownership of everything in program files and program files (x86) to you (the person logged in) instead of the Administrator. Why those 2 directories? Because damn near everything in windows is installed there, and when applications run, they create, delete, and modify files within. Everything happens under those 2 directories, and if you’ve got some asinine permissions setup, it will get in the way of successfully running the application. Running as Administrator overrides that check, but how many applications do you have on your computer? Do you really want to painstakingly go through each and every one and change them to run as administrator? I sure as hell don’t; I’ve got better things to do like writing blogs instead of working :P
Well, glad that’s over. I now have documented code that will fix your permissions issues. That’s what will fix it all. I’m glad we know this now, because most companies will fire you for actually doing it. Correction: they’ll fire you if they find out you did it. Or maybe they won’t because they really don’t care. I don’t know…
Still, I didn’t come to your computer, create the batch file, and run it, so I’m not at fault if you get caught doing this. You’re taking the risk here, bro.