Re: Scheduled task, ran interactively ?
- From: andyjgw <andyjgw@xxxxxxxxx>
- Date: Thu, 04 Oct 2007 00:57:00 -0700
Thanks Pegasus
I twigged the same answer just after I posted. I had thought that AT
was originally from the NT4 resource kit, and didn't realise it had
survived through on to XP. Surprised to see it in Vista as well, I
thought schtasks had replaced all that. The one PC I tried to see if
AT was still there didn't have it, but it has been well mucked about
with so I guess that's no surprise. (Though a shame schtasks had
removed the functionality- why ??)
Re the unexpected shutdowns, that's what the user interface is for -
we are developing a system that will shut down the clients PCs (at the
clients request) around 7pm each night. However, the user interface
will give them a 15-minute warning, offering to cancel, shutdown
immediately, or launch a request (via webpage) do set up a permanent
postpone for such operations (ie, don't shut down tonight, don't
shutdown till next Monday, don't shutdown until <date>, or "never
shutdown this machine").
Of course, clients will be well notified that this is the system. For
what that's worth...
It's interactive and users have control over their machines, but this
is just to nudge people along. We are up over 4000 machines, and at
that scale, there are potentially some savings to be made. We're also
producing reports by AD OU on sites, shutdowns forced, shutdowns
delayed etc so the client can see what the rewards are.
But yes, you're right - even though this is at client's request, we do
expect to take some heat for it initially.... But that's what IS
Client services are for :)
Here's hoping the Word/Excel etc auto-saves are all they're cracked up
to be :P
Thanks again
AW
On 3 Oct, 21:09, "Pegasus \(MVP\)" <I....@xxxxxxx> wrote:
"andyjgw" <andy...@xxxxxxxxx> wrote in message
news:1191422640.473568.57130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
Here's what I'm trying to do:
Create a scheduled task that will be installed via group policy as a
computer startup script, that will run at a certain time a day and
interact with the currently logged on user.
The task creation and such works fine, but I'm stuck in that the task
runs with local SYSTEM privileges and thus the user never sees the
interface (actually, an HTA html application pop up).
I've tried messing around with /U and /RU switches with "schtasks /
create" to no avail. If I specify the user, then it prompts for that
user's password - and the problem with that anyway is that if User A
puts in their password, but User B happens to be the one logged on
when the task runs, then they won't get anything.
IIRC, the old "AT" command had a "/interactive" switch, which would
work great. But that doesn't seem to be in the schtasks on my machine.
Is there not some option to create the task as system and have it
interact with whoever is logged on? It doesn't need to impersonate
them or anything (and I would prefer it didn't - as the outcome is
that if the user doesn't respond to the interactive prompt, then the
SYSTEM account will shut the machine down for them).
Clients are Windows XP, mostly SP2, if that helps. We have most MS
tools available here as MSDN subscribers in case a simple .cmd/.vbs
etc won't do.
Thanks for any help, it would be much appreciated.
AW
The command
at 23:00 /interactive c:\tools\UserPrompt.bat
works quite nicely on my WinXP PC.
On a related subject: I suspect that your popularity rating will
take a dip after the first few users have lost their files because
you shut down their machines while they were away from their
desks, perhaps while working late and stepping out for a
quick meal.
.
- References:
- Scheduled task, ran interactively ?
- From: andyjgw
- Re: Scheduled task, ran interactively ?
- From: Pegasus \(MVP\)
- Scheduled task, ran interactively ?
- Prev by Date: Re: changing drive install letter from d to c
- Next by Date: Re: Xcopy not working in startup script
- Previous by thread: Re: Scheduled task, ran interactively ?
- Next by thread: Scheduled task, ran interactively ?
- Index(es):
Relevant Pages
|