Scheduled Tasks

B

bsbm525

Hello,

I logged onto a Windows XP SP2 client using a 'Standard User' account & then
added 'Disk Cleanup' as a 'scheduled task' using a different 'Admin' acct.
(NOTE: I am still logged on as a Standard User)

When the Disk Cleanup scheduled task starts, the disk cleanup popup doesn't
appear and when I view the scheduled task under the scheduled tasks folder in
Control Panel it's status states it's running but it just stays there and
nothing else happens.

Is there a resolution for this?
I am trying to avoid giving the user Admin permissions if possible to run
scheduled tasks.

Thanks....
 
P

Pegasus \(MVP\)

bsbm525 said:
Hello,

I logged onto a Windows XP SP2 client using a 'Standard User' account &
then
added 'Disk Cleanup' as a 'scheduled task' using a different 'Admin' acct.
(NOTE: I am still logged on as a Standard User)

When the Disk Cleanup scheduled task starts, the disk cleanup popup
doesn't
appear and when I view the scheduled task under the scheduled tasks folder
in
Control Panel it's status states it's running but it just stays there and
nothing else happens.

Is there a resolution for this?
I am trying to avoid giving the user Admin permissions if possible to run
scheduled tasks.

Thanks....

This is the expected behaviour: Scheduled tasks that run under an
account other than your own will run invisibly in the background.
If they require some user interaction then you must not run them
in this way.
 
B

bsbm525

Do you know a way around this without giving the user Admin rights?
3rd party app?
Thanks....
 
P

Pegasus \(MVP\)

You could invoke it in a batch file with the "runas" command,
but since this involves recording the admin's password in the
batch file, you would create a big security hole.

The question is, of course, why you would want to run Disk
Cleanup frequently. You will find that running it often will make
no measurable difference to the performance of your PC other
than giving you a warm feeling inside, so why bother?
 
B

bsbm525

Well I do find it when disk cleanup is run once a month it does help the
performance especially when removing temp & temp internet files for starters.

Thanks.
 
V

VanguardLH

in message
I logged onto a Windows XP SP2 client using a 'Standard User'
account & then
added 'Disk Cleanup' as a 'scheduled task' using a different 'Admin'
acct.
(NOTE: I am still logged on as a Standard User)

When the Disk Cleanup scheduled task starts, the disk cleanup popup
doesn't
appear and when I view the scheduled task under the scheduled tasks
folder in
Control Panel it's status states it's running but it just stays
there and
nothing else happens.

Is there a resolution for this?
I am trying to avoid giving the user Admin permissions if possible
to run
scheduled tasks.


When using RunAs to execute a program under a different account,
remember that you are NOT logged in under that account when the
scheduled job runs. You are running in under the OTHER account, not
yours, so where would its window be displayed? The other account is
not logged in so there is no desktop atop of which would appear the
program's window.

If they are admin-level jobs, why does a non-admin need to see
anything? It's not like they can do anything about it because
presumably you did not give the password to the user when the RunAs
option was enabled when defining the job.

Why does a disk cleanup job need to run under an admin-level account?
Why would you have a user account doing cleanup on other accounts to
which that user would not normally have permissions? Disk cleanup
should be a per-user task. If the users of the other accounts don't
log in for really long intervals, what would there be to cleanup that
the last cleanup didn't handle when they were logged in or were
scheduled to run under THEIR account at the scheduled time even when
they were not logged in?
 
B

bsbm525

For Disk Cleanup the user has to select which type of files to delete when
the selection screen popup appears to select files such as 'temp files', etc
after the initial scan. If it wasn't for that, then of course the task can
be run automatically with no user interaction.

These clients only has one main user not multiple and I am just trying to
figure out a way to run maintenance utilities automatically as scheduled
tasks without giving users local admin rights.
 
C

CurtB

You can remove Temporary Internet Files automatically.

Internet Explorer > Tools > Intenet Options > Advanced tab > In the Security
section, check the box for "Empty Temporary Internet Files folder when
browser is closed"
 
T

Terry R.

The date and time was 3/4/2008 12:46 PM, and on a whim, bsbm525 pounded
out on the keyboard:
Well I do find it when disk cleanup is run once a month it does help the
performance especially when removing temp & temp internet files for starters.

Thanks.

I put a batch file to clean temp folders on login into the All Users
startup folder, using the variable %TEMP% or %TMP% (may need both if the
path is different, but usually they're the same).

--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
 
V

VanguardLH

in message
For Disk Cleanup the user has to select which type of files to
delete when
the selection screen popup appears to select files such as 'temp
files', etc
after the initial scan. If it wasn't for that, then of course the
task can
be run automatically with no user interaction.

These clients only has one main user not multiple and I am just
trying to
figure out a way to run maintenance utilities automatically as
scheduled
tasks without giving users local admin rights.


The disk cleanup wizard can be automated without ANY user prompts.
Read Microsoft's KB article 315246. With policies, I assume you could
push the registry keys to have all users do the same set of cleanup
actions. Or you could use account logon scripts (to UNC pathed
network hosts) to retrieve a .reg file and run regedit in silent mode
(regedit.exe /s <regfile>) to get them into the user's copy of the
registry's .dat files. I don't know how you are pushing the .job file
for the scheduled task onto the user's hosts but that is probably also
possible.

As an end user of my own host with admin rights, I have a scheduled
task that runs the disk cleanup each week and I NEVER have to answer
any prompts. The scheduled task runs
"C:\WINDOWS\system32\cleanmgr.exe /sagerun:0" where I have previously
created the zero-named config set (use whatever config set number that
floats your boat).
 
B

bsbm525

thanks

VanguardLH said:
in message



The disk cleanup wizard can be automated without ANY user prompts.
Read Microsoft's KB article 315246. With policies, I assume you could
push the registry keys to have all users do the same set of cleanup
actions. Or you could use account logon scripts (to UNC pathed
network hosts) to retrieve a .reg file and run regedit in silent mode
(regedit.exe /s <regfile>) to get them into the user's copy of the
registry's .dat files. I don't know how you are pushing the .job file
for the scheduled task onto the user's hosts but that is probably also
possible.

As an end user of my own host with admin rights, I have a scheduled
task that runs the disk cleanup each week and I NEVER have to answer
any prompts. The scheduled task runs
"C:\WINDOWS\system32\cleanmgr.exe /sagerun:0" where I have previously
created the zero-named config set (use whatever config set number that
floats your boat).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top