Search Tools Links Login

How can I convert a primaryGroupId to a group name in a script?


@echo off

if {%2}=={} @echo Syntax: call GetPGID primaryGroupId GroupName&exit /b 1

set PGID="%TEMP%\%ComputerName%_%UserName%_GetPGID.tmp"

if not exist %PGID% ListGroupRID>%PGID%

set %2="Unknown"

for /f "Tokens=1*" %%f in ('findstr /C:%1 %PGID%') do if "%1" EQU "%%f" set %2=%%g

exit /b 0

About this post

Posted: 2005-11-1
By: FortyPoundHead
Viewed: 1,786 times

Categories

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.

ADODB.Connection error '800a0e79'

Operation is not allowed when the object is open.

/assets/inc/inc_footer.asp, line 37