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
holo88

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
Brink

64-bit Windows 10 Pro
 
 

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
oreo27

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
holo88

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
Brink

64-bit Windows 10 Pro
 
 

That's great news C..

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

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
Thread Forum
Using .cmd Batch Files
I use RoboCopy in .cmd Batch files, is there a way to exit like "Exit Sub" in Visual Basic Is it possible to do Visual Basic like Logic Statements? Would it be possible to, within the batch file, determine whether a Drive Letter exists, Then run robocopy if it does?
General Discussion
Batch files?
hello guys im new to this forum. I'm trying to write a simple batch file which copies a couple of files from a network address to mulitple directories on the C:\ of different pc's eg xcopy from lets say A:\source.file to PC1 (directory user 1 folder, user 4 folder, user 7 folder, default)...
General Discussion
batch files
Can I write simple batch files - example - at 3am xcopy server file to workstation a ?
Software
batch renamming files
Hi, Does anyone know of a program or a fast way to rename filenames similar to this partial list 1bbea_set01_112432_019.jpg 1mbi5_set01_112432_016.jpg 3ppi_set01_112432_022.jpg 3scst_set01_112432_007.jpg 4chxb_set01_112432_017.jpg 5yvc5_set01_112432_006.jpg
General Discussion
batch files - run as administrator
I am a software developer (dot net). Until recently I did all my work in the XP environment. I developed a utility library that goes into the global assembly cache. In the XP world this was easy. I write some .bat files that called the gacutil.exe and passed it the appropriate parameters. ...
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 02:42.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App