Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduling task to run interactive

Status
Not open for further replies.

lardum

IS-IT--Management
Apr 26, 2000
462
SE
How do i schedule a task in Windows 2000 to run interactive?

I've tried with the task scheduler and also AT command but it wont work. The process appears in the process list but i want the software to be shown on the desktop.

Anyone have any ideas?
 
That's pretty normal in my experience. The only luck I ever have with interactive, is to start a cmd prompt, then from there, do what you need to do.
The AT command is also very picky on the location in the command of the /interactive prompt

EX: AT 01:42 /interactive cmd (starts cmd prompt at 01:42 as the system account)

Be advised too, that running interactive may not achieve your goals since the /interactive switch simply causes a program that is scheduled to start using the LocalSystem account instead of a specified account, or the currently logged in account.

So with all of that being said:
1. Make sure you can run the program you are attempting to start with the LocalSystem account (do the command above, then run your program from that command line to start it as system) - if your program requires domain or local SAM authentication, then it likely will fail to run properly.
2. Are you sure you want to run the program with the SYSTEM account


Alot of people have a misunderstanding of what the interactive switch actually does (not saying you are one), in that many think it simply allows a scheduled task to appear, but in actuality, it allows the task to appear as SYSTEM.


The typical usage I use /interactive for is when attempting to troubleshoot a DC where all looks ok, but it may be getting an access denied in replication, or something similar. This allows me to perform commands from the SYSTEM command prompt, or start programs as the SYSTEM account from the SYSTEM cmd prompt.


This should do the trick for you though (using cmd and running ipconfig command which writes to text file):

at 13:00 /interactive cmd /C "ipconfig.exe > c:\ipconfig.txt"

Notice the program being opened is not surrounded in quotes, nor is its switch, but the parameter for the switch (the actual work or command being ran) is enclosed in quotes in order to accomodate spaces and ensure no invalid syntax returns.



-Brandon Wilson
MCSE:Security00/03
MCSA:Messaging00
MCSA:Security03
A+

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top