Packaging Command and Conquer Generals

Copper Contributor

Packaging "Command and Conquer Generals".

This is an old game strategy game for Windows, from 2003.

 

For my personal interest i have packaged this into a MSIX.

The game "Command and Conquer Generals", needs to have an file called "Options.ini" in to the personal Documents folder.
(Without this file, the game will not start. You see just the Spash Screen. Then the game stops.)

So i have removed the path of the Documents folder, from the File Exclusions,

under Settings, in the MSIX Packaging tool, Version 1.2020.402.0.

 

After packaging, the personal  Documents folder is indeed captured and included into the VFS system.

After installing and starting this MSIX packaging, however, the game does not start. 
This MSIX indeed will start, if I copy by hand, this "Options.ini" file into the personal Documents folder, of the real file system.

So, is means that the game still is able to look outside of the MSIX package.

It did not look or find the "Options.ini" file, which resides into the VFS file system.

 

And, to resolve this, i have to figure out how top copy a file from within the VFS system to the real file system.

 

Is there a way to solve this in a easy way?

2 Replies

Hi @Ruurd Jan van der Goot ,

The Documents folder is not supported by the Virtual File System. You can get around this by using the Package Support Framework to copy the file during deployment, as described here:

https://techcommunity.microsoft.com/t5/windows-dev-appconsult/msix-how-to-copy-data-outside-the-inst...

 

This is not as relevant to your case, but you may also be interested in the FileRedirectionFixup

https://github.com/Microsoft/MSIX-PackageSupportFramework/tree/master/fixups/FileRedirectionFixup

@Chacon 

Hello Luis Chaco,

 Thank you very much for your reply.
..."The Documents folder is not supported by the Virtual File System"...

So it means that it's not "being seen" or "being processed" in the VFS and by the VFS....

Thanks for the link Provided.
With this example (and with the aid of Procmon.exe), the files “.json” and the “.Ps1” are seen and processed by the PsfLauncher32 system.

The Path variables inside the .ps1 is to be sorted out.
Or maybe I can seen it and find  out, with an additional Powershell command for logging of the inside actions. (I don’t know if the .ps1 file sees the VFS)


CopyCommandandConquerGeneralsData.ps1
$mydocuments = [environment]::getfolderpath("mydocuments")

New-Item -Path $mydocuments  -Name "Command and Conquer Generals Data" -ItemType "directory" -Force

 

Copy-Item -Path "VFS\personal\Command and Conquer Generals Data\" -Destination "$mydocuments" -Recurse -Force

 

 

In your second suggestions (below), is also interesting. For now a step (or two,…) too far.

 

( C language is very intriguing, and comes in many tastes C, C++, Windows-C, and more flavours. It is not easy to step in. )

https://github.com/Microsoft/MSIX-PackageSupportFramework/tree/master/fixups/FileRedirectionFixup

 

Thank you very much, Best regards.