Re: Scheduled task, ran interactively ?



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.


.



Relevant Pages

  • Re: Giving shutdown rights to somebody
    ... ]but it is not my decision to take the machines down on weekend. ... Unfortunately the command is to power off all machines at ... Why do you not just write a cron to run the shutdown script at say 6PM ... Use either shutdown -h or halt to do so. ...
    (comp.os.linux.security)
  • Re: Install Patch at shutdown
    ... The same Desktop Authority's inactivity ... programs when shutdown even will happen on client computer. ... can create a list which software you want to install for your students ... and it will be automatically installed on their machines when they'll ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Problem: Kernel Panic/Oops on shutdown with 2.6.9 and Dell Optiplex SX280
    ... > Are you running some kind of sniffer tool on these machines. ... > into the shutdown scripts which may help the search. ... In fact there are 5 init scripts which could trigger the bug. ...
    (Linux-Kernel)
  • Re: Install Patch at shutdown
    ... To do this on multiple machines you can use ... If your shutdown script doesn't work try running gpresult, ... should choose 'Install Updates and Shut Down' option within Computer ...
    (microsoft.public.windowsxp.security_admin)
  • Past SP2 lsass.exe High Utilization
    ... I now have 2 systems post SP2 with a very odd problem. ... He would get the shutdown menu and select either shutdown or restart ... When I went to look at the machines while they were doing these odd things I ...
    (microsoft.public.windowsxp.help_and_support)