简体   繁体   English

使用PowerShell DSC使用GUI启动Windows进程或服务

[英]Starting a Windows Process or Service with a GUI with PowerShell DSC

I have a Unity3D application (a simple .exe) that I'm trying to automate with PowerShell DSC. 我有一个Unity3D应用程序(一个简单的.exe),我正在尝试使用PowerShell DSC进行自动化。 However, it seems that Unity3D cannot acquire a GPU when started as a Service or background Process, which breaks my application. 但是,似乎Unity3D作为服务或后台进程启动时无法获取GPU,这破坏了我的应用程序。 When started manually via double-clicking the .exe, things work fine. 通过双击.exe手动启动时,一切正常。

Is there a way to force DSC to show a GUI when starting a Service or Process? 是否有一种方法可以在启动服务或进程时强制DSC显示GUI?

Thanks! 谢谢!

DSC doesn't currently support interactive applications during the configuration. DSC当前配置过程中不支持交互式应用程序。 I can think of two solutions: 我可以想到两种解决方案:

  • Ensure that the user is logging on 确保用户正在登录
    • The user logs on already for whatever reason 用户已经出于任何原因登录
    • Setup the user to auto-logon during the config (and be sure to set DSC to reboot.) 将用户设置为在配置过程中自动登录(并确保将DSC设置为重新启动。)
  • Ensure the app runs when the user logs on: 确保应用程序在用户登录时运行:

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

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