It is currently Fri May 24, 2013 4:15 am



Register for Windows Forums


New posts Register

Register for Windows Forums now to gain access to: post messages, download free books, competitions for great prizes, and get to know others. Members also see NO ADVERTS. Join today!




 Page 4 of 4 [ 34 posts ]  Go to page Previous  1, 2, 3, 4
Message Author
 
 Post subject: Re: Start batch file as administrator?
New postPosted: Sat Oct 08, 2011 6:38 am 

ahhh i see the last one

/v OEMBackground /t REG_DWORD /d 1 /f
making me crazyy

anyway Thankss



_________________
Image
Years of membershipYears of membership
User avatar
Contributor
Contributor
Windows Guru
Windows Guru

Joined: Sat Aug 21, 2010 2:08 pm
Posts: 1499
Thanks given: 121 times
Thanks received: 261 times
Location: UVAIS-PC
OS: 7 Ultimate
 Profile E-mail  
 
Offline
 
 Post subject: Re: Start batch file as administrator?
New postPosted: Mon Oct 10, 2011 11:20 am 

Stu check this out and let me know what you think,

http://fixitwizkid.com/threads/start-batch-file-as-administrator.6157/#post-42363



_________________
Image
Years of membershipYears of membership
User avatar
Top Content Contributor
Top Content Contributor

Joined: Mon Nov 15, 2010 7:20 pm
Posts: 565
Thanks given: 47 times
Thanks received: 132 times
Location: UK
OS: 8 RT
 Profile E-mail  
 
Offline
 
 Post subject: Re: Start batch file as administrator?
New postPosted: Tue Oct 11, 2011 12:46 pm 

Makcalable wrote:


Thanks to TazDevilLooney, but I can't get that code to work for me. It doesn't pass any arguments when relaunched elevated.

This is probably a more robust way of checking permissions:

whoami /groups | find "S-1-16-12288" >nul
if "%errorlevel%"=="0" (
    echo elevated
    ) else (
       echo not elevated
        )


Last edited by Stu on Tue Oct 11, 2011 10:06 pm, edited 1 time in total.


_________________
Image
Years of membershipYears of membershipYears of membershipYears of membership
User avatar
Site Admin
Site Admin
Windows Guru²
Windows Guru²

Joined: Sat Jun 07, 2008 9:08 am
Posts: 3186
Thanks given: 375 times
Thanks received: 441 times
Location: 0x7C00
OS: 8 RT
 Profile E-mail  
 
Offline
 
 Post subject: Re: Start batch file as administrator?
New postPosted: Tue Oct 11, 2011 1:21 pm 
For this post the author Makcalable has received gratitude : Stu

Ok Stu message passed on ;-)



_________________
Image
Years of membershipYears of membership
User avatar
Top Content Contributor
Top Content Contributor

Joined: Mon Nov 15, 2010 7:20 pm
Posts: 565
Thanks given: 47 times
Thanks received: 132 times
Location: UK
OS: 8 RT
 Profile E-mail  
 
Offline
Display posts from previous:  Sort by  
 Page 4 of 4 [ 34 posts ]  Go to page Previous  1, 2, 3, 4


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: