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: Batch files and UAC

07 Feb 2011   #1

Windows 7 Ultimate x32
 
 
Batch files and UAC

Hi.

I have a small issue I hope can be resolved to a desired effect (if possible)

Whats happening is, I am using a software, that to be used "correctly" requires a parameter to run correctly (2.0 beta type app) Heres what im looking at:

The program is a neato reproduction of the HTC (awesome phone) clock widget, from HERE.

The issue is, due to is current development state, will not load it's taskbar icon, without the use of a command line parameter. Which is kind of lame tbh. So I made up a quick little .bat that will start the program, with the icon. (yay for me)

Heres where the security issue comes in. The .exe does NOT have any compatibility settings enabled, but when the program runs, UAC still pops up, making it a chore to use a damn clock.

What i want to do is, if possible, add a line to the batch that will skip/disable the UAC check for the app, so that when I click on it, it just starts... that all.

Here is what the batch is made up of (I'll post screenys if it's necessary)
Code:
@echo off
start HTCHome.exe -addicon
exit
Pretty simple, but it works. Is there any way to skip the permission check, without disabling UAC, or something I'm doing wrong here?

Addition relevant info:
Im Admin, and entire folder w/ app is 'owned'
Specs and windows are up to date, all requirements are meet.
program is 32bit, no special compat. settings in place.
anything wle, just ask.

My System SpecsSystem Spec
.

07 Feb 2011   #2
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hello C.,

You might see if you may be able to create and use a elevated task shortcut in the tutorial below to run in your .bat file instead to hopefully have it run elevated without getting a UAC prompt with UAC turned on still.

Elevated Program Shortcut without UAC Prompt - Create

You might be able to just use the commands in the TIP box under step 14 for the new task in the .bat file instead of having to actually create the shortcut.

Hope this may help,
Shawn
My System SpecsSystem Spec
07 Feb 2011   #3

Windows 7 Ultimate x64 Service Pack 1
 
 

That's quite odd. I use HTCHome too. But I never need the UAC on startup. To get the icon, I simply edit the shortcut that it creates in the startup folder, adding-addicon.

I'm not at home but I'll investigate more when I do get home.
My System SpecsSystem Spec
.


08 Feb 2011   #4

Windows 7 Ultimate x32
 
 

Thanks fellas. I got it working, seemed to be one file was blocked, and causing the UAC prompt, and the app not saving my settings. That and a clean install of the app to make sure everything was there. So, it's all good now.

Its awesome. Just last night, we had some weather, and every time it would start snowing or raining, the app plays an animation, as if it 'knew'. Very cool Imo.
My System SpecsSystem Spec
08 Feb 2011   #5
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

That's great news C..

Very neet little weather app.
My System SpecsSystem Spec
09 Feb 2011   #6

Windows 7 Ultimate x64 Service Pack 1
 
 

You're welcome mate. Although I stand corrected. There is no entry in the startup folder. Instead, I saw the entry in msconfig. I'm glad you sorted it out. Cheers!
My System SpecsSystem Spec
Reply

 Batch files and UAC




Thread Tools



Similar help and support threads for2: Batch files and UAC
Thread Forum
batch files Software
batch renamming files General Discussion
Delate, rename through batch files? General Discussion
batch files - run as administrator General Discussion
Are batch files allowed? 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 12:30 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