-1

I have a VB.NET application (.exe) I want to open every time the server starts, even if there is no users connected.

If I open the .exe manually, the main form of the app is shown, but if the task scheduler open it, the form is hidden.

I know that the application is running because it appears in the task manager, but I need to see the main form.

I have tried to create a .bat that starts the .exe but still have the same problem.

The user who starts the task is the server administrator, the same one that I am logged in as.

If I set the task to start when a user is logged in, then the main form appears. It seems that if you set the task to start even if there is no user logged in, it start as a service so it will not show any form.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Fernando
  • 349
  • 2
  • 6
  • 21

1 Answers1

0

Have you tried making a short-cut to the 'exe' file and placing that into the 'startup' folder? You can do it via the registry too but maybe first just try the shortcut in startup folder.

Get your startup folder, at START|RUN type shell:startup then drop your program shortcut into there. Restart and try....

video.baba
  • 817
  • 2
  • 6
  • 11
  • The problem is that is a Server. The program have to start even if a user is not logged in. – Fernando Mar 16 '18 at 09:34
  • The program is run on a Server? I don't do any server/client stuff but if it runs on a server then at start-up it would run irrelevant of clients logged in? Wouldn't it? I'm guessing by the way... – video.baba Mar 16 '18 at 09:46
  • The problem is that, if i copy a short-cut in the all users folder, the program only will run when a user, no matter who, log into the server. I need that the program start even if there is no users logged in. – Fernando Mar 16 '18 at 09:51
  • I just discover something new. If i set the task to start when a user log in, then the main form apears. It seems that when you setup the task to start even if there is no users logged in, it starts as a service, so it wont show any form. – Fernando Mar 16 '18 at 10:04
  • Again, I don't do any server/client stuff but is Task Scheduler the correct place to start a program on startup? Maybe some other users will join in and offer advice. I'm curious now, Interested to know the correct procedure :-) – video.baba Mar 16 '18 at 10:11
  • 1
    If there is no user logged on, what is the point of showing a form? – Chris Dunaway Mar 16 '18 at 13:17
  • @ChrisDunaway The program shows a log of everything it has been doing. Also qhen the user logged in, should be able to use the program. – Fernando Mar 16 '18 at 13:23