Another batch file permissions problem

paul1149

New member
Guru
Local time
11:41 AM
Messages
1,025
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
dell precision t3400 tower
OS
Linux Lite 3.2 x64; Windows 7, 8.1
CPU
Core2Duo 2.4
Memory
6GB ddr2
Graphics Card(s)
nVidia
Hard Drives
120gb SSD, 1TB HD, 2TB HD; sata II
Internet Speed
12/2
Browser
Vivaldi, Slimjet (Chromium) 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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Alienware Aurora ALX R4
OS
Windows 10 Pro (x64)
CPU
Intel Core i7-3930K (3.2GHz - 4.5GHz)
Motherboard
Alienware Aurora-R4 x79
Memory
4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz)
Graphics Card(s)
Nvidia Geforce GTX 690
Sound Card
SteelSeries Siberia Elite
Monitor(s) Displays
Dell UltraSharp U3011
Screen Resolution
2560x1600
Hard Drives
Samsung 850 Pro 256 GB, Seagate 1TB Desktop Hybrid HDD, 2x Western Digital 4TB Green HDD
PSU
875W Some Dell PSU <.<
Case
Alienware Aurora ALX
Cooling
Custom Liquid Cooling (EK CPU & GPU blocks) dual EK 480RAD
Keyboard
Logitech G710+ Mechanical
Mouse
Logitech G700s
Internet Speed
Verizon Fios (50 mbps average)
Other Info
Server: Intel NUC D54250WYK: i5-4250U, 16GB, 256 GB mSATA, Windows Server 2012 R2
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
dell precision t3400 tower
OS
Linux Lite 3.2 x64; Windows 7, 8.1
CPU
Core2Duo 2.4
Memory
6GB ddr2
Graphics Card(s)
nVidia
Hard Drives
120gb SSD, 1TB HD, 2TB HD; sata II
Internet Speed
12/2
Browser
Vivaldi, Slimjet (Chromium) x64

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
dell precision t3400 tower
OS
Linux Lite 3.2 x64; Windows 7, 8.1
CPU
Core2Duo 2.4
Memory
6GB ddr2
Graphics Card(s)
nVidia
Hard Drives
120gb SSD, 1TB HD, 2TB HD; sata II
Internet Speed
12/2
Browser
Vivaldi, Slimjet (Chromium) 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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
dell precision t3400 tower
OS
Linux Lite 3.2 x64; Windows 7, 8.1
CPU
Core2Duo 2.4
Memory
6GB ddr2
Graphics Card(s)
nVidia
Hard Drives
120gb SSD, 1TB HD, 2TB HD; sata II
Internet Speed
12/2
Browser
Vivaldi, Slimjet (Chromium) x64
Back
Top