Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > UAC and batch files

Reply
Thread Tools Display Modes

UAC and batch files

 
 
Wildcat
Guest
Posts: n/a

 
      12-12-2007
I am trying to run a batch file at startup that turns UAC off. It runs fine
if UAC is already off but access is denied if it is not already off. This
was not the intention of the .bat file. I am using Home Premium and it
seems that Windows Defender turns UAC on when it is run and then I have to
turn it off manually and re-boot. Too much time. Anyone know how to stop
the access denied? I tried permissions on the USERS folder to no avail.

 
Reply With Quote
 
 
 
 
Julian
Guest
Posts: n/a

 
      12-12-2007
Use the Task Scheduler to run your batch file - you will be able to give it
elevated permissions there and there will be no UAC prompt: you could use
e.g. a delay of 30s from log-on as the trigger. This is the only way I know
of running apps that require elevated privileges without getting the UAC
prompt at run time, and I use it successfully to start a couple of
applications that Defender otherwise blocks (of course the "offending" apps
are also removed from the Startup group otherwise there would still be the
Defender nag from the systray/"Notification area"

Hope that helps...

--
Julian I-Do-Stuff

Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
"Wildcat" <> wrote in message
news:4816DA22-6461-481E-A0F9-...
>I am trying to run a batch file at startup that turns UAC off. It runs
>fine if UAC is already off but access is denied if it is not already off.
>This was not the intention of the .bat file. I am using Home Premium and
>it seems that Windows Defender turns UAC on when it is run and then I have
>to turn it off manually and re-boot. Too much time. Anyone know how to
>stop the access denied? I tried permissions on the USERS folder to no
>avail.
>


 
Reply With Quote
 
Wildcat
Guest
Posts: n/a

 
      12-12-2007
Thanks, it sort of helped but it still requires another boot after running
the batch file [which contains C:\Windows\System32\cmd.exe /k
%windir%\System32\reg.exe ADD
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Pol icies\System /v EnableLUA
/t REG_DWORD /d 0 /f ] in order to actually turn UAC off. I tried a
second batch file run upon logon to reboot (shutdown -r -t 0) but I got
into a perpetual reboot situation which required an Acronis restore to get
out of. Any idea how to get the second boot only if UAC is turned on?







"Julian" <> wrote in message
news:%...
> Use the Task Scheduler to run your batch file - you will be able to give
> it elevated permissions there and there will be no UAC prompt: you could
> use e.g. a delay of 30s from log-on as the trigger. This is the only way I
> know of running apps that require elevated privileges without getting the
> UAC prompt at run time, and I use it successfully to start a couple of
> applications that Defender otherwise blocks (of course the "offending"
> apps are also removed from the Startup group otherwise there would still
> be the Defender nag from the systray/"Notification area"
>
> Hope that helps...
>
> --
> Julian I-Do-Stuff
>
> Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
> "Wildcat" <> wrote in message
> news:4816DA22-6461-481E-A0F9-...
>>I am trying to run a batch file at startup that turns UAC off. It runs
>>fine if UAC is already off but access is denied if it is not already off.
>>This was not the intention of the .bat file. I am using Home Premium and
>>it seems that Windows Defender turns UAC on when it is run and then I have
>>to turn it off manually and re-boot. Too much time. Anyone know how to
>>stop the access denied? I tried permissions on the USERS folder to no
>>avail.
>>

>


 
Reply With Quote
 
Julian
Guest
Posts: n/a

 
      12-12-2007
Whoa! Didn't realise that you were turning off UAC by poking the
registry...! And I don't know whether turning UAC on or off usually requires
a reboot - though I doubt it... but maybe.

If there is no command line interface that supports UAC control (Don't Ask
Me - I Dunno) you could perhaps make your "reboot" batch file conditional on
the registry value - so that after a restart after UAC OFF it does not
restart the system again... but again as to how - DAM-ID (sorry)

Didn't know that Defender re-enabled UAC... can you confirm that? I wonder
if you have Real Time Protection on and "System Configuration (Settings)"
checked - that *might* look on UAC being off as "unexpected and undesirable"
and undo it...

However, after much head scratching I am obliged to ask Why? Why do you need
to turn UAC off? It is worth keeping - a slight annoyance perhaps but if you
run an Administrator account (instead of limited user) all you have to do is
click to OK actions - rather than enter the admin password... it's not so
bad... (I can't believe I just said that, but I did)

--
Julian I-Do-Stuff

Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
"Wildcat" <> wrote in message
news:5C12A77A-F1F4-4FB5-A646-...
> Thanks, it sort of helped but it still requires another boot after running
> the batch file [which contains C:\Windows\System32\cmd.exe /k
> %windir%\System32\reg.exe ADD
> HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Pol icies\System /v
> EnableLUA /t REG_DWORD /d 0 /f ] in order to actually turn UAC off.
> I tried a second batch file run upon logon to reboot (shutdown -r -t 0)
> but I got into a perpetual reboot situation which required an Acronis
> restore to get out of. Any idea how to get the second boot only if UAC is
> turned on?
>
>
>
>
>
>
>
> "Julian" <> wrote in message
> news:%...
>> Use the Task Scheduler to run your batch file - you will be able to give
>> it elevated permissions there and there will be no UAC prompt: you could
>> use e.g. a delay of 30s from log-on as the trigger. This is the only way
>> I know of running apps that require elevated privileges without getting
>> the UAC prompt at run time, and I use it successfully to start a couple
>> of applications that Defender otherwise blocks (of course the "offending"
>> apps are also removed from the Startup group otherwise there would still
>> be the Defender nag from the systray/"Notification area"
>>
>> Hope that helps...
>>
>> --
>> Julian I-Do-Stuff
>>
>> Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
>> "Wildcat" <> wrote in message
>> news:4816DA22-6461-481E-A0F9-...
>>>I am trying to run a batch file at startup that turns UAC off. It runs
>>>fine if UAC is already off but access is denied if it is not already off.
>>>This was not the intention of the .bat file. I am using Home Premium and
>>>it seems that Windows Defender turns UAC on when it is run and then I
>>>have to turn it off manually and re-boot. Too much time. Anyone know
>>>how to stop the access denied? I tried permissions on the USERS folder
>>>to no avail.
>>>

>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
In Vista, can .wps files be converted to .rtf files as a batch i.e.instead of one at a time? Mike Arnold Windows Vista General Discussion 4 03-20-2008 12:43 PM
Asking permission and batch files Rene Grothmann Windows Vista General Discussion 3 03-06-2008 03:05 PM
running batch files... maya Windows Vista General Discussion 12 08-23-2007 01:26 AM
Batch renaming of mp3 files RSMBob Windows Vista General Discussion 2 07-01-2007 04:19 AM
Windows RAM drive and batch files Michael Windows Vista General Discussion 5 02-08-2007 10:40 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59