Tutorial FP Exclude Future Pinball from Real Time Protection on Microsoft Defender Antivirus

Future Pinball

GeorgeH

Flippered Out
Site Supporters
Joined
May 3, 2016
Messages
2,670
Solutions
6
Reaction score
2,126
Points
145
Favorite Pinball Machine
Attack From Mars
In my FP installation guide, I identify that any FP script that uses "evaluate" and "eval" coding can cause a low frame rate or stuttering. The reason is that the real-time protection on Microsoft Defender Antivirus considers both "evaluate" and "eval" coding to be a potential security threat (which it would be if you weren't using a trusted source). So, whenever Defender sees either code run, the real-time protection performs a scan that requires huge resources and can cause stuttering when the ball is in play during a game even on a high-end PC. The standard user interface for Defender does not have a way to remove anything from scans for real-time protection. The only option that is there is to remove items from the periodic scans that you perform on your hard drive which doesn't help. I recall that TerryRed has said in the past that he does not have an antivirus on his pinball cabinet PC. That works if your PC is not connected to the internet. It doesn't work for me because I only have one desktop PC that is connected to the internet and so I need an antivirus. Long story short, I have found a way to exclude Future Pinball from real-time protection.

This is an example of what I am talking about from the table "Ace High":

Execute "PinMechSound_Roll" &Where &"_Hit"
ScoreAdd 1, 100000: If Eval("LOL" &CStr(Lane)).State = BulbOff Then Exit Sub
Eval("LOL" &CStr(Lane)).State = BulbOff: Eval("Bumper" &CStr(Lane)).State = BulbOn

Whenever Defender sees one of those commands run, it uses all resources to scan it. Obviously, it will not find a virus but it uses a lot of resources to scan it and can cause stuttering and possibly even a crash. If you follow my guide, you won't have any problem playing this and other tables that use these commands.

Be aware, you may not have any problem at all with some tables that use a few of these commands. It depends on how many resources you have available and whether the commands are used when a ball is in play. I do recall that everyone used to complain about the "Jurassic Park" table that I discussed in my second post on this thread (see below). It didn't make any difference how good a PC you had; everyone had the problem. It is why I changed the code to remove "execute" and "eval" commands in the version of "Jurassic Park" that I published.

Windows 10 and probably 11 (not sure about other versions) have something called "Group Policy Edit". It looks a little bit like the registry editor but the user interface is much more user-friendly. To exclude Future Pinball from real-time protection scans, perform the following:

1) Enter the following on the search tool on Windows Search (the magnifying glass option on your tool bar):

gpedit

2) On the right pane, you will see an option called "Edit Group Policy". Click on it. You will see the "Local Group Policy Editor" window open.

3) Double-click on "Computer Configuration" in the right pane.

4) Double-click on "Administrative Templates" in the right pane.

5) Double-click on "Windows Components" in the right pane.

6) Double-click on "Microsoft Defender Antivirus" in the right pane.

7) Double-click on "Exclusions" in the right pane.

8) Double-click on "Process Exclusions" in the right pane. You will have a window open named "Process Exclusions".

1670703380651.png

9) Set the option on the "Process Exclusions" window to "Enabled".

10) Under the "Options" section, click on the button "Show....". A window will open called "Show Contents".

1670703681715.png

11) Enter the path for Future Pinball on its own line under the "Value name" column as shown above. Enter zero (0) in the "Value" column as shown.

12) Click on "OK" on the "Show Contents" window.

13) Click on "OK" on the "Process Exclusions" window.

14) Close the "Local Group Policy Editor" window.

15) You may need to reboot your PC for the changes to take effect.

If you want to remove the exclusion you just entered, you can't delete it on the "Show Contents" window. You have to go back to the "Process Exclusions" window (screenshot above) and set the option to "Not Configured". Then click on OK to delete the exclusion you entered.

I made some screenshots of Steve Paradis's "AstroHits" table that has many occurrences of "evaluate" and "eval" coding in the script. The screenshots were made when the "Display Fame Rate and Statistics (F9)" option was open. Before I changed the coding on the table "Jurassic Park", the earthquake sequence had so much stuttering that the game was unplayable.

The screenshot below was made when this procedure had not been performed. Note that there are several large peaks with numerous smaller ones.
`Astrohits, Tribute to the 80's RC22.png

This screenshot was made after this procedure was performed. Note that that there are no peaks. There is a large peak when you start the game but that is normal.

`Astrohits, Tribute to the 80's RC2.png

This tutorial was developed from the article "Configure exclusions for files opened by processes" on Microsoft's website.
 
Last edited:
I decided to try Slamt1lt's Jurassic Park ULTIMATE 1.02 table which is a version before the version I released that changed the code for the "ShakeIt" sequence to remove "execute" and "eval" commands from the script. The stuttering is so bad during the sequence that you can't play the game.

The screenshot below is the F9 screen during the "ShakeIt" sequence before I added the process exclusion for Future Pinball. As you can see, the peaks for the purple lines are large indicating the cause is the script. The peaks for the green lines are very small indicating the cause is not physics.

```Jurassic Park LW ULTIMATE 1.02.png

The screenshot below is during the "ShakeIt" sequence after I added the process exclusion for Future Pinball. As you can see, there are no more peaks and the response is quite flat:

```Jurassic Park LW ULTIMATE 1.022.png
 
Last edited:
Excellent, thank you.

I haven't played much virtual PB for awhile now, but as a WinDef user, I'm curious as to whether some tables with low FPS came down to this issue.

For example, speaking of Steve Paradis, he made one that was sort of a videogame hybrid, with 3-4 different cannons that would blast the ball around the table. It used to run quite choppily, even with all the speed hacks I found.

But what if much of that was due to WinDef borking the table FPS up?
Things that make you go hmm...
 
Excellent, thank you.

I haven't played much virtual PB for awhile now, but as a WinDef user, I'm curious as to whether some tables with low FPS came down to this issue.

For example, speaking of Steve Paradis, he made one that was sort of a videogame hybrid, with 3-4 different cannons that would blast the ball around the table. It used to run quite choppily, even with all the speed hacks I found.

But what if much of that was due to WinDef borking the table FPS up?
Things that make you go hmm...

It is easy to check. You just open the FP editor and open the script. You do 2 searches, one for "execute" and the other for "eval" using the edit>find function. If you get any hits then you know it is suspect.

Steve Paradis (who used the handle "polygame") liked to use these functions on his tables. Most of them use it.
 
You can also do path exclusions and it will exclude the entire path instead of having to input each exe
 
You can also do path exclusions and it will exclude the entire path instead of having to input each exe

I don't think you understand. You don't search the script for an exe. In fact, I have updated many tables and have never seen a path to an *.exe in the script. I suppose it could be used in some way but I have never seen it. You need to search in the script for the exact commands, "execute" and "eval". This is an example of what I am talking about from the table "Ace High":

Execute "PinMechSound_Roll" &Where &"_Hit"
ScoreAdd 1, 100000: If Eval("LOL" &CStr(Lane)).State = BulbOff Then Exit Sub
Eval("LOL" &CStr(Lane)).State = BulbOff: Eval("Bumper" &CStr(Lane)).State = BulbOn

Whenever Defender sees one of those commands run, it uses all resources to scan it. Obviously, it will not find a virus but it uses a lot of resources to scan it and can cause stuttering and possibly even a crash. If you follow my guide, you won't have any problem playing this and other tables that use these commands.

Be aware, you may not have any problem at all with some tables that use a few of these commands. It depends on how many resources you have available and whether the commands are used when a ball is in play. I do recall that everyone used to complain about the "Jurassic Park" table that I discussed in my second post on this thread. It didn't make any difference how good a PC you had; everyone had the problem. It is why I changed the code to remove "execute" and "eval" commands in the version of "Jurassic Park" that I published.
 
Last edited:
Ok then I misunderstood that I thought you could tell defender to exclude everything in a path including all exes and any processes they kick off I will add future pinball.exe to the exclude. But excluding the directory did fix my dof not working with pinevents for FP.
 
Ok then I misunderstood that I thought you could tell defender to exclude everything in a path including all exes and any processes they kick off I will add future pinball.exe to the exclude. But excluding the directory did fix my dof not working with pinevents for FP.

I guess I misunderstood what you were saying. I have never tried setting up an exclusion for the folder "C:\Games\Future Pinball\". There is not really any reason to do it that way although it might work. Setting up the exclusion to enter the path for "C:\Games\Future Pinball\Future Pinball.exe" like I discuss in step 11 works fine. It works because any table that you play must use "Future Pinball.exe" and it is what runs the "execute" and "eval" commands.

If you are concerned about BAM's "FPLoader.exe" causing the same problem, BAM has no "execute" or "eval" commands to use in the script so it is not a problem.
 
Last edited:
No my issue was dof was not working not lag. But doing what I did seem to take care of both issues we will see.
 
No my issue was dof was not working not lag. But doing what I did seem to take care of both issues we will see.

OK. I don't have DOF or any other front end program installed so I can't test it. Let us know what you find.
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: roachie has left the room.
      Back
      Top