PureBasic 6.03 download the new4/6/2024 ![]() ![]() Close the handles to the interactive window station and desktop. If hwinstaSave : SetProcessWindowStation_(hwinstaSave) : EndIf WriteToLog("CreateProcessAsUser_ : " + error) If CreateProcessAsUser_(hToken, #Null, #Null, #Null, #False, dwCreationFlags, #Null, #Null, = GetLastError_() Protected dwCreationFlags = #CREATE_SUSPENDED | #CREATE_NEW_CONSOLE | #CREATE_UNICODE_ENVIRONMENT Si\lpDesktop = SizeOf(PROCESS_INFORMATION)) WriteToLog("Failed to add ACE to Desktop : " + err) If Not AddAceToDesktop(hdesk, = GetLastError_() Allow logon SID full access To interactive desktop. Hwinsta = #Null so it's not removed and cleaned up later WriteToLog("Failed to add ACE to WinStation : " + err) If Not AddAceToWindowStation(hwinsta, = GetLastError_() Allow logon SID full access To interactive window station. If Not GetLogonSID(hToken, to get login SID") Get the SID For the client's logon session. WriteToLog("Failed to get Default desktop : " + err) If Not SetProcessWindowStation_(hwinstaSave) Hdesk = 0, #False, #READ_CONTROL | #WRITE_DAC | #DESKTOP_WRITEOBJECTS | #DESKTOP_READOBJECTS) Get a handle To the interactive desktop. WriteToLog("Failed to SetProcessWindowStation : " + err) To get the correct Default desktop, set the caller's window station To the interactive window station. WriteToLog("Failed to open winsta0 : " + err) Hwinsta = #False, #READ_CONTROL | #WRITE_DAC) Get a handle To the interactive window station. WriteToLog("Failed to get GetProcessWindowStation : " + err) ![]() Save a handle To the caller's current window station. Declare RemoveAceFromDesktop(hdesk, psid) ![]() Declare RemoveAceFromWindowStation(hwinsta, psid) hFile = OpenFile(#PB_Any, "", #PB_File_SharedRead | #PB_File_SharedWrite)ĭeclare AddAceToWindowStation(hwinsta, *psid) ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |