pcdreams Posted December 20, 2005 Share Posted December 20, 2005 (edited) 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, 2005 by pcdreams Link to comment Share on other sites More sharing options...
nakira Posted December 21, 2005 Share Posted December 21, 2005 (edited) *N/M* Edited December 21, 2005 by nakira Link to comment Share on other sites More sharing options...
Vadikan Posted December 21, 2005 Share Posted December 21, 2005 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. Link to comment Share on other sites More sharing options...
pcdreams Posted December 21, 2005 Author Share Posted December 21, 2005 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. Link to comment Share on other sites More sharing options...
Vadikan Posted December 21, 2005 Share Posted December 21, 2005 (edited) 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, 2005 by Vadikan Link to comment Share on other sites More sharing options...
pcdreams Posted December 21, 2005 Author Share Posted December 21, 2005 hey thanks again. I don't know how I missed that link Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now