IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Perl Q.
My google-fu is weak again. Using ActivePerl, what module and syntax do I use to get the currently logged in user? (i.e. the GetUserNameA Win32 api call)?

Also, I know bumpkis about Windows 2003 server admin. But I've been told that you can write your login scripts in Perl instead of VBScript. Is that so? If so, how would you get the user's name so that you could map their "home" folder?

Any help, as always, appreciated.
bcnu,
Mikem

Eine Leute. Eine Welt. Ein F\ufffdhrer.
(Just trying to be accepted in the New America)
New I'll bet it's on CPAN
[link|http://www.cpan.org|CPAN] is the site for all things perl.

[link|http://search.cpan.org/~nwclark/perl-5.8.6/win32/ext/Win32/Win32.pm|Win32] has a "Win32::LoginName() [CORE] Returns the username of the owner of the current perl process." function.

There may be some other goodness in there.

HTH.

Cheers,
Scott.
(Who doesn't know perl.)
New I looked there before posting.
I also looked at perlmonks. I'm just learning Perl and I liked to issue an edict that all admin scripts are done in Perl (my Windows kid said that he read that you could do login scripts on Windows 2003 in Perl, so I told him to). It's simple stuff we're doing in the login script, and I've got all the share drives mapped. What I specifically need to do is to get the currently logged in user's name on the server so that I can map their home drive. All the sample scripts I've seen so far use VBScript to do that and I can't find a sample Perl script that would run in a Windows 2003 login script to map a user's home drive.

Thanks for the help.
bcnu,
Mikem

Eine Leute. Eine Welt. Ein F\ufffdhrer.
(Just trying to be accepted in the New America)
New Ignore Dupe.
bcnu,
Mikem

Eine Leute. Eine Welt. Ein F\ufffdhrer.
(Just trying to be accepted in the New America)
Expand Edited by mmoffitt Jan. 20, 2005, 08:24:57 AM EST
New Dupe?
Where were you being dishonest?

Oh, that kind of Dupe, duplicate!
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey

[link|http://it.slashdot.org/comments.pl?sid=134485&cid=11233230|"Microsoft Security" is an even better oxymoron than "Miltary Intelligence"]
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
     Perl Q. - (mmoffitt) - (4)
         I'll bet it's on CPAN - (Another Scott) - (3)
             I looked there before posting. - (mmoffitt)
             Ignore Dupe. -NT - (mmoffitt) - (1)
                 Dupe? - (folkert)

I don't need to do a bunch of coke to be happy.
99 ms