Forum Discussion
ODBC Drivers + No Shortcut Apps
Starting off with the easy stuff:
You can create a package without any shortcuts. Your "ODBC Driver" consists of registry settings, plus optionally something like an oracle client that acts as middleware. The question is how to tie that to the primary app that will use it? Assuming that the primary app is also MSIX:
- Under the currently released OS's, your only choice is to create your driver package as a "Modification Package", which in essence is a layered add-on to the primary package. This is a great use when you have a primary package that must work with several back-ends (such as dev/test/prod) and you deploy the primary app plus the modification package with settings that you need.
- In 21H2 we expect to see (it is available in preview versions) "Shared Package Containers". This would allow a different workflow for creating your settings package, potentially allowing more flexibility (such as applying these settings to multiple main packages).
But ultimately, it would be best to have A package contain a shortcut, even if it uses a natively installed app under the covers.
There are some other obscure options involving the Powershell cmdlet to start a native process in a container, but those only work on 20H2 and above and are a kludge at best and should be avoided.
In regard to AppData. As long a your package(s) don't specify any AppData files and they are generated by running the app, you probably don't need the PSF. If you do, PsfTooling 4.10 is the latest version. Using the Psf requires a shortcut in that package, but you could make that work whether or not the target exe is inside of a package. The details are complicated, but the tool has in-built help. The missing part for you might be how to create the overall scenario before running the tool.
I understand this might not be a complete answer for you, but start with this and come back with specific questions and more details on the scenario.
- Siva116Jul 12, 2021Brass Contributor
Thank you very much Tim Mangan for the information
Here are the requirement requirements:
Target OS : Win 10 21H1
1. I working on a standalone applicaiton IBM_Netezza which has ODBC drivers and with no shortcuts. while I install the application on target machine, I am able to see the ODBC drivers in the "ODBC Data Source Administrator" console (odbcad32.exe). but when the install the MSIX package in target machine, I am not able to see those ODBC drivers and I tried to open virtual container's cmd.exe with Invoke-CommandInDesktopPackage, but its not successful... got an error " Cannot create a file when that file already exists".Could you please suggest best approach to handle this instead of Modification Package, as its is a standalone package for me.
2. coming to AppData, I tried to create MSIX VLC player package, at the time first launch run.. I unchecked auto update check option and this option stored in .ini file at user's AppData folder. once after completion of the MSIX package... I installed MSIX package on clean VM and launched to verify whether the Auto Updates were suppressed or not... but its not suppressed? In such scenario, how we will handle the files or setting stored in Appdata location and also with the same scenario, what if the setting stored in HKCU? when I open the package in Edit mode.. I am able to see the ini file in Appdata folder under VFS section, but once we install the app.. its not able to read the data there??
Could you please suggest the best approach to handle these scenarios.
Thanks in Advance.- Peer-AtleJun 11, 2024Brass Contributor
Siva116 Working with MSIX Packaging Tool. Use PSF Fixup.
Copy vlcrc from %APPDATA%\.... to ..\Videolan\VLC folder
Delete %APPDATA% from msix package
Config.json{"applications": [{"id": "VLC","executable": "VFS\\ProgramFilesX64\\VideoLAN\\vlc\\vlc.exe","scriptExecutionMode": "-ExecutionPolicy Bypass","startScript":{"scriptPath": "Copy.ps1","waitForScriptToFinish": true,"showWindow": false,"runOnce": true}},{"id": "VLCSKINNED","executable": "VFS\\ProgramFilesX64\\VideoLAN\\vlc\\vlc.exe","arguments": "-Iskins"}]}
copy.ps1
# Create %APPDATA%\vlc
New-Item -ItemType directory -Path "$env:APPDATA\vlc" | Out-Null
Copy-Item -Path "$env:ProgramFiles\VideoLAN\vlc\vlcrc" -Destination "$env:APPDATA\vlc\" -Force -Recurse -PassThru | Out-Null
Package filesVirtual registry
AppxManifest.xml- Jun 11, 2024
Peer-Atle Regarding your post (for others).
It is very common that an application will use a file in either AppData/Local or Roaming to store configuration information, and that in repackaging apps into MSIX we want to "pre-configure" the app to do things like defeat legacy updaters for example.
The standard technique is to install and perform the preconfiguration while in monitoring mode of the packaging tool, often wrapping the vendor installer in a powershell script to perform a silent/passive installation and perform the preconfiguration by copying a pre-made version of the file to it's destination.
Running PsfTooling (or TMEditX) against this as part of the packaging process, would then detect the need for the PSDF and take care of the rest. This is good for an app like VLC, and probably whatever app the original question was about for ODBC.
- mohant1850Jun 07, 2024Copper Contributor
HI Siva116 did yoy find a solution for ODBC drivers and %appdata% ?
if yes could you please explain the proccess and how to impliment it?- Jun 08, 2024Any files in AppData (local or remote) in the package require use of one of the PSF file based fixups, FileRedirectionFixup or (preferred) MfrFixup or the containerized application process will not see the files within the package.