PC Review


Reply
Thread Tools Rate Thread

Vista UAC interfering with operation of program

 
 
=?Utf-8?B?TWFyYw==?=
Guest
Posts: n/a
 
      17th Aug 2007
Hi,

The company I work for is developing a product that will auto launch a small
application (necessary for the usage of the product) when plugged into a USB
port. The application (an .exe file) resides on the device itself, and
Windows recognizes the device as a USB Mass Storage Device / CD-ROM.
Unfortunately, the way the product was developed, you have to be a local
administrator on the machine in order for it to work, at least for Windows
2000 and XP. When it comes to Vista, it seems being a local administrator
isn't enough, because for some reason the program still doesn't run with
administrative privileges and the end user receives an error. A work-around
I've discovered is to browse to the application .exe file and right click on
it and choose "run as administrator" (I'm then prompted with the UAC
allow/deny - but at least when I choose allow it work) but its annoying to
ask the end users to do this each and every time. Additionally, because its
set to auto-run, the program launches of the device each time its plugged in
and gives the user the administrative rights error. I've tried setting the
application .exe file on the device to always run as an administrator, but
for some reason when I do this and then next plug the device in, I get stuck
in a UAC allow/deny loop. If I copy the application .exe file to the
computer and set it to always run as an administrator, it works with only one
UAC allow/deny prompt, so I'm not sure why its looping when its set to always
run as administrator on the device itself. I'm looking for some sort of
work-around that doesn't require the end user to disable UAC and will
hopefully allow the end user to either go through one set of steps initially
and have it always work after that, or at least get a way to have it so that
initially the program doesn't launch in standard mode when plugged in and
give the user the administrative error. Any help is greatly appreciated. If
you have any questions, please feel free to ask. Thanks.

- Marc
 
Reply With Quote
 
 
 
 
Pete Delgado
Guest
Posts: n/a
 
      17th Aug 2007

"Marc" <(E-Mail Removed)> wrote in message
news:E1A839E1-047F-44A0-B0DA-(E-Mail Removed)...
> Hi,
>
> The company I work for is developing a product that will auto launch a
> small
> application (necessary for the usage of the product) when plugged into a
> USB
> port. The application (an .exe file) resides on the device itself, and
> Windows recognizes the device as a USB Mass Storage Device / CD-ROM.
> Unfortunately, the way the product was developed, you have to be a local
> administrator on the machine in order for it to work, at least for Windows
> 2000 and XP. When it comes to Vista, it seems being a local administrator
> isn't enough, because for some reason the program still doesn't run with
> administrative privileges and the end user receives an error. A
> work-around
> I've discovered is to browse to the application .exe file and right click
> on
> it and choose "run as administrator" (I'm then prompted with the UAC
> allow/deny - but at least when I choose allow it work) but its annoying to
> ask the end users to do this each and every time. Additionally, because
> its
> set to auto-run, the program launches of the device each time its plugged
> in
> and gives the user the administrative rights error. I've tried setting
> the
> application .exe file on the device to always run as an administrator, but
> for some reason when I do this and then next plug the device in, I get
> stuck
> in a UAC allow/deny loop. If I copy the application .exe file to the
> computer and set it to always run as an administrator, it works with only
> one
> UAC allow/deny prompt, so I'm not sure why its looping when its set to
> always
> run as administrator on the device itself. I'm looking for some sort of
> work-around that doesn't require the end user to disable UAC and will
> hopefully allow the end user to either go through one set of steps
> initially
> and have it always work after that, or at least get a way to have it so
> that
> initially the program doesn't launch in standard mode when plugged in and
> give the user the administrative error. Any help is greatly appreciated.
> If
> you have any questions, please feel free to ask. Thanks.


With UAC enabled even the administrator account has a "filtered" user token.
The effect of this filtering is that all but five user rights are unavailble
unless the user "elevates" the process in some manner to enable the full
privileges of the account. In your case, you right-clicked on the file and
chose "Run as Administrator" and you were then presented with the UAC
elevation prompt. This allowed the application to run underneath the full
credentials of the Administrator.

There are several methods that you can use to require the user to elevate a
process. Perhaps the easiest in your case would be to include a manifest
file with a trustInfo node and a requestedExecutionLevel equal to
requireAdministrator. This would automatically show the elevation prompt
when the program is started if running under UAC.

For more information, see:
http://weblogs.asp.net/kennykerr/arc...t-Control.aspx

Ultimately, you need to determine exactly whay and what privileges your
application is requesting and determine whether it truly needs them or not.
If not, you will need to modify your code so that you can remove the
elevation requirement from your product.

-Pete


 
Reply With Quote
 
=?Utf-8?B?TWFyYw==?=
Guest
Posts: n/a
 
      17th Aug 2007
Pete,

Thanks for the reply. I'm going to forward your suggestion to our
developers (regarding including a manifest file with a trustInfo node and a
requestedExecutionLevel equal to requireAdministrator). So basically if this
was done, everytime the program was started it would automatically be
elevated to administrative privileges and the UAC prompt would pop up?

Also, if this was done to the program, would it lose its backwards
compatibility to WinXP and Win2000?

Thanks again!

- Marc

"Pete Delgado" wrote:

>
> "Marc" <(E-Mail Removed)> wrote in message
> news:E1A839E1-047F-44A0-B0DA-(E-Mail Removed)...
> > Hi,
> >
> > The company I work for is developing a product that will auto launch a
> > small
> > application (necessary for the usage of the product) when plugged into a
> > USB
> > port. The application (an .exe file) resides on the device itself, and
> > Windows recognizes the device as a USB Mass Storage Device / CD-ROM.
> > Unfortunately, the way the product was developed, you have to be a local
> > administrator on the machine in order for it to work, at least for Windows
> > 2000 and XP. When it comes to Vista, it seems being a local administrator
> > isn't enough, because for some reason the program still doesn't run with
> > administrative privileges and the end user receives an error. A
> > work-around
> > I've discovered is to browse to the application .exe file and right click
> > on
> > it and choose "run as administrator" (I'm then prompted with the UAC
> > allow/deny - but at least when I choose allow it work) but its annoying to
> > ask the end users to do this each and every time. Additionally, because
> > its
> > set to auto-run, the program launches of the device each time its plugged
> > in
> > and gives the user the administrative rights error. I've tried setting
> > the
> > application .exe file on the device to always run as an administrator, but
> > for some reason when I do this and then next plug the device in, I get
> > stuck
> > in a UAC allow/deny loop. If I copy the application .exe file to the
> > computer and set it to always run as an administrator, it works with only
> > one
> > UAC allow/deny prompt, so I'm not sure why its looping when its set to
> > always
> > run as administrator on the device itself. I'm looking for some sort of
> > work-around that doesn't require the end user to disable UAC and will
> > hopefully allow the end user to either go through one set of steps
> > initially
> > and have it always work after that, or at least get a way to have it so
> > that
> > initially the program doesn't launch in standard mode when plugged in and
> > give the user the administrative error. Any help is greatly appreciated.
> > If
> > you have any questions, please feel free to ask. Thanks.

>
> With UAC enabled even the administrator account has a "filtered" user token.
> The effect of this filtering is that all but five user rights are unavailble
> unless the user "elevates" the process in some manner to enable the full
> privileges of the account. In your case, you right-clicked on the file and
> chose "Run as Administrator" and you were then presented with the UAC
> elevation prompt. This allowed the application to run underneath the full
> credentials of the Administrator.
>
> There are several methods that you can use to require the user to elevate a
> process. Perhaps the easiest in your case would be to include a manifest
> file with a trustInfo node and a requestedExecutionLevel equal to
> requireAdministrator. This would automatically show the elevation prompt
> when the program is started if running under UAC.
>
> For more information, see:
> http://weblogs.asp.net/kennykerr/arc...t-Control.aspx
>
> Ultimately, you need to determine exactly whay and what privileges your
> application is requesting and determine whether it truly needs them or not.
> If not, you will need to modify your code so that you can remove the
> elevation requirement from your product.
>
> -Pete
>
>
>

 
Reply With Quote
 
=?Utf-8?B?TWFyYw==?=
Guest
Posts: n/a
 
      17th Aug 2007
Pete,

Thanks for the reply. I'm going to forward your suggestion to our
developers (regarding including a manifest file with a trustInfo node and a
requestedExecutionLevel equal to requireAdministrator). So basically if this
was done, everytime the program was started it would automatically be
elevated to administrative privileges and the UAC prompt would pop up?

Also, if this was done to the program, would it lose its backwards
compatibility to WinXP and Win2000?

Thanks again!

- Marc

"Pete Delgado" wrote:

>
> "Marc" <(E-Mail Removed)> wrote in message
> news:E1A839E1-047F-44A0-B0DA-(E-Mail Removed)...
> > Hi,
> >
> > The company I work for is developing a product that will auto launch a
> > small
> > application (necessary for the usage of the product) when plugged into a
> > USB
> > port. The application (an .exe file) resides on the device itself, and
> > Windows recognizes the device as a USB Mass Storage Device / CD-ROM.
> > Unfortunately, the way the product was developed, you have to be a local
> > administrator on the machine in order for it to work, at least for Windows
> > 2000 and XP. When it comes to Vista, it seems being a local administrator
> > isn't enough, because for some reason the program still doesn't run with
> > administrative privileges and the end user receives an error. A
> > work-around
> > I've discovered is to browse to the application .exe file and right click
> > on
> > it and choose "run as administrator" (I'm then prompted with the UAC
> > allow/deny - but at least when I choose allow it work) but its annoying to
> > ask the end users to do this each and every time. Additionally, because
> > its
> > set to auto-run, the program launches of the device each time its plugged
> > in
> > and gives the user the administrative rights error. I've tried setting
> > the
> > application .exe file on the device to always run as an administrator, but
> > for some reason when I do this and then next plug the device in, I get
> > stuck
> > in a UAC allow/deny loop. If I copy the application .exe file to the
> > computer and set it to always run as an administrator, it works with only
> > one
> > UAC allow/deny prompt, so I'm not sure why its looping when its set to
> > always
> > run as administrator on the device itself. I'm looking for some sort of
> > work-around that doesn't require the end user to disable UAC and will
> > hopefully allow the end user to either go through one set of steps
> > initially
> > and have it always work after that, or at least get a way to have it so
> > that
> > initially the program doesn't launch in standard mode when plugged in and
> > give the user the administrative error. Any help is greatly appreciated.
> > If
> > you have any questions, please feel free to ask. Thanks.

>
> With UAC enabled even the administrator account has a "filtered" user token.
> The effect of this filtering is that all but five user rights are unavailble
> unless the user "elevates" the process in some manner to enable the full
> privileges of the account. In your case, you right-clicked on the file and
> chose "Run as Administrator" and you were then presented with the UAC
> elevation prompt. This allowed the application to run underneath the full
> credentials of the Administrator.
>
> There are several methods that you can use to require the user to elevate a
> process. Perhaps the easiest in your case would be to include a manifest
> file with a trustInfo node and a requestedExecutionLevel equal to
> requireAdministrator. This would automatically show the elevation prompt
> when the program is started if running under UAC.
>
> For more information, see:
> http://weblogs.asp.net/kennykerr/arc...t-Control.aspx
>
> Ultimately, you need to determine exactly whay and what privileges your
> application is requesting and determine whether it truly needs them or not.
> If not, you will need to modify your code so that you can remove the
> elevation requirement from your product.
>
> -Pete
>
>
>

 
Reply With Quote
 
Pete Delgado
Guest
Posts: n/a
 
      17th Aug 2007

"Marc" <(E-Mail Removed)> wrote in message
news:1B8E0098-5F04-4AFD-B8EC-(E-Mail Removed)...
> Pete,
>
> Thanks for the reply. I'm going to forward your suggestion to our
> developers (regarding including a manifest file with a trustInfo node and
> a
> requestedExecutionLevel equal to requireAdministrator). So basically if
> this
> was done, everytime the program was started it would automatically be
> elevated to administrative privileges and the UAC prompt would pop up?


Yes. However, depending upon your situation you may also wish to sign your
executable.

>
> Also, if this was done to the program, would it lose its backwards
> compatibility to WinXP and Win2000?


No. The trustInfo section of the manifest is ignored by previous operating
systems except for the following case:

http://support.microsoft.com/Default.aspx?kbid=921337

>
> Thanks again!


No problem.

-Pete



 
Reply With Quote
 
=?Utf-8?B?TWFyYw==?=
Guest
Posts: n/a
 
      21st Aug 2007
Thanks again for all the help. Is there any way we can avoid changing the
software, but rather make a setting change, etc. to Windows Vista (aside from
disabling UAC altogether) that would allow the software to run correctly when
it is first plugged in and auto-launched via auto-play. I've tried checking
the box under the properties for the .exe application to "always run this
program as an administrator" but this just creates a UAC elevation prompt
loop. Any help is greatly appreciated. Thanks.

"Pete Delgado" wrote:

>
> "Marc" <(E-Mail Removed)> wrote in message
> news:1B8E0098-5F04-4AFD-B8EC-(E-Mail Removed)...
> > Pete,
> >
> > Thanks for the reply. I'm going to forward your suggestion to our
> > developers (regarding including a manifest file with a trustInfo node and
> > a
> > requestedExecutionLevel equal to requireAdministrator). So basically if
> > this
> > was done, everytime the program was started it would automatically be
> > elevated to administrative privileges and the UAC prompt would pop up?

>
> Yes. However, depending upon your situation you may also wish to sign your
> executable.
>
> >
> > Also, if this was done to the program, would it lose its backwards
> > compatibility to WinXP and Win2000?

>
> No. The trustInfo section of the manifest is ignored by previous operating
> systems except for the following case:
>
> http://support.microsoft.com/Default.aspx?kbid=921337
>
> >
> > Thanks again!

>
> No problem.
>
> -Pete
>
>
>
>

 
Reply With Quote
 
Seth
Guest
Posts: n/a
 
      21st Aug 2007
"Marc" <(E-Mail Removed)> wrote in message
news:5AA3E27F-274E-4B3A-918E-(E-Mail Removed)...
> Thanks again for all the help. Is there any way we can avoid changing the
> software, but rather make a setting change, etc. to Windows Vista (aside
> from
> disabling UAC altogether) that would allow the software to run correctly
> when
> it is first plugged in and auto-launched via auto-play. I've tried
> checking
> the box under the properties for the .exe application to "always run this
> program as an administrator" but this just creates a UAC elevation prompt
> loop. Any help is greatly appreciated. Thanks.



You might look into making a custom "shim" to act as a wrapper around your
app.

But the proper answer is to modify the app to be Vista compliant.

 
Reply With Quote
 
Pete Delgado
Guest
Posts: n/a
 
      23rd Aug 2007

"Marc" <(E-Mail Removed)> wrote in message
news:5AA3E27F-274E-4B3A-918E-(E-Mail Removed)...
> Thanks again for all the help. Is there any way we can avoid changing the
> software, but rather make a setting change, etc. to Windows Vista (aside
> from
> disabling UAC altogether) that would allow the software to run correctly
> when
> it is first plugged in and auto-launched via auto-play. I've tried
> checking
> the box under the properties for the .exe application to "always run this
> program as an administrator" but this just creates a UAC elevation prompt
> loop. Any help is greatly appreciated. Thanks.


I don't *think* so. There are a variety of things that you may be able to
try programmatically, but ultimately it will come down to the fact that it
would be a huge security risk to allow an arbitrary program to run from a
removable disk on connection. If you recall, this is how many viruses were
transmitted via floppy drive.

-Pete


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista interfering with printer driver install Kay Clark Windows Vista General Discussion 2 7th Feb 2008 12:56 PM
Dual Boot XP/Vista - any known problems with Vista interfering with XP MBR? Geoff Windows Vista General Discussion 22 1st May 2007 03:01 PM
Some other program interfering with Excel file (through Excel) Keith Microsoft Excel Misc 1 23rd Jan 2007 06:01 PM
program interfering with shutdown wendy Microsoft Windows 2000 Applications 0 14th Aug 2003 02:45 AM
Re: IE 6.0 This program has preformed .... an illegal operation....... PA Bear Windows XP Internet Explorer 0 5th Aug 2003 11:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:17 PM.