简体   繁体   English

Msix,打包和任务调度器

[英]Msix, packaging and task scheduler

I made a console app using .NET 5.0 in VS2019 pro preview, packaged it with "Windows application packaging project" msix.我在 VS2019 pro 预览版中使用 .NET 5.0 制作了一个控制台应用程序,将其与“Windows 应用程序打包项目”msix 打包在一起。 Everything going smoothly and installed correctly, updates perfectly.一切顺利并正确安装,完美更新。 Problem arises when I want to add this program to a task scheduler as the.exe file is located in C:\Program Files\WindowsApps\PackageName\Version...当我想将此程序添加到任务计划程序时出现问题,因为 .exe 文件位于 C:\Program Files\WindowsApps\PackageName\Version...
1. Can't run it from the WindowsApps folder due to restrictions (As there are going to be multiple other users it's not feasible to make them all gain access). 1. 由于限制,无法从 WindowsApps 文件夹运行它(因为会有多个其他用户,让他们都获得访问权限是不可行的)。 2. The folder will change name if I push an update given the version nr. 2. 如果我在给定版本 nr 的情况下推送更新,文件夹将更改名称。 Is there a way to do this correctly?有没有办法正确地做到这一点? Like a command to launch windows app files?喜欢启动 windows 应用程序文件的命令? Any help would be appreciated!任何帮助,将不胜感激!

Have you tried defining an execution alias and specifying the alias name (not path) as target for the scheduled task?您是否尝试过定义执行别名并将别名(不是路径)指定为计划任务的目标?

This should solve both the permission and changing paths problem.这应该解决权限和更改路径问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM