Doesn't work? use strict; use warnings; (and resolve errors revealed by using these two ).
Check for return values and error messages ($!, $^E, Win32::AdminMisc::GetError()).
MJDsays "you can't just make shit up and expect the computer to know what you mean, retardo!"