Score:0

Start exe as current logged in user

cu flag

i am creating exe shortcut on Windows startup folder while installing application. It was automatically starts on Windows start and restart.

I want check on every 5 mins whether the exe running or not. If it's not running i want to start the exe like as current logged in user click.

I need to create a task scheduler for it. Let me know how to achieve it. If any samples

djdomi avatar
za flag
Questions seeking installation, configuration or diagnostic help must include the desired end state, the specific problem or error, sufficient information about the configuration and environment to reproduce it, and attempted solutions. Questions without a clear problem statement are not useful to other readers and are unlikely to get good answers. we will assist you, when you show us what you tried and what research you have done. see also [ask]
Score:0
vn flag

This is a complicated question. Task Scheduler can be used to start a task every five minutes, but cannot be set to run that task as the currently logged in user; you can tell it to run as a specific user, only when that user is logged in, but if someone else logs in they won't get that task. If I was going to do this, I'd write a separate watchdog app, either that started when the user logged in and just woke up and checked every five minutes if the main task was still running, or else as a task in Local Service context that was started every five minutes by the scheduler and did the check for the currently logged in users. (Remember that Windows can have multiple users logged in at once, on different desktops.) I believe this would require a touch of custom programming in either case, and so may fall outside the scope of Server Fault.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.