Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Admin rights for batch

16 Aug 2010   #1
MPREv

Windows 7
 
 
Admin rights for batch

I got a batch script which needs Admin privileges.
For example it installs some Programmes or move/copy files to/from System directories.

So on Windows 7 (and Vista) I can say "Run as" and I got a Message like "are you sure allowing ... bla" OK/Cancel?
But how I can get arround this MSG-Box?
How can I place the Admin Name/PW in the Batchfile? (a runas cmd i allready tried seems to don't work)


My System SpecsSystem Spec
.

16 Aug 2010   #2
osholt

Windows 7 Profesional x86, Mac OS X 10.6 Snow Leopard
 
 

As far as I am aware you are asking the impossible., or at least the stupendously difficult

You can however turn off UAC prompts completely so you just have to do Run as Administrator and it's done.

Another neat trick is start a program from within an elevated program (such as a dock); all programs opened using an elevated program themselves are automatically elevated .

Oli
My System SpecsSystem Spec
16 Aug 2010   #3
Thorsen

Win7 Home Premium 64x
 
 

Crtl+Shift+Mouse Click will launch the app with admin priveledges.

Otherwise, you can make a shortcut to the .bat file that has admin priveledges through this tut:

Elevated Program Shortcut without UAC Prompt - Create
My System SpecsSystem Spec
.


16 Aug 2010   #4
StuberB

MAC OS X v10.4.10
 
 

I have an idea. I am not sure if this would work with batch file or if you would even want to do this? You might be able to set it up so the user would take ownership of the batch. Once the user 'takes ownership' then they won't get the prompt to enter admin/pw. Let me know if you need details on how to do this and I will provide them for you.
My System SpecsSystem Spec
16 Aug 2010   #5
osholt

Windows 7 Profesional x86, Mac OS X 10.6 Snow Leopard
 
 

Quote   Quote: Originally Posted by StuberB View Post
I have an idea. I am not sure if this would work with batch file or if you would even want to do this? You might be able to set it up so the user would take ownership of the batch. Once the user 'takes ownership' then they won't get the prompt to enter admin/pw. Let me know if you need details on how to do this and I will provide them for you.
Please correct me if I am wrong but I believe you are confusing two different things.

Permissions &

Elevated verification (UAC, it's a security feature).

He already owns the file, Windows is just insisting that to run it as an Administrator you have to go through a UAC prompt.

Since Vista all normal command prompt Windows have been with normal user privileges only unless you specify to open it as an Admin (yet another security feature).

I hope this clears things up, and if I've got anything wrong please correct me .

Oli
My System SpecsSystem Spec
16 Aug 2010   #6
StuberB

MAC OS X v10.4.10
 
 

I re-read the orginial problem and went through Thorsen solution and I agree this is what is needed to prevent UAC prompt for admin rights . . . I was suggesting a solution for a different problem. . . you are correct osholt
My System SpecsSystem Spec
16 Aug 2010   #7
osholt

Windows 7 Profesional x86, Mac OS X 10.6 Snow Leopard
 
 

Quote   Quote: Originally Posted by StuberB View Post
I re-read the orginial problem and went through Thorsen solution and I agree this is what is needed to prevent UAC prompt for admin rights . . . I was suggesting a solution for a different problem. . . you are correct osholt
Don't worry, we all make mistakes. As long as you learn from them it's fine .

Have a nice day/night.

Oli
My System SpecsSystem Spec
Reply

 Admin rights for batch




Thread Tools





Similar help and support threads
Thread Forum
Admin Rights
Hi everyone I have 2 user in my system one is my user and second is administrator ... so when i get full rights on my user through change permission flow then it shows me error.. how to resolve this http://oi59.tinypic.com/2z4zr7d.jpg :huh:
System Security
"Unable to elevate to admin rights" error, when admin user
I am trying to download Adobe Digital Editions and I keep receiving the error message Unable to elevate to administrative rights, error 786 I am the admin! I have turned off the password, I have right clicked on the program and chosen 'run as admin'-then nothing happens. Any help would be...
Software
admin user lost some admin rights
I can't delete a file from the desktop. When I try, it says to get the rights from the specified admin user (which I'm logged on). The strange thing is that I still can create other users from this account (including admins). Any suggestion on what to do?
BSOD Help and Support
Admin rights
Hi, I am a beginner and don't understand the logic of Windows Admin rights: 1. I am the adminstrator (the system control confirms that). Still I can not save a txt file under programs (in that case: under Thunderbird Mozilla / Chrome). WHY? 2. The problem exists even when I individually...
General Discussion
Why does every app need admin rights?
Hi, I upgraded this week from Win XP (via new install, formatted drive C) to Win 7 Home Premium, currently 6.1.7600 Build 7600. For years, I have followed a method of using the C: partition for the system, and D: and E: for my application data. C: and E: are two partitions on hard disk 1, a...
General Discussion
No admin rights
HI everyone , Just want to say i enabled the hidden administrator account in windows 7 from the command prompt and i was trying to install dreamscene, but still it gives me you have no admin rights...what to do? ALso theres another problem....a software CVAVR...when iwas installing it , got...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 18:23.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App