December 20, 200520 yr maybe someone can look at my code and see if they can spot a problemthis is an excerpt from my RunOnceEX fileREG ADD %KEY%\015 /VE /D "Updating Path" /fREG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\Chpth.cmd" /fREG ADD %KEY%\035 /VE /D "Add a User" /fREG ADD %KEY%\035 /V 1 /D "%systemdrive%\install\user.cmd" /fand the correspondng cmd filespathPATH=%PATH%;%systemdrive%\perl\binAdd user@echo offperl user.plxand finally the perl code#!/usr/bin/perluse warnings;use strict;print "Please enter a username: ";my $name = <STDIN>;chomp $name; print "Please enter a password: ";my $password = <STDIN>;chomp $password;print "\n";print "Thank You\n";system "net user $name $password /add";system "net localgroup Administrators $name /add";system "net accounts /maxpwage:unlimited";I have a feeling these the path and add user problem lies in the fact that if the path doesn't work neither will the add user (since it needs to know where perl is). Because I can run it (the perl file) locally and it works.Thanks for taking the time to look at this. Edited December 21, 200520 yr by pcdreams
December 21, 200520 yr Are you trying to add %systemdrive%\perl\bin to the PATH permanently? May I suggest pathman? It works for me all the time. pathman /as %systemdrive%\perl\binif I remember the switches correctly.
December 21, 200520 yr Author thank you. Is pathman already there or is there someplace I can download it?I think sp2 is really got me goofed up. I can't even delete accounts. or login with ones I've created.
December 21, 200520 yr thank you. Is pathman already there or is there someplace I can download it?You got to download it. Start with clicking on pathman in my previous post Added. I think it's packed in MSI, just install the MSI and you'll find pathman in system32. Drop pathman.exe into your OEM folders and enjoy Edited December 21, 200520 yr by Vadikan
Create an account or sign in to comment