<html>
<head>
<title>Civ3 File Explorer</title>
<script type=text/vbs>
Dim sVirtualStore, sArch, sWow6432Node, sPathCiv3, sPathPTW, sPathC3C, sVSCiv3, sVSPTW, sVSC3C ' global variable
function launchlink(sPath)
Dim oAnchor, oFileSystem
launchlink = "<a href=""" & "file:///" & sPath & """ class=""pathlink"">" & sPath & "</a>"
end function ' launchlink
Function pathexists(fldr)
Dim fso, msg
Set fso = CreateObject("Scripting.FileSystemObject")
if fldr <> "" then
If (fso.FolderExists(fldr)) Then
msg = "<span class=""exist"">Exists</span>"
Else
msg = "<span class=""noexist"">Does not exist</span>"
End If
else
' if fldr is empty, msg is empty, too
msg = ""
end if
pathexists = msg
End Function
' Onload, let's assign environment variables and call other functions if needed
sub window_onload
Dim oWSHShell
' Create shell object to obtain environment variables
set oWSHShell = CreateObject("WScript.Shell")
Set oFileSystem = CreateObject("Scripting.FileSystemObject")
' Assign global variables based on environment variables
sVirtualStore = oWSHShell.expandenvironmentstrings("%LOCALAPPDATA%") & "\VirtualStore"
' If architecture does not equal x86 assume 64-bit and use the Wow6432Node part of the registry
sArch = oWSHShell.expandenvironmentstrings("%PROCESSOR_ARCHITECTURE%")
if sArch = "x86" then
sWow6432Node = ""
else
sWow6432Node = "Wow6432Node\"
end if
' Update the page now in case there are run-time errors while getting the other values
updatehtml()
' Read Civ3 installed paths from registry
sPathCiv3 = oWSHShell.RegRead("HKLM\Software\" & sWow6432Node & "Infogrames Interactive\Civilization III\Install_Path")
sPathPTW = oWSHShell.RegRead("HKLM\Software\" & sWow6432Node & "Infogrames\Civ3PTW\Install_Path")
sPathC3C = oWSHShell.RegRead("HKLM\Software\" & sWow6432Node & "Infogrames\Conquests\Install_Path")
sVSCiv3 = sVirtualStore & right(sPathCiv3, len(sPathCiv3)-2)
sVSPTW = sVirtualStore & right(sPathPTW, len(sPathPTW)-2)
sVSC3C = sVirtualStore & right(sPathC3C, len(sPathC3C)-2)
updatehtml()
end sub
sub updatehtml()
VirtualStore.InnerHTML = launchlink(sVirtualStore) & " " & pathexists(sVirtualStore)
'Architecture.InnerHTML = sArch
Civ3Path.InnerHTML = launchlink(sPathCiv3) & " " & pathexists(sPathCiv3)
PTWPath.InnerHTML = launchlink(sPathPTW) & " " & pathexists(sPathPTW)
C3CPath.InnerHTML = launchlink(sPathC3C) & " " & pathexists(sPathC3C)
Civ3VSPath.InnerHTML = launchlink(sVSCiv3) & " " & pathexists(sVSCiv3)
PTWVSPath.InnerHTML = launchlink(sVSPTW) & " " & pathexists(sVSPTW)
C3CVSPath.InnerHTML = launchlink(sVSC3C) & " " & pathexists(sVSC3C)
end sub
</script>
<style>
/* I didn't like the IE/mshta default font */
body {
font-family: Verdana, sans-serif;
}
/* Increasing <li> line height to separate file link spacing */
ul li {
line-height: 1.5em;
}
/* for the path does not exist indicator */
.noexist {
color: green;
font-weight: bold;
}
/* for the path exists indicator */
.exist {
}
/* for the file:///c/ links */
.pathlink {
font-family: Tahoma, sans-serif;
text-decoration: none;
}
a.pathlink:hover {
color: orange;
}
</style>
</head>
<body>
<h1>Civ3 File Explorer</h1>
<h2>Your Civ3 Install and VirtualStore Info</h2>
<ul>
<li>Presumed VirtualStore Location: <span id="VirtualStore"></span></li>
<!-- <li>Environment Architecture: <span id="Architecture"></span></li> Commenting out because of likely confusion between reported arch and actual arch -->
<li>Civ3 Installed Path: <span id="Civ3Path"></span></li>
<li>Civ3 VirtualStore: <span id="Civ3VSPath"></span></li>
<li>PTW Installed Path: <span id="PTWPath"></span></li>
<li>PTW VirtualStore: <span id="PTWVSPath"></span></li>
<li>C3C Installed Path: <span id="C3CPath"></span></li>
<li>C3C VirtualStore: <span id="C3CVSPath"></span></li>
</ul>
<hr>
<h2>About</h2>
<p>I suspect quite a few problems reported with Civ3 on Vista/Win7/Win8 problems are due to VirtualStore. This will tell you where Civ3 is installed, where the VirtualStore folders are and give you links to them.</p>
<p>I will not suggest actions here. This tool is to help you explore and to give you information to ask others for help.</p>
<p>This program is provided for free with no warranty for purpose or usefulness. It is not associated with Infogrames Interactive, Atari or CivFanatics. There is a <a href="http://forums.civfanatics.com/showthread.php?t=509773">forum thread about this utility on CivFanatics.com</a>.</p>
<h3>Player/Modder Issues With VirtualStore Include:</h3>
<ul>
<li>VirtualStore files may not go away after uninstall</li>
<li>Mod files in protected location and VirtualStore may be out of sync</li>
<li>Running Civ3 with different privileges (user, admin, compatibility) may cause different files to be used</li>
</ul>
<h3>Notes</h3>
<ul>
<!-- Actually, I can compare VirtualStore and non-VirtualStore without admin access. Yay! <li style="color: red;">If your Civ3 folders do have VirtualStore locations, the links to the original paths will be affected by VirtualStore. To get around this, this app would have to be launched with admin privileges, but that's not easy yet.</li> -->
<li>You can highlight, copy and paste the above section into a post on a forum asking for help with your Civ3 save file or mod problems.</li>
<li>If your game VirtualStore folders don't exist, that's a good thing and you have less to worry about.</li>
<li>"Presumed VirtualStore" location may exist even if none of the game VirtualStore folders exist, and this would be for other applications.</li>
</ul>
<h3>What This Is Doing</h3>
<ol>
<li>Presumes %LOCALAPPDATA%\VirtualStore is the VirtualStore location and checks if it exists</li>
<li>Checks %PROCESSOR_ARCHITECTURE% because Civ3 registry location is different depending if this is x86 or not</li>
<li>Reads installed location for Civ3, PTW and Conquests from the registry</li>
<li>Guesses where VirtualStore folder for those locations would be</li>
<li>Tells you if the VirtualStore folder location(s) exist for your Civ3 installs</li>
<li>Provides links to each location displayed so you can browse these locations easily</li>
</ol>
</body>
</html>