Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download - Clean, repair and optimize your system



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

UAC and batch files

microsoft.public.windows.vista.general




Recommended Fix - Fix Vista Errors and Optimize Performance

Click On Your Flag for Translation
Simplified Chinese French Spanish Italian Portugeuse Japanese German Dutch
Driver Scanner 2009 - Free Scan Now
Reply
  #1 (permalink)  
Old 12-12-2007
Wildcat
 

Posts: n/a
UAC and batch files
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-12-2007
Julian
 

Posts: n/a
Re: UAC and batch files
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" <rwhelan@shaw.ca> wrote in message
news:4816DA22-6461-481E-A0F9-D4433EA4ABC1@microsoft.com...
>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.
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-12-2007
Wildcat
 

Posts: n/a
Re: UAC and batch files
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" <msforums@tiger2.demon.co.uk> wrote in message
news:%23Rg604NPIHA.1208@TK2MSFTNGP03.phx.gbl...
> 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" <rwhelan@shaw.ca> wrote in message
> news:4816DA22-6461-481E-A0F9-D4433EA4ABC1@microsoft.com...
>>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.
>>

>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-12-2007
Julian
 

Posts: n/a
Re: UAC and batch files
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" <rwhelan@shaw.ca> wrote in message
news:5C12A77A-F1F4-4FB5-A646-277B20FC04AF@microsoft.com...
> 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" <msforums@tiger2.demon.co.uk> wrote in message
> news:%23Rg604NPIHA.1208@TK2MSFTNGP03.phx.gbl...
>> 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" <rwhelan@shaw.ca> wrote in message
>> news:4816DA22-6461-481E-A0F9-D4433EA4ABC1@microsoft.com...
>>>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.
>>>

>>

>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

vB 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
running batch files... maya microsoft.public.windows.vista.general 12 08-23-2007 02:26
Batch renaming of mp3 files RSMBob microsoft.public.windows.vista.general 2 07-01-2007 05:19
Vista block batch files from being unzipped Francois PIETTE microsoft.public.windows.vista.administration accounts passwords 12 06-26-2007 18:10
Running Batch Files in VISTA Peeky microsoft.public.windows.vista.general 8 06-24-2007 13:43
batch converter for video files ACarbonneau microsoft.public.windows.vista.music pictures video 2 05-07-2007 15:29




All times are GMT +1. The time now is 04:28.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com and Win7Heads.com.


Funny Commercials to make you laugh :-)

Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119