Solved

schedule auto windows logon and run an application in the foreground

Posted on 2007-03-17
8
532 Views
Last Modified: 2008-02-07
Experts,
Is there any way to schedule a logon to windows server 2003 at a certain time everyday, run an application in the foreground, then logoff by itself ? Note that I do not want to reboot the machine to trigger auto logon every time.

I cannot find any solution that can resolve this.  Is this possible with the combination use of VB script, batch file,  .NET programing and/or windows configuration ?

0
Comment
Question by:jshao825
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 11

Expert Comment

by:AnthonyP9618
ID: 18741660
Will Task Scheduler work?  Task Scheduler will run any CMD, VBS, BAT file you through at it.  I'm don't believe that it will run any .NET scripts though.

http://www.microsoft.com/technet/prodtechnol/windows2000serv/maintain/featusability/tsksched.mspx
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18742083
Sure - but why do you 'have' to hvae it logon?

If you're using W2k3 - it's easy with schtasks...

Schtasks /create /ru system /st 09:00:00 /sc daily /tn DailyTask /tr "C:\path to file\file.exe"
0
 

Author Comment

by:jshao825
ID: 18747854
I have to have W2k3 logon because it is an automated application that opens another application to simulates user clicks.    

I am new to this.  what part of this command tells the W2k3 to logon to the desktop ? I want to see the interaction when programs run

Schtasks /create /ru system /st 09:00:00 /sc daily /tn DailyTask /tr "C:\path to file\file.exe"

I know that    /ru   runs the tasks with the permission of the specified user account in the background, not in the foreground ?


0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18747918
No, the above doesn't log on a user.
If you want to accomplish this on a scheduled basis, I only see one method of doing so...

Reboot - system auto-logs on after reboot, runs your script as part of the logon process, then waits until it's near time to run again and reboots.

I'm fairly certain there's no way to schedule a logon and logoff.
You can schedule a logoff to occur at a certain time, but not a subsequent logon without utilizing the auto-logon feature at boot up...
0
 

Author Comment

by:jshao825
ID: 18748314
I am trying to avoid rebotting each time it is schedule to run as well...  

Speaking of logoff.  If the automated application is running for more than 2 hrs, then I want to force a logoff.   How can I achieve that ?
0
 
LVL 67

Assisted Solution

by:sirbounty
sirbounty earned 500 total points
ID: 18748353
I don't really know much about your application, but there is a native command, logoff, that you could schedule to run at 2 hours after your application.

logoff

will log off the current session...
0
 
LVL 12

Expert Comment

by:RubenvdLinden
ID: 18748584
What is the purpose of simulating the mouse-clicks (there might be a workaround to do the task which performs when you simulate the mouseclicks)?
0
 
LVL 1

Expert Comment

by:laquangthong
ID: 23070477
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question