Solved

system setups - nt

Posted on 2000-03-08
4
210 Views
Last Modified: 2010-03-05
Just a little example, not too little, to get me started please.

How do you get to NT system setups via perl scripts.  For example,
I need to set up the peer services and tcp and would like to run
a script to do it.   AND, aside,  is it possible to run a perl distribution off
a floppy?  If not, I can make a CDROM.

I'll head over to activeware and poke around but would still like an
example.  Thanks.
0
Comment
Question by:hank1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 5

Expert Comment

by:PC_User321
ID: 2597659
If you can do it from the command line, you can do it with perl.


 Directory of A:\

CW3230MT DLL       319,488  08-10-97 11:11a cw3230mt.dll
PERL     DLL       561,152  08-10-97 11:11a perl.dll
PERL     EXE         8,192  08-10-97 11:11a perl.exe
         3 file(s)        888,832 bytes
         0 dir(s)         568,832 bytes free
0
 
LVL 5

Accepted Solution

by:
PC_User321 earned 50 total points
ID: 2599098
Here is a simple example of using ARP:-



`arp -s 200.20.180.144 23-45-67-9a-bc-de`;
@Arps = `arp -a`;
$HostNumber = 1;
foreach $Line (@Arps) {
   if( $Line =~ /^\s*[0-9]+\.[0-9]+/) {
      $HostHash{$HostNumber} = $Line;
      print "$HostNumber. $Line";
      $HostNumber++;
   } else {
      print "  $Line";
   }
}
print "Which host would you like to delete?   ";
chomp($ToDelete = <>);
if (defined($HostHash{$ToDelete})) {
   @Words = split ' ', $HostHash{$ToDelete};
   print "Going to do arp -d $Words[0]\n";
   `arp -d $Words[0]`;
   print "\nResult:-\n";
   print `arp -a`;
}

0
 

Expert Comment

by:KuznesofAA
ID: 2604366
Although not as powerfull, you can do quite a number of things with vbscript and the footprint is a bit lighter.

Follow this link:

http://cwashington.netreach.net/main_site/default.asp?topic=news

for a good site on vbscript.

If you want to use Perl install the ActiveState distribution www.activestate.com and

look at the Win32 options, in particular:

Win32::NetAdmin
Win32::NetResource

Hope that helps.
0
 
LVL 5

Expert Comment

by:PC_User321
ID: 6869183
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question