2

How can i start an app when user logs on first time on a machine? I need to write an app which assists the user for example configuring other software, printer etc. What i need to ensure is, that this app starts when a user first logs into this machine.

How can I achieve this?

(If it helps, I only need to support Windows 10.)

Harry Johnston
  • 35,639
  • 6
  • 68
  • 158
STORM
  • 4,005
  • 11
  • 49
  • 98
  • 1
    this isn't a developing question and should be moved to http://www.SuperUser.com – fubo Jan 25 '17 at 11:41
  • The OP is writing an application. This belongs here, not on Super User. (Configuring your own application to run on logon is not the same as an end user configuring an application to run on logon - there are different mechanisms.) – Harry Johnston Jan 25 '17 at 22:31

1 Answers1

0

Make an auxiliar process that starts your app when the computer starts. You can refer this one...

How to run a C# application at Windows startup?

then make a value at your db, for example firstLogin and changed to 0 for this user when your app is running.

Community
  • 1
  • 1
David J.E.
  • 358
  • 4
  • 14
  • But in that case the app has to start check and close itself? Or one option what i thought about is to make the app always start in windows tray as icon and to check in background, and if first login ono this computer, then create and show form to the user. Maybe – STORM Jan 26 '17 at 08:04
  • I always do it like this, I don't know if is the best way to do it, but for me works good: I do a process only to start the configuration app if firstLogin = 1 for this user then at the configuration app I change the firstLogin value to 0 for this user, then when the configuration is done I quit the first process from the Windows start and I delete it to avoid the background check every time that Windows starts. – David J.E. Jan 26 '17 at 10:08