Introduction: Fix Validation Errors With Steam Games (Windows)
In this instructable i wil teach you how to make a vbscript in notepad that will fix validation errors with steam games such as portal 2 and then give you the option th launch them.
It will also give you some idea about writing your own vbscript.
Step 1: Setting Up Notepad
If you already know how to set up a vbscript you can skip this step.
Open up Notepad and save as "[your game here] fix.vbs" make sure that the file type is set to All Files.
Now your notepad is ready to write your script.
Step 2: Starting the Script, the Popup Box
I will use Portal 2 as an example in this script because that is the game that i originally wrote it for but it should work with any other steam games that get this error.
So to start with we will make the popup box to inform the user the purpose of the script.
first write out what keyword will represent that section of script so we will just use msg. Then write =msgbox this means that msg will now represent the message box. now place a (" to show that you are starting the message box script. then write something like this, ("This applet is to fix verification issues involving Portal 2.", make sure that you include the speech marks and comma at the end. Now we will just write 16, "Verification error Fix app Info") this just specifies the popup box icon and the title bar text.
now you should have something like this,
msg=msgbox("This applet is to fix verification issues involving Portal 2.", 16, "Verification error Fix app Info")
Step 3: The Fix
now go down a couple of lines and now we are going to start on the section of the script that actually fixes the problem.
so copy and paste this text
dim filesys, filetxt
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.OpenTextFile("C:\Program Files (x86)\Steam\SteamApps\[steam username]\[gamename]\steam_appid.txt", Forwriting, True)
the filetxt command is used to create or edit a text file in a specified location
the Forwriting section means that the script will write to the file nothing more.
replace [steam username] with the username you use to log in to steam. (if this doesnt work try using common instead.)
replace [gamename] with the name of your game
replace [game name+id] with one of the names and ids below in this format Portal 2 400
Name=Team Fortress Classic
Name=Day of Defeat
Name=Condition Zero Deleted Scenes
Name=Half-Life: Blue Shift
Name=Source Dedicated Server
Name=Source SDK Base
Name=Source SDK Base - Orange Box
Name=Day of Defeat: Source
Name=Team Fortress 2 Dedicated Server
Name=Half-Life 2: Deathmatch
Name=Half-Life 2: Lost Coast
Name=Half-Life Deathmatch: Source
Name=Half-Life 2: Episode One
Name=Half-Life 2: Episode Two
Name=Team Fortress 2
Name=SiN Episodes: Emergence
Name=Sin Episodes SDK
Name=Dark Messiah Might and Magic Single Player
Name=Dark Messiah Might and Magic Multi-Player
Name=Dark Messiah Might and Magic Dedicated Server
Name=Dark Messiah SDK Beta
Name=The Ship Dedicated Server
Name=The Ship Single Player
Name=The Ship Tutorial
Name=Zombie Panic! Source
Name=Zombie Panic! Source Dedicated Server
Name=Age of Chivalry
Name=Age of Chivalry Dedicated Server
Name=Synergy Dedicated Server
Name=D.I.P.R.I.P. Warm Up
Name=D.I.P.R.I.P. Dedicated Server
Name=Eternal-Silence Dedicated Server
Name=Dystopia Dedicated Server
Name=Insurgency Dedicated Server
NOTE: if your operating system is 32 bit then make sure that you write just Program Files instead of Program Files (x86)
Step 4: Final Msgbox and Game Launch
Now we will make a message box with yes or no buttons to choose wether to launch the game or not.
so first write out a msgbox like before but in this format
finished=msgbox("Portal 2 has now been fixed. do you wan't to play it?", vbyesno, "play")
the vbyesno portion will give the popup box the yes and no buttons allowing other sections of the script to use the result.
now we will write a section of script that will launch the game if yes is selected.
if finished = vbyes then
strProgramPath = """[your game exe path]"""
set objShell = createobject("Wscript.Shell")
this will run the game if yes is selected on the finished box. You will get an error message if you select no but that is perfectly normal.
replace [your game exe path] with the path of the game exe in your steam folder steamapps
Step 5: Finished
Now just save the file and launch it to make sure that everything works fine. you will need to run this script every time you play the game.
Participated in the
Game.Life 2 Challenge