Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Perl Version: Activestate 5.6.1, Environment: Windows 2003 running NTEmulation
Problem:
I'm trying to convert some VBScript code to Perl. Specifically, I'm trying to change the home directory path for some users.
Vbscript Code:
Perl Code:
How should the vbscript function, User.HomeDirectory = "\\server\homeshare" be written in Perl?
Any help would be much appreciated.
Problem:
I'm trying to convert some VBScript code to Perl. Specifically, I'm trying to change the home directory path for some users.
Vbscript Code:
Set User = GetObject("WinNT://Domain/" & username & ",user") User.HomeDirectory = "\\server\homeshare" User.SetInfo
Perl Code:
$User=Win32::OLE-> GetObject("WinNT://wsi/$username", "user"); #Reports error - not allowed $User->HomeDirectory="\\server\homeshare" +; #Doesn't Work $update=$User->HomeDirectory("\\server\homeshare"); $set=$update->SetInfo;
How should the vbscript function, User.HomeDirectory = "\\server\homeshare" be written in Perl?
Any help would be much appreciated.
Back to
Seekers of Perl Wisdom