Clean up files and UAC

B

Bill

I've been scratching my head over this one for a while now.

In XP I created a simple batch file to run at startup that would clear
out the Windows\Temp folder of any junk that gets left behind by
various programs. I can get the batch file to run and it works fine,
but I can't figure out how to run it so that User Account Control will
let it run without asking for confirmation. I've Googled till my
fingers bleed, but I can't find anything that will let me configure a
single file so that UAC does not block it.

Is there a setting that will allow a program to run without UAC
blocking it?

Or is there a way to run Disk Cleanup without user intervention and so
UAC doesn't block it? Perhaps as a scheduled task?

Thanks.
 
A

Andre Da Costa[ActiveWin]

I would recommend adding it as a Scheduled Task, since programs get Admin
priviledges that way on startup.
 
B

Bill

Andre Da Costa said:
I would recommend adding it as a Scheduled Task, since programs get
Admin priviledges that way on startup.

Whew, the scheduler is somewhat buggy. It took a bit of tweaking to
get it to work, but I finally managed to get the task to work properly
at startup.

Thanks for the startup hint.
 
B

Bill

Andre Da Costa said:
What bugs?

The most obvious one is that the task would not run because the
network was not available, but that option was not enabled or
specified in the task, so it should not affect the startup. Here's the
error:

Task Scheduler could not start task "xxx" because the network was
unavailable. User Action: Ensure the computer is connected to the
required network as specified in the task. If the task does not
require network presence, remove the network condition from the task
configuration.

Oddly enough, the network status was "unchecked" in the task and still
is now. I got around it by adding a delay to the start of the task so
the network could magically become available.

Another one was the logon status:

Task Scheduler did not launch task "xxx" because user "xxx" was not
logged on when the launching conditions were met. User Action: Ensure
user is logged on or change the task definition to allow launching
when user is logged off.

The funny thing is, I had it set to run only when the user is logged
on, so how can it launch a task before the user is logged in? I got
around it with the delay as well.

There was another one for a different task, but I can't remember what
the error was or exactly when, so I can't easily find it in the event
log.
 

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

Similar Threads

UAC and batch files 3
Trouble with UAC 3
UAC in RC2 2
UAC and a programme 6
How to modify "Program Files" from the command prompt with UAC on? 3
UAC 4
UAC consent message 1
UAC prompt for some app only 4

Top