Solved

schedule auto windows logon and run an application in the foreground

Posted on 2007-03-17
8
530 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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Process running 3 61
Access 2013: API code to put hidden database icon in taskbar? 8 96
Hibernate on windows 10 18 171
What namespace do I need to import? 2 48
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…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…

685 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