Solved

schedule auto windows logon and run an application in the foreground

Posted on 2007-03-17
8
527 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
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
 
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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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…

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now