-
Apr 9th, 2018, 10:02 PM
#1
Thread Starter
PowerPoster
[RESOLVED] Windows task scheduler executing .net exe, but my program window not visible
i scheduled my vb.net windows application to run at some intervals by windows task scheduler.
the programs executing fine and doing it's job but in the back ground, i mean the main window of the program is not visible !!, why it is & how to fix it please
-
Apr 9th, 2018, 10:06 PM
#2
Re: Windows task scheduler executing .net exe, but my program window not visible
Task Scheduler let's you specify whether to execute the action only if the specified user is logged in or regardless of whether they're logged in. Which did you choose? I'm not 100% sure but I suspect that if you choose the former then it will run the application in that user's session but if you choose the latter then it won't, because it can't if the user isn't logged in.
-
Apr 9th, 2018, 10:16 PM
#3
Re: Windows task scheduler executing .net exe, but my program window not visible
By the way, this question really has nothing to do with VB.NET. If you can run your app normally and it runs normally then it's not an issue with the app. Obviously the issue is with the Task Scheduler. The issue would be the same regardless of what language the app was written in.
-
Apr 9th, 2018, 10:16 PM
#4
Thread Starter
PowerPoster
Re: Windows task scheduler executing .net exe, but my program window not visible
Sir thanks for the reply
(1) i have opted Run whether user is logged in or not
(2) Hidden check box is unchecked
(3) & Run with highest privileges is checked
-
Apr 9th, 2018, 10:21 PM
#5
Re: Windows task scheduler executing .net exe, but my program window not visible
Originally Posted by make me rain
i have opted [I][B]Run whether user is logged in or not
One thing I didn't even ask was whether you had specified yourself as the user under which to run the application. If you didn't then of course you can't see it. Why would you see applications being run by other users?
If you did specify your account as the one to run the application then, as I said in my first reply, I suspect that the fact that you chose to run the app whether you're logged in or not is the issue. If the app runs when you're not logged in then obviously you can't see it then, so it probably doesn't bother about showing it to you ever. If the app can run without you seeing it then logic dictates that you seeing it is not important so it doesn't need to show it to you ever. If you do need to see it then it makes no sense to have it run when you're not logged in, so you should change that option and then, I suspect, the app will be run under your interactive session.
-
Apr 9th, 2018, 10:23 PM
#6
Thread Starter
PowerPoster
Re: Windows task scheduler executing .net exe, but my program window not visible
question really has nothing to do with VB.NET. If you can run your app normally and it runs normally then it's not an issue with the app.
the application executing normally when i manually execute the .exe and the program main window opens, but while with task scheduler the main window disappears but the program executes.
Sorry i missed one info , that i am using background worker in my application does it have any side effect !
-
Apr 9th, 2018, 10:29 PM
#7
Thread Starter
PowerPoster
Re: Windows task scheduler executing .net exe, but my program window not visible
I suspect that the fact that you chose to run the app whether you're logged in or not is the issue. If the app runs when you're not logged in then obviously you can't see it
my system is having only one user, but let me check it
-
Apr 9th, 2018, 10:33 PM
#8
Re: Windows task scheduler executing .net exe, but my program window not visible
If you can run the application normally from VS or by double-clicking the EXE then there's nothing wrong with your app. This is solely about Task Scheduler.
1. Have you specified your account in the task under which to run the app?
If not then you will not see the app when it runs, which should be fairly obvious. You see apps you run, not apps other users run.
2. Do you need to see the app when it runs?
If you do need to see the app when it runs, how does it make sense to configure the task to run even if you're not logged in? If you don't need to see the app, I don't see what the issue is in the first place.
3. If you configure the task to run only when you're logged in, do you see the app when the task runs?
I suspect that you will, which means that you have to configure it that way if you want to see it. Again, how does it make sense to configure it otherwise anyway, if you need to see it when it runs?
-
Apr 9th, 2018, 10:34 PM
#9
Re: Windows task scheduler executing .net exe, but my program window not visible
Originally Posted by make me rain
my system is having only one user, but let me check it
That's irrelevant. The system can still be running without that one user being logged in, so the app would still run then. If the only time someone will be logged is that one user and you don't want the app run when that one user is not logged in then you should have specified to run the task only when that user is logged in to begin with.
-
Apr 9th, 2018, 10:34 PM
#10
Thread Starter
PowerPoster
Re: Windows task scheduler executing .net exe, but my program window not visible
Oooooh
Superb that's the matter
i have Changed the option to run Only when the user logged on
And it's done
thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|