AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi RunAs Dialog vor dem Programmstart???
Thema durchsuchen
Ansicht
Themen-Optionen

RunAs Dialog vor dem Programmstart???

Ein Thema von Piro · begonnen am 8. Mär 2006 · letzter Beitrag vom 4. Mai 2006
 
CodeX

Registriert seit: 30. Okt 2004
475 Beiträge
 
Delphi 12 Athens
 
#13

Re: RunAs Dialog vor dem Programmstart???

  Alt 10. Mär 2006, 13:13
Zitat von MathiasSimmack:
@Codex: Hast du da nicht ein Zitat vergessen:
Zitat:
The SE_TCB_NAME privilege is not required for this function unless you are logging onto a Passport account.
wir schmeissen hier mit zitatfetzen um uns ...
also hier mal vollständig:

Zitat:
Remarks

The LOGON32_LOGON_NETWORK logon type is fastest, but it has the following limitations:

* The function returns an impersonation token, not a primary token. You cannot use this token directly in the CreateProcessAsUser function. However, you can call the DuplicateTokenEx function to convert the token to a primary token, and then use it in CreateProcessAsUser.
* If you convert the token to a primary token and use it in CreateProcessAsUser to start a process, the new process cannot access other network resources, such as remote servers or printers, through the redirector. An exception is that if the network resource is not access controlled, then the new process will be able to access it.

The SE_TCB_NAME privilege is not required for this function unless you are logging onto a Passport account.

Windows 2000: The process calling LogonUser requires the SE_TCB_NAME privilege. If the calling process does not have this privilege, LogonUser fails and GetLastError returns ERROR_PRIVILEGE_NOT_HELD. In some cases, the process that calls LogonUser must also have the SE_CHANGE_NOTIFY_NAME privilege enabled; otherwise, LogonUser fails and GetLastError returns ERROR_ACCESS_DENIED. This privilege is not required for the local system account or accounts that are members of the administrators group. By default, SE_CHANGE_NOTIFY_NAME is enabled for all users, but some administrators may disable it for everyone. For more information about privileges, see Privileges.
ich habe den code jetzt ausprobiert. unter XP funktioniert das einwandfrei.
unter 2000 jedoch nicht. LogonUser liefert hier false zurück. das wird wohl genau der hinweis sein, den ich als zitat gepostet habe.
kann das bitte jemand auch ausprobieren und bestätigen/dementieren? (btw: als DOMAIN habe ich '' genommen, da ich das lokal machen möchte. ging unter XP, vllt braucht 2000 was anderes?)

für meine zwecke müsste eine solche funktion für 2000/XP/2003 funktionieren. die 2000 user möchste/kann ich auf keinen fall ausnehmen.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:57 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz