Solved

schedule auto windows logon and run an application in the foreground

Posted on 2007-03-17
8
524 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

744 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