Why doesn't an app run on Vista(standard user) if it runs with admin right?

Hello,

I have an app which makes registry entries under CURRENT_USER and LOCAL_MACHINE, reads/writes an ini-file in C:\Windows (from the database, must be there) and has the database in Public\Documents\...

I have tried to run it under standard user, setting the exe to run with admin rights. But it doesn't run, no error message, just terminating after start. Before making 1000's of debug messagedialogs, has someone expert with Vista an idea what may cause this? Maybe it's very simple...

Thanks,
John
0
John
3/24/2010 9:16:12 AM
embarcadero.delphi.rtl 934 articles. 0 followers. Follow

12 Replies
634 Views

Similar Articles

[PageSpeed] 22

a simple way to debug is to run ide itself with admin privileges and see 
what happens.
how do you set app to run as admin?

Regards.


On 24.03.2010 г. 11:16, John Schmidt wrote:
> Hello,
>
> I have an app which makes registry entries under CURRENT_USER and LOCAL_MACHINE, reads/writes an ini-file in C:\Windows (from the database, must be there) and has the database in Public\Documents\...
>
> I have tried to run it under standard user, setting the exe to run with admin rights. But it doesn't run, no error message, just terminating after start. Before making 1000's of debug messagedialogs, has someone expert with Vista an idea what may cause this? Maybe it's very simple...
>
> Thanks,
> John
0
Ivayllo
3/24/2010 9:46:08 AM
> {quote:title=Ivayllo Georgiev wrote:}{quote}
> a simple way to debug is to run ide itself with admin privileges and see 
> what happens.

I have no Delphi on the test machine to avoid all 'odds' thus I cannot do this.

> how do you set app to run as admin?

I simply set the checkbox <Run as administrator> in the exe-properties.
0
John
3/24/2010 10:16:52 AM
is the account you use on test box member of Administrators group?

On 24.03.2010 г. 12:16, John Schmidt wrote:
>
> I simply set the checkbox<Run as administrator>  in the exe-properties.
0
Ivayllo
3/24/2010 10:36:14 AM
> {quote:title=Ivayllo Georgiev wrote:}{quote}
> is the account you use on test box member of Administrators group?

No, as told it's a <standard user> thus doesn't take part of that group. And this machine has a Vista Home without great user group management.
0
John
3/24/2010 2:21:05 PM
I've tested your scenario on vista ultimate (don't have vista home) and
was prompted for admin credentials. if you uncheck "run as admin" does
the app start normally?

On 03/24/2010 04:21 PM, John Schmidt wrote:
> 
> No, as told it's a <standard user> thus doesn't take part of that group. And this machine has a Vista Home without great user group management.
0
Ivayllo
3/24/2010 9:23:54 PM
> {quote:title=Ivayllo Georgiev wrote:}{quote}
> I've tested your scenario on vista ultimate (don't have vista home) and
> was prompted for admin credentials. if you uncheck "run as admin" does
> the app start normally?

Sorry, I was ill for some days. - No, uncheck 'run as admin' doesn't help. I have checked it just because I hoped it would help.

John
0
John
4/1/2010 8:20:42 AM
> {quote:title=John Schmidt wrote:}{quote}
> > {quote:title=Ivayllo Georgiev wrote:}{quote}
> > I've tested your scenario on vista ultimate (don't have vista home) and
> > was prompted for admin credentials. if you uncheck "run as admin" does
> > the app start normally?
> 
> Sorry, I was ill for some days. - No, uncheck 'run as admin' doesn't help. I have checked it just because I hoped it would help.
> 

Try to set different compatibility modes, if it runs under XP mode, and not under 
plain Vista, then your problems may not be related only to admin rights.

Dalija Prasnikar
0
Dalija
4/1/2010 11:57:29 AM
well, if your app doesn't start at all i believe the reason isn't 
related to UAC as well as you should get some info/error message by OS.
if app runs "as standard user" and tries to modify C:\Program files for 
example OS will not shut it down silently but the corresponding api will 
return error condition. eventually you'd get some Delphi exception.

Regards.


On 01.04.2010 г. 11:20, John Schmidt wrote:
>
> Sorry, I was ill for some days. - No, uncheck 'run as admin' doesn't help. I have checked it just because I hoped it would help.
>
> John
0
Ivayllo
4/1/2010 12:59:20 PM
> well, if your app doesn't start at all i believe the reason isn't 
> related to UAC as well as you should get some info/error message by OS.
> if app runs "as standard user" and tries to modify C:\Program files for 
> example OS will not shut it down silently but the corresponding api will 
> return error condition. eventually you'd get some Delphi exception.

It starts, then it reports something like problems were encountered and offers the shutdown. But running under admin account there is no problem, as I told at the very beginning. Thus it must have to do with the UAC. And as I have pointed out the DB settings are read/written from/to an ini-file in C:\Windows (must be there for the DB) and the own configuration is read/written in the registry to HKCU and HKLM. Therefore I have set the 'run as admin'.

John
0
John
4/1/2010 1:27:47 PM
would you clarify a few things as I'm not sure if understand correct:

1) if run app from Admin account - it runs and works properly? do you 
set "run as..." and are you prompted by UAC?
2) if run app from user account without "run as..." it shows no messages 
at start up but later reports need to terminate?
3) if run from user account with "run as..." no messages, just crushes? 
UAC prompt?

Regards.

On 01.04.2010 г. 16:27, John Schmidt wrote:
>
> It starts, then it reports something like problems were encountered and offers the shutdown. But running under admin account there is no problem, as I told at the very beginning. Thus it must have to do with the UAC. And as I have pointed out the DB settings are read/written from/to an ini-file in C:\Windows (must be there for the DB) and the own configuration is read/written in the registry to HKCU and HKLM. Therefore I have set the 'run as admin'.
>
> John
0
Ivayllo
4/1/2010 1:48:48 PM
W dniu 2010-04-01 15:27, John Schmidt pisze:
> It starts, then it reports something like problems were encountered and offers the shutdown.
>But running under admin account there is no problem, as I told at the very beginning.
>Thus it must have to do with the UAC. And as I have pointed out the DB settings are read/written from/to an ini-file in C:\Windows
>must be there for the DB) and the own configuration is read/written in the registry to HKCU and HKLM. Therefore I have set the 'run as admin'.

Try this tool 
http://blogs.msdn.com/aaron_margosis/archive/2006/08/07/LuaBuglight.aspx

It may help you to find the problem.
0
Piotr
4/2/2010 8:02:12 AM
> {quote:title=John Schmidt wrote:}{quote}
> I have an app which makes registry entries under CURRENT_USER and LOCAL_MACHINE, reads/writes an ini-file in C:\Windows (from the database, must be there) and has the database in Public\Documents\...
> 
> I have tried to run it under standard user, setting the exe to run with admin rights. But it doesn't run, no error message, just terminating after start. Before making 1000's of debug messagedialogs, has someone expert with Vista an idea what may cause this? Maybe it's very simple...
> 

It is indeed very simple, because that's not the way it works.

All applications you run are started using the account you're logged in with when you start them. 

If an app is started as a standard user, and is marked as "run as administrator", that simply means that you get asked for an administrator account and password, and then it's started under that administrative account (if you've provided a valid password).

Checking that option is the same thing as right-clicking the executable in Windows Explorer and choosing "Run as Administrator" from the context menu. If you're a standard user, you get asked for an administrative account and password. Checking the "run as administrator" box on the executable's properties simply means you don't have to see the context menu first; if you're not an administrator, you'll still be prompted for an admin account and password.

Checking "run as administrator" does *not* mean that when a standard user tries to run it they automatically become administrators because that box was checked. That would violate every bit of security and protection that requiring administrator privileges provides. Image that malware or a virus gets onto the machine, and programmatically sets the properties of its' own Evil_Application to "run as administrator" - if it then re-started itself, and ran as an administrator without asking for credentials fir
st, it would be able to take total control of your system and do things like access your contacts, format your drive, embed itself in places you'd never find so you couldn't get rid of it, and so forth. Not a good idea to let that happen.

You need to fix your application to either stop writing to places non-admin users are not supposed to write (like HKLM and C:\Windows, which you were supposed to stop writing to when  XP was released), or to properly ask the user for administrator login information. (You mention "reads/writes an ini-file in C:\Windows (from the database, must be there)" - why? Why hasn't your database vendor fixed this? Is it an old 16-bit or early 32-bit database that isn't supported any longer? Because if it's not, and 
it's currently being maintained/supported by the vendor, you need to be raising hell with them for not keeping up to date. Saving information to INI files in C:\Windows has been deprecated by MS since Win95 and NT were released.)
0
Ken
4/2/2010 5:18:28 PM
Reply:

Similar Artilces:

Lotus Notes 6.5.1 client won't run as user but runs as admin
I've created an MSI App object for the Lotus Notes 6.5.1 client. It caches and installs beautifully but when the user clicks on the icon to run it the splash screen pops up and then nothing! All my users are only members of the users group. If I log in as Administrator it starts fine! I've worked out that nlnotes.exe starts and then exists. It must be looking for something or trying to do something that needs admin rights. Has anyone else managed to get this app running correctly with the users as memebers of the users group only? I am sure this has NOTHING to do with...

User app admin doesn't have the option to admin
I've got a user app (Identity Manager version 3.5.1 Build Revision 23429) that's running on SLES. It seems to run fine, except that my user app administration account doesn't have the "administration" option when he logs in. I've reconfigured the portal with the script and it shows the right user in the dialog. I'm not sure if it has a bearing on this issue, but this server was cloned (VMware) from another machine also running an instance of the User app (different O's in the tree). That machine was configured till it was working, then cloned,...

Running Running Running
Name: John Harris Email: jkharrisatmindspringdotcom Product: Firefox Summary: Running Running Running Comments: Why, does Firefox, even when mimimized, still takes up to 20, 30, 40% (or more) of my CPU on my Windows XP Pro computer. It seems to just happily chew up cycles. How do I get it to do nothing while minimized. Especially a problem with virtual machines. Thanks, John Harris Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729) From URL: http://hendrix.mozilla.org/ Note to readers...

XP won't run new Win validation, can't run WU
XP Home w/ IE8 -- just went to Windows Update for the hell of it (admin account) and for the first time in a long time, WU claims I need to validate Windows. Fine by me, it's genuine, but the validation ActiveX control is failing and neither validation nor Update will run. The IE8 Info Bar is not popping up to alert me about the ActiveX problem, and if I click the "alternate validation method" button, a popup states that all ActiveX controls are "Passed" with the exception of the Windows Genuine Advantage control, which freezes as "checking". ...

iOS app runs fine in simulator but won't run on iPad
Greetings, I have developed a simple demo app for iPad using XE2. It runs fine in the iPad 5.0 simulator, but when I try to run it on the iPad itself the build fails with the following output: GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show war...

Please Help SQL that run on Mysql Doesn't Run on MSDE
SELECT DayofMonth(msgDate) as msgDay, COUNT(msgID) as Counter FROM tbl_outbox WHERE (msgDate BETWEEN "2003/9/1" AND "2003/9/31") AND (tbl_outbox.groupOwner=1) GROUP BY DayofMonth(msgDate) Any Idea what wrong here ... i can't figure it out ... i wonder that izzit the dayofmonth cannot be used in msde ?? can it ?? if not what is the replacement .. Regard, Eric Thank in Advance ... Please help urgent due date near ....Good Luck Everyone DAY(msgDate) will get you the integer representing the day of the month. Personally, for date literals, I would ...

DataGrid.ItemCommand() doesn't run when the DataGrid was created in run-time
Hi, there I new a DataGrid in run-time, then add some BoundColumns and a ButtonColumn, but the Button_Click doesn't run when I click it. If create in design-time, it's OK. Why? Thanks... DataGrid MyDataGrid = new DataGrid(); MyDataGrid.ItemCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.MyDataGrid_ItemCommand); private void MyDataGrid_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { ...... } ...

Login Script Doesn't Run For Users
Moving into a new OU and I have moved my user account (no other users yet)to this new OU and set up the login script as follows: MAP ERRORS ON MAP DISPLAY ON SET PROMPT="$P$G" NO_DEFAULT WRITE WRITE WRITE " Good %GREETING_TIME, %GIVEN_NAME" WRITE WRITE " ****************************** WARNING ****************************** " WRITE WRITE " THIS SYSTEM IS RESTRICTED TO AUTHORIZED USERS FOR OFFICIAL " WRITE " USE ONLY AND SHALL BE IN ACCORDANCE WITH THE ACCEPTABLE " WRITE " USE POLICY. USE OF THIS SYSTEM IS SUBJECT TO MO...

PB7
Okay, I've been working with PB 9 & 10 for 4-5 years now off and on. I think I know what I'm doing with deploying a standard .exe. ...obviously not under PB 7. Now, why am I using PB 7? We have a legacy app that needs a data update so we're making a utility to do so. Obviously the runtime environment that it will be in is already set so I'm just going to use that instead of dragging along a bunch of components. So, I make an application, I add a window to it. In the app open I call the open function pass the window. On the window I have a button that...

superreview granted: [Bug 355352] [Cocoa] while the app is running, if no browser windows are open, clicking on the app in the dock doesn't open a browser window : [Attachment 248569] New and improved
Benjamin Smedberg [:bs] (bsmedberg@) <benjamin@smedbergs.us> has granted Josh Aas <joshmoz@gmail.com>'s request for superreview: Bug 355352: [Cocoa] while the app is running, if no browser windows are open, clicking on the app in the dock doesn't open a browser window https://bugzilla.mozilla.org/show_bug.cgi?id=355352 Attachment 248569: New and improved patch https://bugzilla.mozilla.org/attachment.cgi?id=248569&action=edit ------- Additional Comments from Benjamin Smedberg [:bs] (bsmedberg@) <benjamin@smedbergs.us> moa=bsmedberg (I didn't revi...

superreview requested: [Bug 355352] [Cocoa] while the app is running, if no browser windows are open, clicking on the app in the dock doesn't open a browser window : [Attachment 248569] New and improv
Josh Aas <joshmoz@gmail.com> has asked Benjamin Smedberg [:bs] (bsmedberg@) <benjamin@smedbergs.us> for superreview: Bug 355352: [Cocoa] while the app is running, if no browser windows are open, clicking on the app in the dock doesn't open a browser window https://bugzilla.mozilla.org/show_bug.cgi?id=355352 Attachment 248569: New and improved patch https://bugzilla.mozilla.org/attachment.cgi?id=248569&action=edit ------- Additional Comments from Josh Aas <joshmoz@gmail.com> The minor changes remaining (comments mostly) can be made on checkin. ...

Can't run apps as secure system user
Hi, I'm trying to run an app (specifically client ACU but it applies to others as well) when logged in as a user without local admin rights. When the app launches I get a message saying I must have local administrator rights to run it. The workstation is imported into the tree, the top level O has RWCMF rights to the folder from which the app is being run and I'm using UNC paths in the app. object...so I must be missing something else. Zfd4SP1B NW Client 4.83 SP2 NW6 SP3 WIN NT4 SP6 and WIN 2K SP4 workstations. Any ideas? Thanks, Tim. Tim, i...

Can't run Xcelerator plug-in as standard user
Hi, as reported in the message above (it appears if Xcelerator plug-in can't be loaded), I'm unable to run my app on computers where the local user isn't administrator. So, - I've correctly set the ActiveX options at point A - I've correctly installed the plug-in changing the local user to local administrator - There are no 3rd part software blocking Appeon When the user is administrator, the application starts. When I remove the administrator rights, and put back the user to normal user, I get the error above. I've tried on several machines and get al...

Can't run local web pages and IIS doesn't not open
If I start my computer without a connection to the Internet,I can't open any pages like "http://localhost/DBMJ/anypage.html"and,I can't open IIS, .. I click on the icon and nothing happens.I ran "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i"but that didn't fix it (it runs forever just showing the  . . . . . . . . . . . . . on the screen).This only happens when there is no Internet connection when I start the computer up.If there is an Internet connection, it works.Anyone know why this is happening?  thanks   check o...

Web resources about - Why doesn't an app run on Vista(standard user) if it runs with admin right? - embarcadero.delphi.rtl

Resources last updated: 12/26/2015 4:05:00 AM