Application does not open in windows XP because it does not have administrator permission

Asked

Viewed 256 times

2

I am having a problem, the executable of my program does not run on windows XP because of user permission issues.

inserir a descrição da imagem aqui

On other systems, you put it to run as administrator and it works normally.

Searching the internet I found several suggestions like this: C#: Force an application to run as administrator

This did not work, although it included the manifest as oriented. inserir a descrição da imagem aqui

So I found this microsoft tutorial that seems to solve my problem: Step 6: Create and Embed an Application Manifest (UAC)

But due to my difficulty in understanding English I could not reproduce it correctly.

Can someone help me with that?

  • Which version of VS is being used?

  • Visual Studio 2015

  • @Pedromapelli I don’t have access to the site you indicated - which didn’t work. So I don’t know if it’s the same thing I posted in response. In this case, what I did (in answer) solved my problem.

  • This link I tried and did not work, the problem is that I am running the program on Windows XP, and in it does not appear that window you posted to run with administrator. In short, that’s the problem.

  • 1

    But you added the manifest in its application?

  • I inserted it like this in the image I added in the question.

  • In XP there is no UAC, so either you are using an account with admin permission or an account with limited access, you cannot force it to run as an administrator, at most you detect that you are not an administrator and warn the user that you cannot run

  • That is, in the case even being in an administrator account the application does not open giving error stating that this without permission. So I wanted to force the application to run with administrator permissions.

Show 3 more comments

1 answer

3


You should add a manifest in its application.

Project Menu > Add New Item... and then choose the type Application Manifest File: add new item

After this, you should determine the level of permission for "asInvoker" for "requireAdministrator".

When creating the file, it comes with the line like this:

<requestedExecutionLevel level="asInvoker" uiAccess="false" />

Change to look like this:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

When running your program, you will be asked for administrator permission (if you are an ordinary user). inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.