Running NT Login Script over Slow RAS 
Author Message
 Running NT Login Script over Slow RAS

My Windows NT login script only takes 2-3 seconds to run over the LAN, but
it takes about 5 minutes to run over a RAS connection.  The first thing my
script does is print a line of text:  Please Wait., but when using RAS
this line does not appear until 4.5 minutes have past, then about 30 seconds
later the script finishes.
Why does the script take so long to run over RAS?  I searched the archives,
but I could not find anything regarding this issue.  What can I do to speed
things up?
Note:  Perl is running from a Win NT server and the clients are Win 95.

Regards,

Scott McCosh



Wed, 18 Jun 1902 08:00:00 GMT  
 Running NT Login Script over Slow RAS

Quote:

>My Windows NT login script only takes 2-3 seconds to run over the LAN, but
>it takes about 5 minutes to run over a RAS connection.  The first thing my
>script does is print a line of text:  Please Wait., but when using RAS
>this line does not appear until 4.5 minutes have past, then about 30 seconds
>later the script finishes.
>Why does the script take so long to run over RAS?  I searched the archives,
>but I could not find anything regarding this issue.  What can I do to speed
>things up?
>Note:  Perl is running from a Win NT server and the clients are Win 95.

Maybe you have a performance problem in your script.  Is it written in
Perl?  Maybe you should post it --- or the slow part of it if it's long
--- if you want help finding the performance problem.
--

The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
The power didn't go out on 2000-01-01 either.  :)


Wed, 18 Jun 1902 08:00:00 GMT  
 Running NT Login Script over Slow RAS

Quote:
> My Windows NT login script only takes 2-3 seconds to run over the LAN,
but
> it takes about 5 minutes to run over a RAS connection.  The first
thing my
> script does is print a line of text:  "Please Wait..", but when using
RAS
> this line does not appear until 4.5 minutes have past, then about 30
seconds
> later the script finishes.
> Why does the script take so long to run over RAS?  I searched the
archives,
> but I could not find anything regarding this issue.  What can I do to
speed
> things up?
> Note:  Perl is running from a Win NT server and the clients are Win
95.

Assuming the scripts are Perl, you will be loading the entire script to
the client PC before compiling and running it.  Over a LAN this will be
a short exercise, but over RAS, the time to download the script before
it compiles and runs will be the major delay.  This will depend on the
speed of the connection and the size of the script.

I can't think of any other reason it would be so slow.

Wyzelli



Wed, 18 Jun 1902 08:00:00 GMT  
 Running NT Login Script over Slow RAS

Quote:



>> My Windows NT login script only takes 2-3 seconds to run over the LAN,
>but
>> it takes about 5 minutes to run over a RAS connection.  The first

>Assuming the scripts are Perl, you will be loading the entire script to
>the client PC before compiling and running it.  Over a LAN this will be
>a short exercise, but over RAS, the time to download the script before
>it compiles and runs will be the major delay.  This will depend on the
>speed of the connection and the size of the script.

>I can't think of any other reason it would be so slow.

Assuming the user's modem is an ancient 9600 bps jobbie, 5 minutes is
300 * 960 = 288000 bytes, or more than 280K.  Is it possible the script
is that large?
--

The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
The power didn't go out on 2000-01-01 either.  :)


Wed, 18 Jun 1902 08:00:00 GMT  
 Running NT Login Script over Slow RAS
Thanks for your reply.  Sorry for my duplicate post, I didn't think my
original post made it.  Anyway, here is my script.  It runs a program called
vpdget (which is 2KB) and saves the output to the client hard drive
(asset.txt is usually about 30 bytes).  It then collects some asset
information about the client's PC and
saves it to the server.  When I run the script on the LAN it executes in 2-3
seconds.  I tested it over a 28.8 and a 46Kb RAS connection and it took
about 5 minutes both times.  My first print statement does not appear (when
using RAS) until almost the end of the 5 minutes.
I am also working out another bug: the Users LoginName is not always
captured. Sometimes it comes up empty, everything else has been working
well.

Any insight to either problem is greatly appreciated.

Regards,

Scott McCosh

use strict;
use mldbm;
my $tmp;

my $ExecutionPath = "\\\\server\\perl\$\\script\\";

print "Please wait while I gather your asset information...\n";

system ($ExecutionPath."vpdget.exe > c:\\asset.txt");
open (VPDGET, "c:\\asset.txt") || die $!;

close(VPDGET);


if ($bios_size < 2){

Quote:
}

use Win32;
my $name = Win32::LoginName;
$name =~ tr/a-z/A-Z/;
my $machine = Win32::NodeName;
$machine =~ tr/a-z/A-Z/;

use win32::Registry;
my $reg = "SOFTWARE\\Intel\\LANDesk\\Inventory\\Custom Fields";
my $SquareOne;
$main::HKEY_LOCAL_MACHINE->Open($reg, $SquareOne);
#### || warn "Could not open Registry, LanDesk might not be installed: $!";
my %values;
$SquareOne->GetValues(\%values);
my $key;
my $reg_size = keys(%values);

my $pc_name_key;
if ($bios_size > 1){
 $pc_name_key = $machine . $bios[1];

Quote:
}else{

 if ($reg_size > 1){
  $key = $values{"serial number"};
  $pc_name_key = $machine . $$key[2];
 }else{
  $pc_name_key = $machine;
 }

Quote:
}

my %USERS;
my %COMPUTERS;

tie %USERS, 'MLDBM', $ExecutionPath."users", 0666, 0640 or die $!;
tie %COMPUTERS, 'MLDBM', $ExecutionPath."computers", 0666, 0640 or die $!;

use Time::localtime;
my $time = ctime();

$tmp = $USERS{$name};
if($USERS{$name}{$pc_name_key}){
#### $tmp->{$pc_name_key}[0] = $machine;
 $tmp->{$pc_name_key}[1]++;
 $tmp->{$pc_name_key}[2] = $time;

Quote:
}else{

 $tmp->{$pc_name_key} = [($machine,1,$time)];
Quote:
}

$USERS{$name} = $tmp;

####if($COMPUTERS{$pc_name_key}){

####}else{
 $tmp = $COMPUTERS{$pc_name_key};
 $tmp->{"Computer Name"} = $machine;
 $tmp->{"Bios Junk"} = $bios[0];
 $tmp->{"Bios Serial Number"} = $bios[1];
 $tmp->{"Bios Model Type"} = $bios[2];
 if ($reg_size < 2){
  $tmp->{"Square One"} = "No";
 }else{
  my $k;
  my $key;
  $tmp->{"Square One"} = "Yes";
  foreach $k (keys %values){
   if ($k ne ""){
    $key = $values{$k};
    $tmp->{$k} = $$key[2];
   }
  }
 }
 $COMPUTERS{$pc_name_key} = $tmp;
####}
print "Finished Successfully!  You may now close this DOS window.\n";



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Login script over RAS

2. DB_File cause my scripts to run slower?

3. Perl NT login scripts help...

4. Newbie question: Creating a NT login script in Perl

5. NT login script to query group membership....

6. Perl in NT login script

7. Using PERL for NT Login Script

8. Perl CGI scripts getting slower...and...slower..

9. Win32::RasAdmin -- Setting NT RAS permissions with PERL!

10. Perl and Windows NT RAS

11. RAS module for NT

12. Win32::RasAdmin -- Setting NT RAS permissions with PERL!

 

 
Powered by phpBB® Forum Software