Is there a way to specify a RunAs user when packaging the exe? So that when the EXE is run it is always run as that specific user.
Also, in the Resources = [string[]]@() section of the package.psd1 do all files have to be in the root directory or can you specify sub folders and files ie. Resources = [string[]]@("file1.jpg","folder\file2.jpg")
Sure. It’s something we can look into. We would likely be able to do some impersonation within the process to achieve this. I’ll open a feature request for it.
Another question about including resources when packaging. The documentation shows how to reference the resource in XAML. How would you reference these files in the PowerShell script?
Specifically, I am creating a WPF UI for a script and need to Load some DLLs (ie [void][System.Reflection.Assembly]::LoadFrom('assembly\MaterialDesignThemes.Wpf.dll'). But i can’t seem to get the sourcing correct in the script for it to work in an exe.