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
paul1149

Linux Lite 3.2 x64; Windows 7, 8.1
 
 
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
logicearth

Windows 10 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
paul1149

Linux Lite 3.2 x64; Windows 7, 8.1
 
 

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
Ztruker

Windows 10 Pro X64
 
 

My System SpecsSystem Spec
24 Dec 2010   #5
paul1149

Linux Lite 3.2 x64; Windows 7, 8.1
 
 

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
Ztruker

Windows 10 Pro 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
paul1149

Linux Lite 3.2 x64; Windows 7, 8.1
 
 

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
Thread Forum
Is batch-updating of File Permissions possible?
I had a Windows 10 laptop with an external USB hard drive attached. The external drive has a folder with hundreds of jpg images. The laptop failed and is no longer usable. I connected the external drive to a Windows 7 desktop and from there I can see the folder and all the files, but under...
General Discussion
Problem modifying hosts file, change file permissions?
Hi all,win7 Home Premium 64 bit. I'm having difficulties modifying my hosts file. Following guidance from this forum, I open Notepad++ as administrator & can navigate to and open the hosts file. But the "Save" option is greyed out, so I can't save directly to the original location. I can Save As...
General Discussion
Giving Automatic Permissions to Folders Created Using a Batch File
So I have a batch file set up to create folders and subfolders. These folders are created on a shared server that several employees access. The idea is to run the batch to create a set of folders for each new customer. This keeps all of the files for the customer in one spot rather than...
General Discussion
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
Batch file problem
I have made a word game in notepad and saved it off as a batch file. Whenever I open this batch file it flashes onto the screen for a second and then goes away. Any solutions?
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 10:15.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App