Is it possible to open a form with an ordinary user and another as an administrator in the same application?

Asked

Viewed 38 times

0

I have a program that in certain parts needs to be run as an administrator, in others it needs to be run as an ordinary user. Example:

configuracoes.Show() 'Esse será executado como usuário comum'
suporte.Show() 'Esse como administrador'

The ideal would be how to do this in Vb.net, but if it is in C# also serves.

  • 1

    believe not, because the process is high. This is characteristic of the operating system and independent of language, etc

  • Just out of curiosity, what is the purpose of opening a screen with Administrator privileges and others not?

  • Configurations and support are different processes, if you can specify in the manifest the need for execution as a system administrator <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />.

  • settings and support are in the same . exe think changing the manifest will change the whole program and not only certain parts.

  • John is because in certain parts of my program it moves with windows processes which requires privileges of Adm, already another part (in the settings) the user needs to indicate the location of a particular file. Until then everything ok, only that this file is in a folder mapped by the normal user, and as the administrator user does not have this mapped network folder does not appear to the user, because it is as if the administrator is logged in to his account and not the user. it took me a long time to figure this out

1 answer

0

It depends! You want to open in the same process or in separate processes. If you want to open in the same process, the answer is no. If you want to open in separate processes yes.

Link to a tutorial on

  • Hello @Danrley. Avoid just putting the link for the answer. Put code that supports your response and can help with the solution.

  • in a little while I edit, just a moment.

Browser other questions tagged

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