Results 1 to 10 of 10

Thread: [RESOLVED] Windows task scheduler executing .net exe, but my program window not visible

  1. #1

    Thread Starter
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    Resolved [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
    The averted nuclear war
    My notes:

    PrOtect your PC. MSDN Functions .OOP LINUX forum
    .LINQ LINQ videous
    If some one helps you please rate them with out fail , forum doesn't expects any thing other than this

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    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.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    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.

  4. #4

    Thread Starter
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    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
    The averted nuclear war
    My notes:

    PrOtect your PC. MSDN Functions .OOP LINUX forum
    .LINQ LINQ videous
    If some one helps you please rate them with out fail , forum doesn't expects any thing other than this

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Windows task scheduler executing .net exe, but my program window not visible

    Quote Originally Posted by make me rain View Post
    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.

  6. #6

    Thread Starter
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    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 !
    The averted nuclear war
    My notes:

    PrOtect your PC. MSDN Functions .OOP LINUX forum
    .LINQ LINQ videous
    If some one helps you please rate them with out fail , forum doesn't expects any thing other than this

  7. #7

    Thread Starter
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    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
    The averted nuclear war
    My notes:

    PrOtect your PC. MSDN Functions .OOP LINUX forum
    .LINQ LINQ videous
    If some one helps you please rate them with out fail , forum doesn't expects any thing other than this

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    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?

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Windows task scheduler executing .net exe, but my program window not visible

    Quote Originally Posted by make me rain View Post
    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.

  10. #10

    Thread Starter
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    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.
    The averted nuclear war
    My notes:

    PrOtect your PC. MSDN Functions .OOP LINUX forum
    .LINQ LINQ videous
    If some one helps you please rate them with out fail , forum doesn't expects any thing other than this

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width