# Administrator Mode

If you look at the PinballY program folder, you'll see a separate program called PinballY Admin Mode.exe. What is that? Do you need it? Should you be using it instead of the regular PinballY.exe? How is this different from running PinballY.exe with the "Run as Administrator" command? This section attempts to answer those questions.

## Dos and Don'ts

- DO use the regular PinballY.exe unless you have a well-defined need for Admin mode operation
- ONLY use PinballY Admin Mode.exe if you really need PinballY to launch some game programs or Run Before/After commands in Admin mode
- If you use PinballY Admin Mode.exe to launch, it will run PinballY.exe automatically, so DON'T launch both programs separately at the same time; use one or the other only
- DON'T use the Windows Explorer "Run as Administrator" menu command to launch PinballY.exe
- DON'T set the "Run as Administrator" checkbox in PinballY.exe's file properties
- DON'T disable UAC (User Account Control). That doesn't just remove the warning prompts. It also changes some low-level Windows functions that can affect application behavior.

## What is PinballY Admin Mode.exe?

PinballY Admin Mode.exe is a separate PinballY component that you can use if you require Admin mode to run any of the games that PinballY launches. If you require Admin mode, launch PinballY via the PinballY Admin Mode.exe program file instead of the normal PinballY.exe program.

It might sound from the name like PinballY Admin Mode.exe simply runs PinballY in Admin mode. Not quite. What PinballY Admin Mode.exe actually does is a bit more complex:

- PinballY Admin Mode.exe itself is a small program that runs in administrator mode
- That program launches PinballY.exe in regular user mode
- It also then remains in memory as a separate program, running in Admin mode

It's important to understand that PinballY Admin Mode.exe isn't just "PinballY running in Admin Mode". PinballY Admin Mode.exe is actually a separate, small program that only performs a few special functions that require Administrator mode privileges. When this is running, the regular PinballY.exe program - which contains the PinballY user interface and most of its other functions - runs in regular user mode. When the user-mode PinballY program needs to carry out some special operation that requires Administrator privileges, such as launching a game in Admin mode, it sends a request to the Admin Mode program via the communications channel telling the Admin Mode program to carry out the special operation.

This separation of the program's functions into "regular" and "Admin" portions is designed to allow PinballY to access privileged Admin functions when necessary, without forcing you to run the entire PinballY program in Admin mode. And by the same token, it allows PinballY to launch most of your games and Run Before/After commands in regular user mode. Admin mode exposes your system to more potential harm from program bugs, so it's best to use Admin mode as sparingly as possible.

## Should I use the Admin mode version?

Not unless it's truly necessary. It's only necessary if one of the games you want to launch with PinballY needs to run in Admin mode, or one of the Run Before/After commands needs to run in Admin mode.

Ideally, this should never happen. Ideally you shouldn't even have to read this section. If you come across something that seems to require Admin mode, or that someone else told you requires Admin mode, that might be due to a misunderstanding or a configuration problem, not an actual need for Admin mode. Try to find a better option before resorting to Admin mode.

## It's necessary; how do I use it?

Easy: just run PinballY Admin Mode.exe instead of the normal PinballY.exe.

When you run PinballY Admin Mode.exe, it automatically launches the regular PinballY.exe for you. You don't have to launch the regular PinballY.exe separately.

Don't right-click PinballY.exe and select Run as Adminstrator from the menu.

Don't check-mark the "Run as Administrator" option in the PinballY.exe file properties dialog. That will prevent PinballY Admin Mode.exe from being able to launch the regular PinballY.exe in normal user mode, which defeats the purpose of the "separation of powers" designed into this.

## How is this different from just running PinballY.exe in Admin mode?

See the diagram above. When you use PinballY Admin Mode.exe, only a small portion of the program - just the functions that absolutely require Admin mode privileges - actually run in Admin mode. The whole rest of the program runs in ordinary user mode, with all of the standard Windows protections against accidental system damage from program bugs. All of the game programs that PinballY launches also run in ordinary user mode, also with protection against system damage from program bugs.

In contrast, when you use the "Run as Administrator" command in Windows Explorer to run PinballY.exe, you force the entire program and every program it launches to run in Admin mode. The entire PinballY Direct3D UI will run in Admin mode. Every Visual Pinball game it launches will run in Admin Mode. Every Future Pinball game, Pinball Arcade Game, FX2/FX3 game, etc will run in Admin mode. The risk of system instability or operating system corruption is increased.

## Can't I just right-click and select Run as Administrator?

No! Please re-read the section above for why this doesn't work.

## What is Admin mode anyway?

Admin mode is a special Windows security mode that gives a program full, unrestricted access to nearly all Windows system resources, such as operating system files, OS registry keys, and protected memory areas. Windows blocks ordinary "user mode" programs from accessing these resources, to protect the system against harm by malware and by accidental program bugs.

Microsoft designed Admin mode for use by trusted system programs only, such as Windows control panels, special system setup programs, installers, and the like. In Microsoft's view, nearly all programs should run in ordinary user mode. Admin mode is intended to be a rare exception that you use only when you're doing something special that has a legitimate need to mess with system settings. However, Microsoft left it up to the user to decide which programs get the special privileges. If you really want to run some Elbonian ransomware in Admin mode, Windows will let you.

## Why you should avoid Admin mode when possible

Admin mode is dangerous because a program running in Admin mode has unrestricted access to all system resources. It can make changes to system files, including core operating system files and registry entries. In the worst case, such changes can damage the system and force you to reinstall Windows.

## I don't have to worry, I never download malware!

Most people think of the Windows security restrictions as being all about malware, so they think they don't have to worry about "regular" software. Malware is certainly an important factor. But Microsoft created the system protections as much to prevent accidental damage as to prevent malware attacks. Back in the early days of Windows, the OS had a bad reputation for crashing a lot. Some of that reputation was deserved, but a lot of the mess actually came from buggy third-party application software that could trash the system accidentally, just because the system was so wide-open. Microsoft put the Admin mode barriers in place in large part to prevent application program bugs from crashing the whole system. A lot of the stability improvements of modern Windows versions come from the protections that prevent the Windows core from being damaged by application bugs.

When you run a program in Admin mode, you take down all of those barriers. When you turn off UAC and/or run everything in Admin mode, you increase the chances that one bad application program can trash your whole system.