Como o programa precisa ser elevado para acessar todos os sensores, é necessário confirmar com o UAC toda vez que você o iniciar.
A mensagem que você está recebendo apresenta programas que não são assinados por código. Parece um pouco menos intimidante quando o programa é assinado, mas ele ainda aparecerá .
Existe uma maneira (um tanto hacky) para conseguir o que você deseja:
Another way
... is described in How to Create a Elevated Program Shortcut without a UAC Prompt
This solution requires you to create a 'scheduled' task for the application and running the app means triggering the task. (For a detailed description with screenshots see the link):
Run the Task Scheduler via
taskschd.msc
and Create Task...
- Tab General: Give the name
[Name]
to the new task, check Run with highest privileges and choose "Windows 7, Windows Server 2008 R2" from the dropdown list Configure for- Tab Actions: Add New... Action Start a program with Program/script =
%windir%\System32\cmd.exe
and Add arguments =/c start "[Name]" "C:\Program Files\Sample\Program.exe"
. Substitute[Name]
with the name of the task (step 1) and the fill in the path to the program which should run elevated.- Tab Conditions: Uncheck Stop if the computer switches to battery power first, and then uncheck Start the task only if the computer is on AC power
Create a new shortcut oh the desktop or wherever with the following target location
schtasks /run /tn "[Name]"
Once again,
[Name]
is the name of the task (step 1)! Run as Minimized if you don't want the command window to flash up.This shortcut and task can only be created and work while logged in as an administrator account. It'll not work in a standard user account.