Packaging Command and Conquer Generals

%3CLINGO-SUB%20id%3D%22lingo-sub-1337922%22%20slang%3D%22en-US%22%3EPackaging%20Command%20and%20Conquer%20Generals%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1337922%22%20slang%3D%22en-US%22%3E%3CP%3E%3CFONT%3EPackaging%20%22Command%20and%20Conquer%20Generals%22.%3C%2FFONT%3E%3C%2FP%3E%3CP%3EThis%20is%20an%20old%20game%20strategy%20game%20for%20Windows%2C%20from%202003.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20my%20personal%20interest%20i%20have%20packaged%20this%20into%20a%20MSIX.%3C%2FP%3E%3CP%3E%3CFONT%3EThe%20game%20%22Command%20and%20Conquer%20Generals%22%2C%20needs%20to%20have%20an%20file%20called%20%22%3CFONT%3EOptions.ini%3C%2FFONT%3E%22%20in%20to%20the%20personal%20Documents%20folder.%3CBR%20%2F%3E(Without%20this%20file%2C%20the%20game%20will%20not%20start.%20You%20see%20just%20the%20Spash%20Screen.%20Then%20the%20game%20stops.)%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3ESo%20i%20have%20removed%20the%20path%20of%20the%20Documents%20folder%2C%20%3C%2FFONT%3E%3CFONT%3Efrom%20the%20File%20Exclusions%2C%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3Eunder%20Settings%2C%20in%20the%20MSIX%20Packaging%20tool%2C%20Version%201.2020.402.0.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3EAfter%20packaging%2C%20the%20personal%26nbsp%3B%20Documents%20folder%20is%20indeed%20captured%20and%20included%20into%20the%20VFS%20system.%3CBR%20%2F%3E%3CBR%20%2F%3EAfter%20installing%20and%20starting%20this%20MSIX%20packaging%2C%20however%2C%20the%20game%20does%20not%20start.%26nbsp%3B%3CBR%20%2F%3EThis%20MSIX%20indeed%20will%20start%2C%20if%20I%20copy%20by%20hand%2C%20this%20%22%3CFONT%3EOptions.ini%3C%2FFONT%3E%22%20file%20into%20the%20personal%20Documents%20folder%2C%20of%20the%20real%20file%20system.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3ESo%2C%20is%20means%20that%20the%20game%20still%20is%20able%20to%20look%20%3CU%3E%3CSTRONG%3Eoutside%3C%2FSTRONG%3E%3C%2FU%3E%20of%20the%20MSIX%20package.%20%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3EIt%20did%20not%20look%20or%20find%20the%20%22Options.ini%22%20file%2C%20which%20resides%20into%20the%20VFS%20file%20system.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3EAnd%2C%20to%20resolve%20this%2C%20i%20have%20to%20figure%20out%20how%20top%20copy%20a%20file%20from%20within%20the%20VFS%20system%20to%20the%20real%20file%20system.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3EIs%20there%20a%20way%20to%20solve%20this%20in%20a%20easy%20way%3F%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1341621%22%20slang%3D%22en-US%22%3ERe%3A%20Packaging%20Command%20and%20Conquer%20Generals%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1341621%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F185028%22%20target%3D%22_blank%22%3E%40Ruurd%20Jan%20van%20der%20Goot%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThe%20Documents%20folder%20is%20not%20supported%20by%20the%20Virtual%20File%20System.%20You%20can%20get%20around%20this%20by%20using%20the%26nbsp%3B%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3EPackage%20Support%20Framework%20to%20copy%20the%20file%20during%20deployment%2C%20as%20described%20here%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fwindows-dev-appconsult%2Fmsix-how-to-copy-data-outside-the-installation-folder-during-the%2Fba-p%2F1133602%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fwindows-dev-appconsult%2Fmsix-how-to-copy-data-outside-the-installation-folder-during-the%2Fba-p%2F1133602%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20is%20not%20as%20relevant%20to%20your%20case%2C%20but%20you%20may%20also%20be%20interested%20in%20the%20FileRedirectionFixup%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FMSIX-PackageSupportFramework%2Ftree%2Fmaster%2Ffixups%2FFileRedirectionFixup%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FMicrosoft%2FMSIX-PackageSupportFramework%2Ftree%2Fmaster%2Ffixups%2FFileRedirectionFixup%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1344998%22%20slang%3D%22en-US%22%3ERe%3A%20Packaging%20Command%20and%20Conquer%20Generals%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1344998%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F569046%22%20target%3D%22_blank%22%3E%40Luis_Chacon%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%20Luis%20Chaco%2C%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3BThank%20you%20very%20much%20for%20your%20reply.%3CBR%20%2F%3E%3CEM%3E...%22The%20Documents%20folder%20is%20not%20supported%20by%20the%20Virtual%20File%20System%22...%3C%2FEM%3E%3C%2FP%3E%3CP%3ESo%20it%20means%20that%20it's%20not%20%22being%20seen%22%20or%20%22being%20processed%22%20in%20the%20VFS%20and%20by%20the%20VFS....%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20the%20link%20Provided.%3CBR%20%2F%3EWith%20this%20example%20(and%20with%20the%20aid%20of%20Procmon.exe)%2C%20the%20files%20%E2%80%9C.json%E2%80%9D%20and%20the%20%E2%80%9C.Ps1%E2%80%9D%20are%20seen%20and%20processed%20by%20the%20PsfLauncher32%20system.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20Path%20variables%20inside%20the%20.ps1%20is%20to%20be%20sorted%20out.%3CBR%20%2F%3EOr%20maybe%20I%20can%20seen%20it%20and%20find%20%26nbsp%3Bout%2C%20with%20an%20additional%20Powershell%20command%20for%20logging%20of%20the%20inside%20actions.%20(I%20don%E2%80%99t%20know%20if%20the%20.ps1%20file%20sees%20the%20VFS)%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ECopyCommandandConquerGeneralsData.ps1%3CBR%20%2F%3E%24mydocuments%20%3D%20%5Benvironment%5D%3A%3Agetfolderpath(%22mydocuments%22)%3C%2FP%3E%3CP%3ENew-Item%20-Path%20%24mydocuments%26nbsp%3B%20-Name%20%22Command%20and%20Conquer%20Generals%20Data%22%20-ItemType%20%22directory%22%20-Force%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECopy-Item%20-Path%20%22VFS%5Cpersonal%5CCommand%20and%20Conquer%20Generals%20Data%5C%22%20-Destination%20%22%24mydocuments%22%20-Recurse%20-Force%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20your%20second%20suggestions%20(below)%2C%20is%20also%20interesting.%20For%20now%20a%20step%20(or%20two%2C%E2%80%A6)%20too%20far.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(%20C%20language%20is%20very%20intriguing%2C%20and%20comes%20in%20many%20tastes%20C%2C%20C%2B%2B%2C%20Windows-C%2C%20and%20more%20flavours.%20It%20is%20not%20easy%20to%20step%20in.%20)%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FMSIX-PackageSupportFramework%2Ftree%2Fmaster%2Ffixups%2FFileRedirectionFixup%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FMicrosoft%2FMSIX-PackageSupportFramework%2Ftree%2Fmaster%2Ffixups%2FFileRedirectionFixup%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much%2C%20Best%20regards.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New 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

@Luis_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.