From: Rampanelli M. J <Michael.Rampanelli@Siemens.com> - 2005-02-28 13:33:30
|
Well I'm glad to see someone else had the same problem as me. I too don't know perl but I researched it enough to be able to modify todo.pl to put it in the startup group instead of the registry. This seems to have fixed my problem. I have not had any issues since doing this. I suggested to the list that they change it permanently in todo.pl but got no response. Below is the snippet of code that I changed. Basically it copies a "launch.bat" to the startup group, which launches todo.pl. I commented out the original lines that copy to the registry. Hope this helps! =20 Here is my launch.bat: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D c:\netinst\mapznrun.bat z:\bin\todo.pl --go =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Here is the snippet from todo.pl. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # Add registry entry to make a command run at next logon of current # user. If arg is undef, remove the registry entry. sub run_at_logon (;$) { my ($cmd) =3D @_; my $run_subkey =3D 'Software/Microsoft/Windows/CurrentVersion/Run/'; my $run_key =3D (exists $opts{'user'} ? "CUser/$run_subkey" : "LMachine/$run_subkey"); my $todocmd =3D '/ToDoCmd'; my $d1 =3D 'z:\site\launch.bat'; my $d2 =3D 'C:\Documents and Settings\All Users\Start Menu\Programs\Startup\launch.bat'; if ($cmd) { # check if file exists. If so, do nothing, If not, copy it. if (-e $d2) {=20 # print("found file $d2"); # File already exists, no need to copy it again. } else { copy "$d1", "$d2" or die ("couldn't copy $d1 to $d2"); } # (exists $reg{$run_key}) # or $reg{$run_key} =3D { } # or die "Unable to create $run_key: $^E"; # $reg{$run_key}->{$todocmd} =3D $cmd # or die "Unable to set $run_key$todocmd to $cmd: $^E"; } # elsif (exists $reg{$run_key}) { # No more commands to do, check if file exists. If so, delete it. elsif (-e $d2) {=20 unlink $d2 or die("couldn't delete file $d2"); } # (delete $reg{$run_key}->{$todocmd}) # or die "Unable to delete $run_key$todocmd: $^E"; # } } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -----Original Message----- From: una...@li... [mailto:una...@li...] On Behalf Of Voronkov Konstantin Sent: Monday, February 28, 2005 8:11 AM To: una...@li... Subject: RE: [Unattended] Re: Problem after first reboot Hello, All! I have similar problem with ie6 installation on Windows 2000. After ie6sp1 is installed PC is rebooted by todo.pl script, but after PC=20 automatically logins todo.pl is not invoked any more. I checked the Run registry key and=20 found that mapznrun line presents there, but todo.pl does not starts. more details: a. I have windows 2000 with integrated sp4 unattended installation. The ie6.bat is the very first thing installed after perl installation. b. I populated ie6sp1 with prepare script, also I downloaded and unpacked ie6 installer to Z:\packages\ie6sp1\enu folder as asked in unatteded=20 documentation. I though that I could integrate ie6 into Windows 2000, but from MS docs=20 I see the integration is possible only for hotfixes, and ie6 can not be=20 integrated, at least I did not found the way. What can I do to solve mine problem? Is it correct way to modify todo.pl script to put in Startup group instead of Run registry section? Can it rise any issues? Also, I'm not much experienced in Perl, and I would be pleased if someone provide adjusted run_at_logon procedure, so that I can change mine todo.pl script, please? I'm going to solve the problem by sheduling reboot after ie6sp1=20 installation. Best Regards, Voronkov Konstantin ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick _______________________________________________ unattended-info mailing list una...@li... https://lists.sourceforge.net/lists/listinfo/unattended-info |