简体   繁体   中英

Running an application once after reboot

I'm currently working on a small application that removes a piece of software and re installs it. Part of the removal process requires a reboot, so I have had to relaunch the application on startup. I'm currently using a runonce registry key under local machine.

During testing, I've found that on some devices in our fleet, the exe starts before explorer, which is very bad for UX as the installation process takes ~20 minutes and leaves the user with a black screen for this time.

Initially, I used the runonce key under current user, however I ran into issues during deployment via SCCM.(I know there are ways to remove and reinstall using SCCM, but the requirements I was given state it needs to be an application)

So how can I run my exe once at startup, without getting a black screen?

Thanks!

How about dropping a shortcut to your installer into the startup folder and removing it once done with the install?

All users: C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp

Current user: C:\\Users[Username]\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup

您可以在延迟启动/登录后使用任务计划程序启动应用程序。

创建两个部署,一个用于卸载软件,另一个用于重新安装。将卸载部署设置为重新安装部署的依赖项,并设置卸载部署所需的Configuration Manager重新启动。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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