Monthly Archives: February 2023

Running Visual Studio as Admin Without the UAC prompts

13
Filed under .NET, Visual Studio

For several projects I work on, I need to load Visual Studio (2022 Enterprise edition) in “admin” mode.

That’s easy enough to do, but I always have to click through the UAC prompts, which is tiresome.

Turns out there’s a (relatively) easy way around this.

I stumbled across this article by Lowell Heddings on how to “Create Administrator Mode Shortcuts without UAC prompts” accidentally which clued me in that this was even possible. I highly recommend checking it out.

I’ve embellished the technique slightly because I found that VS would end up coming up behind all the other open windows, which is even worse than the UAC prompts.

I’ll summarize the process below:

  1. Use Task Scheduler to create a new task
  2. Give the task a short name (I called mine “Visual Studio 2022”, set it to Run only when user is logged in
  3. Use YOUR user
  4. Check Run With Highest Privileges
  5. Configure for Win 10/11 whatever works for you
  6. On the Actions tab
  7. Create new Start a program action
  8. Specify full path name to devenv (Visual Studio), no args; “C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe”
  9. Get nircmd from here http://nircmd.nirsoft.net/win.html (put it on your PATH)
  10. Add another Start a program action
  11. Set this action to “nircmd win focus process devenv.exe”
  12. On the Settings tab, make sure that the combobox near the bottom says “Run a new Instance in parallel” and not “Do not start a new instance”. That way, you can still launch multiple instances of Visual Studio if you need to.
  13. Save the Scheduled Task
  14. Create a new shortcut on the desktop
  15. For the shortcut path use “C:\Windows\System32\schtasks.exe /run /tn “{your task name from step 2 above}”

And that’s it.

If everything’s kosher, dblclicking on that shortcut will launch VS in Admin mode, in the foreground, with no UAC prompting.

Laying Asphalt

14
Filed under Uncategorized

Asphalt Paving I was contemplating having to pave a machine recently, and it occurred to me that it might be a good time to take stock of the “asphalt”, so to speak.

In other words, what are those apps and configurations that get laid down first? Those that I use everyday. That it’d be seriously difficult to do without, even from day one?

I’ve followed Scott Hanselman’s List of Tools for years. It’s a great list, and a fantastic place to get ideas for things that might dovetail into your personal workflow, so if you haven’t already checked it out, I heartily recommend it.

But it’s huge! I mean, really big. It’s a great reference, but I can’t imagine anyone using near that much on a daily basis.

So, what’s my asphalt then? Lets get right to it!

  • File manager – DirOpus. If you deal with files all day long, DirOpus is the first thing you should consider laying down. Fast and infinitely customizable, but it still feels like a Windows File Explorer.
  • Font – Hackd. My own version of LigaHack, which is itself a ligaturized version of Hack.
  • Editor – Visual Studio Code. I’ve used tons of different editors over the years, so VSCode is just the latest. It’s fast, flexible, extensible and customizable.
  • Password – Keepass. Hands down. After seeing news stories of all the commercial “credential managers” out there, I’m convinced high value targets like that are the last place you want to put your keys. Just make sure you back up.
  • Launcher – Flowlauncher. PowerToys Run is right up there, but FlowLauncher is xcopy installable, and super easy to write extensions for, as well as having just about any extension you’d ever want already available.
  • Backup – SyncBackPro + BackBlaze. Both are very reasonably priced. BackBlaze for offsite backup. SyncBack for synchronizing laptops, desktops, phones, etc.
  • Compare – Araxis Merge. I’m doing file or folder compares virtually every hour. I’ve tried others, both free and commercial but Araxis just feels the smoothest, and most polished. It’s not cheap, but I think it’s worth it.
  • Clipboard –ClipCache. Ok. There’s loads of free clipboard managers out there, and not just a few paid ones. But ClipCache does it all, it’s not very $$, and it just works.
  • Terminal – Windows Terminal + Cmder. I’ve never been able to get on the Powershell wagon, so there’s that. But Cmdr in Windows Terminal, with PowerLine glyphs and quake mode is awesome.
  • Macros – AutoHotKey. I’ve got my own set of favorite hotkeys that I’ll be writing about soon.
  • Processes – Process Hacker 2. Way, way better that TaskMan
  • Search – FileLocator Pro. Absolutely worth the (small amount of) money, esp with the new Index functions.
  • Screenshots – ShareX. Free and fantastic for screenshots, recordings and annotating.

And just to be straight. All of the links above are direct links to the apps I mention. I’m not an “affiliate”. I don’t get any money for “clicks” to these links. I have no relationship to any of these companies except as a customer.

So that’s it. These apps (and font Smile ) are running virtually 24/7 on my machines.

I’d love to hear you consider your “asphalt”!