-
Notifications
You must be signed in to change notification settings - Fork 1
Features
The MSIX-Power-Wrapper includes many features which are documented in this section.
Process can be used to run a process. It is needed to run the wrapped application.
<Process>
<ArgsSelector>Edit</ArgsSelector> <!-- Optional -->
<Filename>[APPDIR]\mymainapp.exe</Filename>
<WorkingDirectory>[APPDIR]</WorkingDirectory>
<Arguments>myargument [ARGS]</Arguments>
<WaitForExit>true</WaitForExit>
</Process>
| Filename | The path to the EXE file you would like to run. This file can be in your package or somewhere else on the filesystem. |
| WorkingDirectory | A path which specified the working directory of the application. |
| Arguments | The arguments that should be passed to the application. |
| ArgsSelector | This can be used to provide multiple Process elements and making the executing dependent on a special argument that is provided to the wrapper. To run the specific exe within the sample you would need to provide the parameter `[ARGSSELECTOR|Edit]` within the command line and use `[RESOLVED_ARGS]` within the arguments to make sure the parameter is not provided to the final application. |
| WaitForExit | Normally the wrapper waits for the application to exit before it continues. With setting `WaitForExit` to `false` the wrapper continues its execution. If all processes have `WaitForExit`` set to `false` the wrapper will not execute post execution tasks. If the value is not set the wrapper will wait for the process to finish. |
Virtual file is used to copy a file from one location to another. It is intended to be used to move initial configurations from the application folder to the user profile. You can use the variable [APPDIR] to reference the application directory and [APPDATA] to reference the users appdata folder.
<VirtualFile>
<File>[APPDIR]\myconfig.ini</File>
<Target>[APPDATA]\myconfig.ini</Target>
<Overwrite>1</Overwrite>
</VirtualFile>
| File | The file that you want to copy. You can use the variable `[APPDIR]` to reference the application directory. |
| Target | The target location to which you want to copy the file. Use the variable `[APPDATA]` to reference the users appdata folder |
| Overwrite | Should the file be overwritten if it already exists. Set this to 1 for enabled and 0 for disabled (Default is 0). |
Virtual folder is used to copy a folder from one location to another. It is intended to be used to move initial configurations from the application folder to the user profile. You can use the variable [APPDIR] to reference the application directory and [APPDATA] to reference the users appdata folder.
<VirtualFolder>
<Folder>[APPDIR]\MyFolder</Folder>
<Target>[APPDATA]\MyFolder</Target>
</VirtualFolder>
| Folder | The folder that you want to copy. You can use the variable `[APPDIR]` to reference the application directory. |
| Target | The target location to which you want to copy the folder. Use the variable `[APPDATA]` to reference the users appdata folder. |
Environment variable can be used to set an environment variable before executing the main application. The application will honor the environment variable just like it would do a normal environment variable. The variable is not available to applications outside of the msix container.
<EnvironmentVariable>
<Name>MYENVVARIABLE</Name>
<Value>[APPDIR]\PathToSomethingImportant.ini</Value>
</EnvironmentVariable>
In this sample the application can access an environment variable called MYENVVARIABLE which contains the path to an ini file within the application folder. You can use variables for the name and the value.
| Name | The name of the environment variable. |
| Value | The value of the environment variable. |
You can use this node to create registry settings within the virtualized MSIX registry for a user. You can use it to preset registry keys for the user and preconfigure your application. Existing keys will be set and non existing keys will be created. Please note the the virtualization will break if the registry path is available outside of the application.
<RegistryEntry>
<Key>Software\Microsoft\Trace32</Key>
<Attribute>Register File Types</Attribute>
<Value>0</Value>
<Type>String</Type>
<Node>USER</Node>
</RegistryEntry>
In this sample we set the configuration of the CMTrace log tool so it does not show the dialog to register itself as the default log file viewer. The wrapper will preset this setting so that the main application consumes the value.
| Key | The path to the key you want to set or create. |
| Attribute | The attribute under the key you want to set or create. |
| Value | The value of the attribute you want to set. |
| Type | The data type of the attribute you want to create or set. This can be String for a text, DWord for a numeric value or Binary for binary data. |
| Node | The registry hive you want to use. This should always be set to USER. To write machine registry keys use the MSIX registry. |
The AppInstaller Update Handler is used to control automatic updates through the AppInstaller file format. It can display a dialog when an update is available and show the progress to the enduser while also restarting the application as soon as the update is finished. This way you can make sure updates are installed before your application is launched.
<AppInstallerUpdateHandler>
<WaitForUpdateSearchToFinish>true</WaitForUpdateSearchToFinish>
<TreatAvailableUpdateAsMandatory>true</TreatAvailableUpdateAsMandatory>
<RestartOnMandatoryUpdate>true</RestartOnMandatoryUpdate>
<Message lang="default" caption="Titeltext deiner Nachricht">Nachricht an den Benutzer mit dem Hinweis, dass seine Anwendung aktualisiert wird.</Message>
<Message lang="en" caption="Title of your message">Message to the user that shows him that the app is updating.</Message>
</AppInstallerUpdateHandler>
In this sample the application start will be paused if an update is available and an update is enforced since all updates are treated as mandatory. When the update is installed the app will restart and start with the update. The user will be notified about the update in english if his operating system is using the english language and for all other cases the message will be displayed in german.
| WaitForUpdateSearchToFinish | If this is set to true the application start is paused until the update is applied. Otherwise the update will be applied when the app closes. |
| TreatAvailableUpdateAsMandatory | This should be set to true so all updates will be enforced. |
| RestartOnMandatoryUpdate | If this is set to true the app will be restarted when the update has been installed. |
| Message | Here you can display a message to the user during a mandatory update. You can use the lang attribute to specify on what operating system language the message should display. Use lang="default" as a fallback language. |
This feature is available with version 1.1.0.0 and higher.
With the Roaming Profile feature it is possible to enhance your application with configurations that roam across multiple machines so a user can roam their configuration to other machines (a little bit like UE-V). The feature will copy a file from a given location to the app data folder where the wrapped application awaits it and write it back when the wrapped application is closed. Currently this feature only supports file based configuration.
<RoamingProfile>
<Enabled>TRUE</Enabled>
<ProfileFilePath>[APPDATA]\MyApp\myconfig.ini</ProfileFilePath>
<RemoteStoragePath>[ONEDRIVECOMMERCIAL]\Roaming\MyApp\</RemoteStoragePath>
<PathThatNeedsToExist>[ONEDRIVECOMMERCIAL]</PathThatNeedsToExist>
</RoamingProfile>
In this sample the wrapped application stores its configuration in the file %APPDATA%\MyApp\myconfig.ini. The wrapper will copy the file to OneDrive for Business when the wrapped application exits and reload it from there when the wrapper starts. The configuration will only take effect when OneDrive for Business has been setup successfully (the %ONEDRIVECOMMERCIAL% environment variable is available).
| Enabled | If this is set to true the configuration takes effect. This can either be true or a value referenced by another function. You can use RETRIVEFROMREGISTRY to load this value from the registry and deploy a configuration using a custom ADMX template. |
| ProfileFilePath | This is the path to the location of the configuration file from the wrapped application. |
| RemoteStoragePath | This is the path of the directory where the configuration file from the wrapped application should be roamed. You can use OneDrive for Business here to roam a configuration file to another machine. If the directory does not exist it will be created. |
| PathThatNeedsToExist | This is a path that needs to be available before the configuration takes effect. You can use this with the %ONEDRIVECOMMERCIAL% variable to ensure that OneDrive for Business has been setup before a configuration file gets roamed. |