Hi!
I'm trying to make the Gamebase64 application portable (http://gamebase64.com/)
The problem I'm currently running into is that the app needs to run from a "short path".
The program usually installs to c:\GameBase
But I don't want to have to copy the files over there every time since with all the files I added I'm up to over 3gb of data.
So, how should I go at making the program believe it's folder is directly on the root of a drive while still making it portable?
I thought of making a batch file that would use the subst command to make gamebase think the app is installed on drive B: (who in the world still has two floppy drives installed?)
But for some reason, the batch file returns me an error... and I can't figure out why.
@echo off
echo creating substitution drive
subst B: "%~dps0"
echo starting gamebase64
start /w b:\gamebase.exe
echo removing substitutions
subst /d B:
echo closing
Anybody has a better idea?
François
subst requires admin
Sometimes, the impossible can become possible, if you're awesome!
It's funny you should mention that.
I have the latest update to win10 on my computer. When I start an unelevated console and use the subst command, I have no problem making it work for some reason. But when I call it from an a batch file using the %~dps0 string to get the correct path, it just won't work.
I tried running the batch in moth regular and admin modes and still get the same error (Path Not Found - D:\test\Gamebase64Portable\App\Gamebase\ )
François
What about simply setting the working directory? Does that make a difference?
OK, I just hit another stumbling block.
Gamebase is written in VB6...
Anybody know how to sideload OCX and DLL's?
I want to try and avoid registering and unregistering things as it could damage a computer that already has the files installed...
François
I'm wondering if anyone here has experience writing manifest files?
I was doing a bit or research yesterday and I discovered that manifest files can be used to sideload DLL and OCX files.
This is the key to making VB apps truly portable. Only problem is they don't give much detail and I really suck at coding XML...
the only real information I could find is here (https://weblog.west-wind.com/posts/2011/oct/09/an-easy-way-to-create-sid...).
François
AFAIK manifest files in this context are only relevant to .NET apps; VB6 is pre-.NET.
OK, still moving along, I discovered that manifest files are supported by VB6! Just not in the early versions of XP
https://support.microsoft.com/en-ca/kb/828629
Now, I'm trying to make some sense of this but don't know what the heck I'm doing! (feeling like a monkey bashing on the keyboard).
Here's what I've come up with so far, but it still won't work, though I don't get an xml error anymore.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity name="GameBase.exe"
version="1.3.0.19"
processorArchitecture="x86"
type="win32"
/>
<file name="COMDLG32.OCX">
<comClass clsid="{F9043C85-F6F2-101A-A3C9-08002B2F49FB}"
threadingModel="Apartment"
progid="MSComDlg.CommonDialog.1"
description="Microsoft Common Dialog Control, version 6.0" />
</file>
<file name = "dao360.dll">
<comClass clsid="{00000100-0000-0010-8000-00AA006D2EA4}"
tlbid="{00025E01-0000-0000-C000-000000000046}"
progid="DAO.DBEngine.36 DAO.DBEngine.36"
description="DAO.DBEngine.36 DAO.DBEngine.36"
threadingModel="apartment" />
</file>
<file name = "mscomctl.ocx">
<comClass clsid="{DD9DA666-8594-11D1-B16A-00C0F0283628}"
progid="MSComctlLib.ImageComboCtl.2"
description="Microsoft ImageComboBox Control 6.0 (SP6)"
threadingModel="apartment" />
</file>
<file name = "msjtes40.dll">
<comClass clsid="{039EA4C0-E696-11D0-878A-00A0C91EC756}"
description="Jet Expression Service"
threadingModel="both" />
</file>
<file name = "msvbvm60.dll">
<comClass clsid="{D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731}"
progid="VBPropertyBag"
description="VBPropertyBag"
threadingModel="apartment" />
</file>
<file name = "MSWINSCK.OCX">
<comClass clsid="{248DD896-BB45-11CF-9ABC-0080C7E7B78D}"
progid="MSWinsock.Winsock.1"
description="Microsoft WinSock Control, version 6.0"
threadingModel="apartment" />
</file>
<file name = "oleaut32.dll">
<comClass
clsid="{0BE35204-8F91-11CE-9DE3-00AA004BB851}"
progid="StdPicture"
description="Standard Picture"
threadingModel="apartment" />
</file>
<file name = "TABCTL32.OCX">
<comClass clsid="{BDC217C5-ED16-11CD-956C-0000C04E4C0A}"
progid="TabDlg.SSTab.1"
description="Microsoft Tabbed Dialog Control 6.0 (SP4)"
threadingModel="apartment" />
</file>
</assembly>
François
While still on my quest to portabilize a VB6 app, I stumbled onto this
https://www.raymond.cc/blog/check-what-dll-or-ocx-dependency-files-is-ne...
It contains a host of tools that indicate which dependencies an app uses.
François