Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Win32API::Net::GroupAdd Help
summergs
I am having problems adding a Group to my local account. Any Ideas??
Snippet:
Use Win32;
Use Win32API::Net;
my @{users}=();
my $varError = "";
my $server = "servername";
my $varGroup = "Partners";
%{$_[0]} = ("name"=>$varGroup);
Win32API::Net::GroupAdd( $server, 0, $_[0], $varError);
Many Thanks in advance
Find more posts tagged with
Comments
Adam Stoller
Do you get an error message?
Are you trying to do this on global groups or local groups?
Are you logged in / running this as a Windows Administrator?
Are you using WNT or W2K / ActiveDirectory?
There are probably a bunch of other questions - but the above should suffice for a start...
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Dwayne
This is very strange looking code. I
think
, if I understand it correctly, that you could replace it with this:
Use Win32;
If I understand your original code, it looks like you were trying to pass a symbolic reference to your hash. What's expected is a "hard" reference.
Also, you said "
adding a Group to my local
account
". I assume you meant local
domain
.
GroupAdd
is not for a local
anything
but is for global (domain) groups. Use the LocalGroupAdd function to add a local group to the local machine.
--
Current project: TS 5.5.2/6.1 W2K
summergs
You are the man. That fixed it. Thanks!