Re: Primary group



Hi Andrei,

Thanks for your feedback.

Since we normally ignore the Primary Group field in Windows, there are not
much tools with the function of setting this field. As I know, the
pview.exe from NT4 resource kit may provide this function, but it seems
that I can not install it on my Win2003 SP2 machine:
http://www.microsoft.com/downloads/details.aspx?FamilyID=3E972E9A-E08A-49A2-
9D3A-C0519479E85A&displaylang=en

Actually, it is not hard to write a small program to set Primary Group
field. You may first call OpenProcess with OpenProcessToken to obtain the
security token. Then you may call SetTokenInformation with
TokenPrimaryGroup.
http://msdn2.microsoft.com/en-us/library/aa379591.aspx

Finally, I am curious that why do you want to manipulate the
TokenPrimaryGroup field. Do you play with the posix subsystem on Windows?

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • RE: GDI+ error with Remote Desktop
    ... The application runs well if not running through Remote Desktop. ... you have a WinForm application on a Windows ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.windowsforms)
  • RE: System time change notification
    ... have a windows UI, it is not an actual issue for me. ... But since server application will run in Session 0 in Vista, ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.win32.programmer.tools)
  • Re: interrupting a lengthy sequence
    ... Winform GUI normally runs in a single thread, so when the GUI thread is ... Windows messages currently in the message queue. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Problem with Process.GetCurrentProcess() when starting a servi
    ... System is Windows XP. ... to send the sample project to me by removing "online." ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.general)
  • RE: The debugger component on the server failed to connect to the
    ... my computer is running under Windows XP ... In Component Services, expand Component Services, expand Computers, and ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.debugging)