Batch files and UAC


  1. Posts : 1,806
    Windows 7 Ultimate x32
       #1

    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 Computer


  2. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
       #2

    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 Computer


  3. Posts : 521
    Windows 7 Ultimate x64 Service Pack 1
       #3

    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 Computer


  4. Posts : 1,806
    Windows 7 Ultimate x32
    Thread Starter
       #4

    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 Computer


  5. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
       #5

    That's great news C..

    Very neet little weather app.
      My Computer


  6. Posts : 521
    Windows 7 Ultimate x64 Service Pack 1
       #6

    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 Computer


 

  Related Discussions
Our Sites
Site Links
About 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 11:15.
Find Us