Windows UAC, Admin prompt, Run Application with current user rights - windows-7

I want to use a Application on Windows 7 without Admin priviliges.
(Sure for the install process i used Admin priviliges)
Now i had following problem:
When i want to start the application the UAC popup ask for an Admin Account to run the program. But the User had no Admin account and can only click "No" so the Application is closed.
Is it possible to use this application with the rights from the current user and deactivate the UAC prompt?
On Win XP, only popup a error message that the application had no admin priviliges.
But by selecting "Ok" the application is starting and working.

You need to create and embed a manifest into your application. This tells the operating system that your program was written to be compatible with the UAC built into Windows Vista (and later), and therefore does not need to be run as Administrator. Set the requested execution level to asInvoker.
See this article on MSDN for more details.
There's also a helpful, though somewhat more general, article that appeared in the MSDN Magazine regarding UAC: Teach Your Apps To Play Nicely With Windows Vista User Account Control

Related

Launch my application before the Windows logon screen

In a personal project, I want to display my application before (or above) the Windows Logon, ie just before entering the Windows password.
The application must "hide" the password entry screen. I used to launch an application at Windows startup but this after viewing the Windows desktop.
Is it possible to do this please? Should I create a Windows service that will launch my application?
Thanks for your help
If this is just a personal project on your own machine you could set Windows to autologon and then just run your application like a normal startup shortcut.
A NT service is the only documented way to run code before a user logs on. However, spawning a new process in another session and interacting with the Winlogon desktop and putting yourself on top of LogonUI.exe is going to be a hack.

Windows printscreen not working on Software Installation

I am trying to take screenshots of the license information of the application before installing it onto my test window os.
When I click on the installer, the publisher window pops up asking me whether I want to launch the installer or not; But when I want to take screenshots or printscreen using keyboard shortcuts it doesn't work.
It seems that the keyboard shortcuts is disabled during this pop up install dialog.
All I want is to take screenshots at the publisher certificate information before installing the application.
Can anyone with experience on windows help?
UAC: If you are referring to the UAC prompt that shows up first to ask for elevation, then it happens on a secure desktop separate from your main one and hence the screen shot appears impossible. This separate desktop is a security measure. In actual fact it is perhaps the core security measure added to Windows in recent years (don't turn it off permanently).
Disable UAC Temporarily: You can disable this security measure temporarily so you can take a screenshot as described here: How to get a UAC screenshot. Here is a sample screen shot of a UAC prompt for an MSI installation: Numeric file name for msi created with Wix
Here is the essential procedure inlined:
Run gpedit.msc
Locate: Computer Configuration\Windows Settings\Security Settings\Local Policies\SecurityOptions:
Change "User Account Control: Switch to the secure desktop when prompting for elevation" to disabled
Undo this change after the screenshot or your system will be very insecure!

Why application that require administrative privileges cannot run automatically on Windows startup(windows 7)?

I have a application(which runs on windows7 and requires run as administrative) that need to run automatically when windows starts up, so i added a registry key under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" as usual, but my application won't startup automatically even the UAC dialog doesn't promtp, after search from google. I know i can use task scheduler to workaround this, but is there anyboday can tell me why the "run" registry way doesn't work? why the UAC dialog doesn't promtp? it is better if you can help to find a article from microsoft to explain this issue, many thanks in advance!
It is for making the machine usable as quick as possible after booting.
Microsoft Whitepaper: Developing Applications that Run at Logon on Windows Vista
When Windows starts, there is no user to show the UAC prompt to, so your process would have to be held up until an administrative user logs in.
The Task Scheduler is the right way to do what you want.

Programmatically extend/customize the windows logon prompt

Is the windows (XP, Vista, 7) logon box extensible ? Is there an "logon box" analog to windows shell extensions ?
As a made up example, I have a windows host with one shared account used by my team. I want my team members to be able to login to the host desktop by solving a captcha. I would like to modify the logon box to do this (instead of say, having an autologon and then being shown a fullscreen captcha program)
To customize the logon window, you have to create a Credential Provider in Vista/7, and a GINA dll in XP.

Security center symbol shield with my Application Icon

I have developed an application that needs admin rights to execute. Running the application on Windows 7, the user always have to launch the application as "Run as Administrator" otherwise my application prompts the user that "you don't have administrative rights etc...". This is OK and understandable because of UAC in windows 7.
To get rid that the user have to set the application as "Run as Administrator". I updated my application's "app.manifest" and set
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Which done the job for me.
But now, a security center symbol shield appears with my application's icon.
Now my question is "Why does this icon appear on my application, and what does it indicate?"
I tried marking another of my applications to "Always Run as Administrator" via windows but the same icon wouldn't appear with that application.
I want to understand the reasons and scenarios.
The shield is there to remind the user that if they double-click the exe to run it, they will get a UAC dialog. These dialogs should never be a surprise and if you get one you weren't expecting, you should really not consent to it.
The shield appears if you have a manifest that requests elevation (requireAdministrator or highestAvailable, but not if your manifest specifies asInvoker), and for certain file names. For more details see my blog entry (written at Vista time, but still applies to Windows 7) and MSDN articles on UAC and UI guidelines.

Resources