engine Posted July 2, 2008 Share Posted July 2, 2008 I am using this: $TOKEN_PRIVILEGES = DLLStructCreate($tagTOKEN_PRIVILEGES) DllStructSetData($TOKEN_PRIVILEGES, "Count", 2) Thanks in advance. My contributions:Local account UDF Registry UDFs DriverSigning UDF Windows Services UDF [url="http://www.autoitscript.com/forum/index.php?showtopic=81880"][/url] Link to comment Share on other sites More sharing options...
engine Posted July 2, 2008 Author Share Posted July 2, 2008 I am trying to do something like this: TP.PrivilegeCount = 2 TP.Privileges(0).pLuid = RestoreLuid TP.Privileges(0).Attributes = SE_PRIVILEGE_ENABLED TP.Privileges(1).pLuid = BackupLuid TP.Privileges(1).Attributes = SE_PRIVILEGE_ENABLED but in AutoIt. My contributions:Local account UDF Registry UDFs DriverSigning UDF Windows Services UDF [url="http://www.autoitscript.com/forum/index.php?showtopic=81880"][/url] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 3, 2008 Moderators Share Posted July 3, 2008 I am trying to do something like this: TP.PrivilegeCount = 2 TP.Privileges(0).pLuid = RestoreLuid TP.Privileges(0).Attributes = SE_PRIVILEGE_ENABLED TP.Privileges(1).pLuid = BackupLuid TP.Privileges(1).Attributes = SE_PRIVILEGE_ENABLED but in AutoIt.You can only set this on your executable, not on some other executable. What exactly are you trying to accomplish by doing this that autoit doesn't already do? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 3, 2008 Share Posted July 3, 2008 I am using this: $TOKEN_PRIVILEGES = DLLStructCreate($tagTOKEN_PRIVILEGES) DllStructSetData($TOKEN_PRIVILEGES, "Count", 2) Thanks in advance. Man, that is confusing! The MSDN on the struct TOKEN_PRIVILEGES says it only has two fields, the count and an array of LUID_AND_ATTRIBUTES structures. That struct, in turn, has two fields, LUID and attributes. The AutoIt $tagTOKEN_PRIVILEGES seems to be a mashup of the two, perhaps because you can't give a stuct definition as a type in AutoIt for DllStructCreate()? That leaves you wondering what the count is for, since the AutoIt version has no array to give the count on... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
engine Posted July 3, 2008 Author Share Posted July 3, 2008 Thanks guys. I was able to solve this problem. My contributions:Local account UDF Registry UDFs DriverSigning UDF Windows Services UDF [url="http://www.autoitscript.com/forum/index.php?showtopic=81880"][/url] Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 3, 2008 Share Posted July 3, 2008 Thanks guys.I was able to solve this problem.What was the solution? Part of the purpose of this forum is to document solutions. How did you solve it? muttley Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
engine Posted July 4, 2008 Author Share Posted July 4, 2008 Hi PsaltyDSIt's something like the information in the MSDN pages you provided. It's not that obvious though.See the SetPrivilege function inside the Reg.au3 UDF from this post #545798Regards. My contributions:Local account UDF Registry UDFs DriverSigning UDF Windows Services UDF [url="http://www.autoitscript.com/forum/index.php?showtopic=81880"][/url] Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 4, 2008 Share Posted July 4, 2008 (edited) Hi PsaltyDS It's something like the information in the MSDN pages you provided. It's not that obvious though. See the SetPrivilege function inside the Reg.au3 UDF from this post #545798 Regards. So you dropped the $tagTOKEN_PRIVILEGES and declared your own with the array in it: Local $TOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & 3 * $iTokens & "]") I see, said the blind man... muttley Edited July 4, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now