Forum Discussion
Combine workingdirectory and startScript results in error message.
I am trying to combine both working directory and startup script in the config.json file. Everything seems to be configured correctly. i install the MSIX package but when i try to start it i get this error message.
If i exclude either workingDirectory or startScript everything is OK.
Config.json
{
"applications": [
{
"id": "NOTEPAD",
"executable": "VFS\\ProgramFilesX64\\Notepad++\\notepad++.exe",
"workingDirectory": "VFS\\ProgramFilesX64\\Notepad++",
"scriptExecutionMode": "-ExecutionPolicy Bypass",
"startScript": {
"waitForScriptToFinish": true,
"runOnce": true,
"showWindow": false,
"scriptPath": "Copy.ps1"
}
}
]
}
Package files
AppxManifest.xml
<Applications>
<Application Id="NOTEPAD" Executable="PsfLauncher64.exe" EntryPoint="Windows.FullTrustApplication">
4 Replies
- Peer-AtleBrass Contributor
Sorry. I found the solutions months ago but forgot to update this thread.
When combinding workingdir and powershell script, then the powershell script must be stored in the workingdir folder.
config.json file.
....
..
"scriptPath": "Copy.ps1"
...
.. - PollewopsIron Contributor
did you place the script in: "workingDirectory": "VFS\\ProgramFilesX64\\Notepad++", fodler?
Or change the reference in the json to "\\Copy.ps1"
- PollewopsIron Contributor
Hi Tim, I tested "\\Copy.ps1", but that does not work. When the WorkingDirectory is set, this value seems to be relative to that WorkingDirectory folder.
"\\Copy.ps1" does not work then :-(