Plants vs. Zombies: Game of the Year

Plants vs. Zombies: Game of the Year

View Stats:
Sandmans Feb 7, 2016 @ 5:13pm
Game Crash Fix Exception: Access Violation (code 0xc0000005)
If you get an error while trying to start Plants Vs Zombies that looks something like this

Exception: Access Violation (code 0xc0000005)
Module: popcapgame1.exe

The issue seems to be something with the program running full screen. You can reassign the registry value ScreenMode to a 0 at path HKEY_CURRENT_USER\Software\SteamPopCap\PlantsVsZombies to run the program windowed.

I got sick of doing this every time so I created a batch file that does the same thing.

Open notepad and paste the following lines in to it. There are 3 lines here (each command needs to be all on the same line)

reg delete HKEY_CURRENT_USER\Software\SteamPopCap\PlantsVsZombies /v ScreenMode /f
reg add HKEY_CURRENT_USER\Software\SteamPopCap\PlantsVsZombies /v ScreenMode /t REG_DWORD /d 0
start steam://rungameid/3590

Then save as PVZ.bat

This batch file will delete the old key and give you a new ScreenMode DWORD with a value of 0, which will tell the the program to run windowed.

Also go to %ProgramFiles(x86)%\Steam\steamapps\common\Plants Vs Zombies" and right click on PlantsVsZombies.exe. Click the compatibility tab and select run in 256 colors. You can also run in compatibility mode for XP SP3 if you want.

Copy Steam.dll from "%ProgramFiles(x86)%\Steam" to "%ProgramFiles(x86)%\Steam\steamapps\common\Plants Vs Zombies".

You can do it from the command line using this

copy "%ProgramFiles(x86)%\Steam\Steam.dll" "%ProgramFiles(x86)%\Steam\steamapps\common\Plants Vs Zombies" /y

Type it all on one line; the quotes are needed.

Lastly you can change the icon by right clicking the PVZ.bat file you created earlier and click create shortcut. Right click the shortcut and hit properties, then click change icon. Look for icons in this file %ProgramFiles(x86)%\Steam\steamapps\common\Plants Vs Zombies\PlantsVsZombies.exe and select OK.

Now launch PVZ with the shortcut batch file and it should work every time! Mine even launches full screen.

Good Luck!
< >
Showing 1-8 of 8 comments
Dolphin Buff Man Feb 7, 2016 @ 11:15pm 
Thanks a tonne for this, I only bothered with the PVZ.bat as the rest of it wasn't necessary to get the game running. As you sugested it will need to be windowed, and trying to change in game just crashes it immediatly. No doubt a fix will be out soon, but thanks for this until then!
thanks.
it worked very well
Thank you so much! Worked wonderfully. I hope they fix the issue soon.
Neuroticmother Feb 14, 2016 @ 12:23am 
Thanks Dolphin Buff Man!

twisty Feb 14, 2016 @ 2:37pm 
Thanks for this, I was having the issue too, the PVZ.bat solution worked like a charm! So this is a new problem, I see? Any ideas what's causing it?
Mattoe Jan 27, 2018 @ 2:28pm 
I still get the same error even though i exactly did what you said to do. Help?
JayPredictable Feb 1, 2021 @ 5:16pm 
what do you mean by compatibility tab??
Zwartemis Mar 1, 2021 @ 10:46pm 
Following all of these steps got the game running for me. Thanks!
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Feb 7, 2016 @ 5:13pm
Posts: 8