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: Another batch file permissions problem


24 Dec 2010   #1

Win7 Ult. 32bit
 
 
Another batch file permissions problem

Just recently there was a batch file permissions problem posted here. I'm also trying to run a command window, but my problem is a bit different.

I have a batch file that cleans out programs' cache before shutting down the system, that I use every night to sign off. Since I demoted my normal user account from Admin, I'm incurring a permissions problem. The batch will fire, but only after I give it the UAC OK. That's as expected.

I'd like to eliminate the need for the UAC OK for this program. But whether I give ownership of the Batch file to the super-admin or to my user account, the Run as administrator option on the Properties/Compatibility tab is grayed out. There simply seems to be no way to give this program residual admin rights.

I'd like to be able to crack this nut, not just for this program but in order to learn more about how permissions work.

Thanks,
p.

My System SpecsSystem Spec
.

24 Dec 2010   #2

Windows 8.1 Pro (x64)
 
 

Use Task Scheduler to run the batch file using a higher privileged account when you log off.
Or have it run when you log on.
My System SpecsSystem Spec
24 Dec 2010   #3

Win7 Ult. 32bit
 
 

Thanks, but there are a couple of problems with that.
  • I can't find the way to tie an event to Shutdown. Maybe it's done via Event IDs?
  • Second, I don't really want to tie my batch to Shutdown, shutdown is already tied to the batch. I don't fire the batch every time I shutdown.
  • I'd rather not fire the batch on startup, when I'm already waiting for the machine to be available.
  • Finally, I'd like to know what's going on with this permissions problem, as it doesn't seem to me to be logical.
p.
My System SpecsSystem Spec
.


24 Dec 2010   #4

Windows 8 Core X64
 
 

My System SpecsSystem Spec
24 Dec 2010   #5

Win7 Ult. 32bit
 
 

Thanks. I remember seeing that post. Regarding this problem, I have tried it at the shortcut level too (which is how I fire the batch), and the option is grayed out there as well. I have UAC active, set to the third notch, or "normal" setting, so are you sure about that part of your post?

p.
My System SpecsSystem Spec
25 Dec 2010   #6

Windows 8 Core X64
 
 

Well, apparently it doesn't always work that way. I just tried it myself and it was till grayed out, but ... found this and it does work.

If you are accessing the properties of a shortcut, then you click the
"advanced..." button on the shortcut tab, and there is a checkbox there "Run
as administrator" that you use to make the shortcut to always ask for your
permission when you double-click on it.

Now I get the UAC prompt when I double click on the batch file link. Not what you were looking for but it does then run as Administrator.
My System SpecsSystem Spec
25 Dec 2010   #7

Win7 Ult. 32bit
 
 

Yes, I failed to include that that was the first thing I had done. It's easy to get lost in the permissions labyrinth. I do get the UAC query, and once I OK it I can run the batch. But so far there's no way to give a batch file residual admin rights.

Thanks,
p.
My System SpecsSystem Spec
Reply

 Another batch file permissions problem




Thread Tools



Similar help and support threads for2: Another batch file permissions problem
Thread Forum
Giving Automatic Permissions to Folders Created Using a Batch File General Discussion
Batch file related problem,Pls help General Discussion
Solved Batch File that grabs file names from folder to insert into batch file General Discussion
Problem with file/folder permissions System Security
Batch file problem General Discussion
Problem with file permissions - help! 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 04:39 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

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