App is invisible if started from Task Scheduler without any user logged in

前提是你 提交于 2019-12-25 12:37:16

问题


Is there any way to have app visible even if it is started with "Run only if user logged on" unchecked? I know that windows starts app from task invisible as there is no user logged into yet. But when user logs in he would like to see that app instead of running in the background.

I would like to know the way to solve it. There must be a lot of people who faced this problem before.

Thanks,


回答1:


It sounds to me like your application was not architectured correctly for the operating system being used.

This application sounds like it really should be running as a Windows Service, and then there should be a user-level application that can be used to manage it, as appropriate.

Running desktop-UI software without a valid desktop session is a bad idea, the fact that Windows lets you schedule just such a thing notwithstanding. But that you further want to go beyond the best-practices here to have the software "sometimes" be accessible strongly begs, in my opinion, for the architecture I noted above.




回答2:


I solved it by tweaking autologon in Windows Registry (WinXP): HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

DefaultUsername and DefaultPassword. That is all what I needed. Thank you, guys!



来源:https://stackoverflow.com/questions/8420785/app-is-invisible-if-started-from-task-scheduler-without-any-user-logged-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!