Author Topic: Windows always asks permission to run this program - why?  (Read 4506 times)

bryanh

  • Newbie
  • *
  • Posts: 6
Windows always asks permission to run this program - why?
« on: January 07, 2024, 01:50:38 AM »
Probably an old question but I didn't see it asked anywhere. VoiceAttack always causes Windows to ask the usual "do you want to allow this program to make changes" question - even when run in administrator mode. Why does it do that? All other programs simply run. It's just annoying and I'm sure it doesn't have to be that way. It's always done that for me. Windows 10 - fully up-to-date.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4763
  • RTFM
Re: Windows always asks permission to run this program - why?
« Reply #1 on: January 07, 2024, 02:04:25 AM »
It should only do that when you have configured VoiceAttack to run as administrator, either through the built-in "Run VoiceAttack as an Administrator" option, or through other means, like the compatibility tab for the executable.

This is a Windows feature. Any normal application you attempt to run as administrator should cause the prompt to be shown.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: Windows always asks permission to run this program - why?
« Reply #2 on: January 07, 2024, 01:04:51 PM »
Probably an old question but I didn't see it asked anywhere. VoiceAttack always causes Windows to ask the usual "do you want to allow this program to make changes" question - even when run in administrator mode. Why does it do that? All other programs simply run. It's just annoying and I'm sure it doesn't have to be that way. It's always done that for me. Windows 10 - fully up-to-date.

When you run applications as admin in Windows with UAC (User Account Control) higher than "Never notify", Windows will pop up that Yes/No choice box.  This is standard and recommended.

However, you can bypass this by launching an application with elevated permissions through the Windows Task Scheduler system.  This allows us to create a customized shortcut to launch VoiceAttack through a Task rather than executing the program directly, thus bypassing any user prompt Yes/No choice.

I have detailed the procedure to create such a shortcut in the following post - any questions, feel free to ask:
How to Launch VoiceAttack as Admin with no UAC prompt - Task Method
« Last Edit: January 09, 2024, 02:16:58 PM by SemlerPDX »

bryanh

  • Newbie
  • *
  • Posts: 6
Re: Windows always asks permission to run this program - why?
« Reply #3 on: January 09, 2024, 02:08:41 AM »
Thanks for the replies. I guess I'm dumb but I don't get it. I am the boss of this machine. My login is admin level. I have now turned off run as admin in the properties and also in the options. There have been no special UAC's set up or anything - it is just standard default installation. Still happens. No other program does this. My music editor, treesize, macrium - none of them do this. ONLY VoiceAttack. Games, HitFilm, Reaper, all work fine without requiring this extra approval. I don't see why I should need to create special methods to run VA when NO other program requires that.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4763
  • RTFM
Re: Windows always asks permission to run this program - why?
« Reply #4 on: January 09, 2024, 02:18:21 AM »
VoiceAttack doesn't require it either. Nor does VoiceAttack run as administrator by default.

If you're seeing a UAC prompt, Windows has determined you need additional privileges to perform the given instruction.
UAC is a standard Windows feature, that applies to administrator accounts as well. It has been that way since Windows Vista.


Did you use the default installation directory?

Are you asked for credentials when the UAC prompt shows up, rather than just Yes/No buttons?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Windows always asks permission to run this program - why?
« Reply #5 on: January 09, 2024, 09:10:23 AM »
VoiceAttack is a Windows application.  The only way VoiceAttack will run as an administrator is if it is set to run as an administrator.  It will not do this on its own- it must be done by the end user.

A common way is through the VoiceAttack Options screen > System/Advanced tab when the 'Run VoiceAttack as an Administrator' option is checked.

Another common way is by right-clicking on the VoiceAttack.exe, select 'Properties'  (at the bottom), over to the 'Compatibility' tab and checking the option 'Run this program as an administrator'.

Yet another way is if you are running VoiceAttack from a shortcut and the shortcut has been set up to run the target app as an administrator.

If you are running VoiceAttack through the Steam client and the client is running VoiceAttack as an administrator, try running VoiceAttack from its installed location (usually C:\Program Files (x86)\Steam\steamapps\common\VoiceAttack), checking the various items indicated above. 

If none of these items apply, you've got a condition on your machine that is not common and is not accounted for.  Please let us know what you find.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: Windows always asks permission to run this program - why?
« Reply #6 on: January 09, 2024, 02:22:36 PM »
...
I don't see why I should need to create special methods to run VA when NO other program requires that.

To be clear, the method I shared was specifically for running VA as admin to bypass the UAC pop-up which dims the screen and presents a yes/no prompt which must be interacted with.

There is NO reason to create such special methods for programs which do not present a UAC pop-up, as obviously this means these programs are not being run with elevated permissions "as admin".  This is an important distinction, as Gary noted above.

Just wanted to be sure we're all on the same page.  If you launch VoiceAttack and see the UAC pop-up you described in your first post, this means that it is being launched with elevated permissions "as admin".


Some, but not all, public profiles or plugins may require VA to be run as admin - the special method I suggested is a very helpful quality of life tip to create a shortcut which CAN launch this (or any program) as admin without the UAC pop-up interfering with the launch of said program.  I use this same method to launch TeamSpeak3 with radio mods for Arma 3, so I don't need to confirm the launch, and for VoiceAttack when using profiles/plugins which require elevated permissions, such as my AVCS CORE profile framework.

bryanh

  • Newbie
  • *
  • Posts: 6
Re: Windows always asks permission to run this program - why?
« Reply #7 on: January 11, 2024, 03:56:02 AM »
Appreciate keeping it going folks - maybe I'll finally get to the bottom of this. I'm fully willing to accept the old ID 10T error if it works out to be, but for the life of me I can't see it.
I'd like to insert some images to show that I am not, as far as I can tell, running in admin level. Don't believe I need to. But I can't seem to be able to drop an image here. How does that work? Can I just Ctrl-V? Or if I use the insert icon what does it expect? A file name? Don't know how to do it.
So I'll just attach a file or two. I can't get a copy of the uac pop-up - Windows won't allow a print-screen or allow running snip or anything useful while that pop-up is on screen. Sigh.
Anyway, it is the yes/no prompt for allow the app to make changes to your device.
So - in summary - I am NOT running as admin as you can see from the attached snips. To the best of my knowledge I am not trying to do anything tricky with raised uac levels or anything - just a standard default install.



Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4763
  • RTFM
Re: Windows always asks permission to run this program - why?
« Reply #8 on: January 11, 2024, 01:38:50 PM »
If you right-click either the shortcut or the executable, and click the "Compatibility" tab, is the "Run this program as an administrator" option checked?


If not, go to the "Details" tab in Windows task manager, right-click one of the column headers (E.G. "Name") and choose "Select columns", check the box for "Elevated" (you'll likely need to scroll down a ways), click "OK", then launch VoiceAttack and check whether "Yes" is shown in the elevated column, on the row for VoiceAttack.exe

bryanh

  • Newbie
  • *
  • Posts: 6
Re: Windows always asks permission to run this program - why?
« Reply #9 on: January 12, 2024, 05:44:27 PM »
OK so there is yet ANOTHER place where Admin mode can be set. Jeez - will the unnecessary complexity never end? Anyway, I had no compatibility tab when I right click the icon. There are no tabs when you right click an icon - you get a list, right? However, if I go into properties and choose the compatibility tab then certainly - there is another place where run as admin can be checked, and guess what? It was indeed set. So I unset it and tried again. This time I got a warning from Windows - "Windows security may prevent VA from working". Holy cow - now what? I'll try this out and let you know. I have no idea whether or not Elite Dangerous runs in admin mode or not but I would hope not. I suspect that back in the day when I first got VA (a long time ago) I probably saw this warning and didn't know what to do so to be cautious I followed the advice so helpfully provided by Windows and set Admin on in compatibility mode. Which then started up all the problems with the continuation of further warnings from Windows. It's a crazy loop. Anyway, will advise what happens. Thanks to Pfiel and all.

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: Windows always asks permission to run this program - why?
« Reply #10 on: January 12, 2024, 06:02:29 PM »
...
Anyway, I had no compatibility tab when I right click the icon. There are no tabs when you right click an icon - you get a list, right?
...

An "icon" is not necessarily an application.  It could be a shortcut to the application.  Typically, the application will end with an extension such as .exe

A shortcut to an application may not have any extension, however if it does, it is not functional and merely part of the name of this "icon".  Its job is to launch an application at the path specified in the target properties of the shortcut, and can have independent settings for launching an application as admin - when set to run as admin, it can override the application it launches (the actual executable such as "voiceattack.exe"), even if that executable was not set to run as admin.

As you have reported, it is important to uncheck this 'Run as admin' box for the application itself (the "voiceattack.exe" file in the VoiceAttack program folder, wherever it is installed), as well as for any desktop shortcuts, or shortcuts on the taskbar or start menu.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4763
  • RTFM
Re: Windows always asks permission to run this program - why?
« Reply #11 on: January 13, 2024, 01:30:35 AM »
I got a warning from Windows - "Windows security may prevent VA from working"
That warning is shown by VoiceAttack itself, however it's intended not as a mandatory setting, but rather to remind users that if an application doesn't appear to be responding to input, that may be because it requires VoiceAttack to run as administrator (Windows prevents applications that aren't running as administrator from interacting with those that are)

Unless you actually run into such an application, and you're sure that said application is actually required to run as administrator to be functional, there should be no need to run VoiceAttack as administrator.

bryanh

  • Newbie
  • *
  • Posts: 6
Re: Windows always asks permission to run this program - why?
« Reply #12 on: January 14, 2024, 03:09:46 AM »
I see. Thanks all. I have tested it thoroughly now. Without the admin level VA can successfully send commands to ED so it seems that we are good now. Gosh though - 3 places where run as admin is set. Talk about overkill. Now I have had to turn off the message, a so-called pro tip, regarding NOT running in admin mode - which then showed up inside VA in the window as well. So then I had to turn that off. It just never seems to end. Anyhow, I believe I am all good now and I really appreciate all the help.

I have to wonder though - how did all this happen? And given that it did, how can app developers expect the average plebe to be able to deal with all this? My dear old Ma isn't going to have a chance handling this kind of thing. I realise security is needed though. But couldn't coders these days (I used to be one back in the day before I retired) consider this stuff? For example, couldn't the program detect its own uac level? And detect the level of the program messages are being sent to, i.e. what is in the current window? And then observe that the app is lower than the receiving program so there is likely going to be a problem? And maybe reporting it then? Rather than put up messages that are totally meaningless to the average user and who will panic and not know what to do. Surely there must be a way to deal with this in code?

Oh well, what do I know? I'm just an old fart who is used to thinking things right through before placing a hand on the kb - lol.

I'm good now. Thanks again everybody.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Windows always asks permission to run this program - why?
« Reply #13 on: January 14, 2024, 11:15:56 AM »
Setting an application to run as an administrator directly through the properties of the executable itself is there so that no matter what, the executable will run as an administrator when launched.

Setting an application to run as an administrator through a shortcut means you can have one shortcut that runs a target app as an administrator and another shortcut that does not.

There's a setting within VoiceAttack (way in the back, last tab of the Options) as a convenience feature so that Ma does not have to dig through the above-mentioned properties to run as an admin (if absolutely needed).

VoiceAttack starts off with these warning messages as an indication that if things do not work, you might want to consider running it as an administrator.  Essentially, 'Hey, if you're using VA and certain things do not work on your machine, you might want to try this.'   This is in direct response to many users running their target applications (like E:D and Star Citizen) as an administrator (for almost always the wrong reason or no reason at all), and then either writing lengthy emails/forum posts/reviews about how VoiceAttack does not work no matter what they do.  What is actually happening is Windows is preventing VoiceAttack (or any application not running as an admin) from accessing an application that IS running in an admin security context (again, probably for no good reason).  Most people do not understand that this is actually a thing that Windows does to protect you from rogue applications as there is no message from Windows to the user when the access fails, and there is absolutely no indication through the API if the input is blocked that can even be relayed by VoiceAttack.  Adding code to check if the target is elevated and will not receive input adds way too much overhead and would add a significant performance penalty for the majority that do not need it (requiring yet another dreadful option to disable the check somewhere, which in turn would require some kind of warning message at startup about what to do about improving substandard performance o_O). 

Given all that, the simplest thing to do was to just let the user know what could be going on if things aren't working - add some kind of warning message at startup that the user can choose to close (btw, messages that do NOT show up if VA is already running as an admin - which is why one would see the messages when VA is not running as an admin).  As an aside, the warning messages have pretty much eliminated the stream of emails/forum posts/reviews, and has been in place for probably a decade or more now.  To be straight up, this is the first time I've heard about anybody having any kind of difficulty with this method.  I'll take it under consideration going forward, as this could just be the first of a lot of people having the same problem. 

Thank you for bringing this to my attention and I appreciate the suggestions.  Glad you're up and running now ;)

bryanh

  • Newbie
  • *
  • Posts: 6
Re: Windows always asks permission to run this program - why?
« Reply #14 on: January 14, 2024, 06:31:57 PM »
Cheers Gary - love your work.