473,386 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to restart IIS using perl in windows?

1
trying to restart IIS usiing per. Works fine through the command prompt but not through the browser .....


Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. #!/usr/local/bin/perl
  3. package IIS;
  4. $Servers='C:\Inetpub\wwwroot\Prabu\output.txt';
  5. open (SERVERS,"<$Servers")||die "file not opened\n";
  6. while (<SERVERS>)
  7. {
  8.     chomp();
  9. #    print "  <tr>\n";
  10. #$ServerIP = "$_";
  11. #$log=$ARGV[0];
  12. #print"$log";
  13. #print"$ServerIP\n</td>";
  14. system(" C:\\Inetpub\\wwwroot\\Prabu\\Rub.Bat");
  15.     sleep 5;
  16.     print "Done";
  17.     }
  18.  
Nov 5 '11 #1
1 1869
jonathan184
154 100+
how are you calling it through the browser?
Dec 5 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: atinti | last post by:
I'm tyring to write something that will send a simple email using Perl so far this is what I have #!/usr/bin/perl -w use strict; my $executable = "saplotus.exe'; my $server =...
2
by: barrybevel | last post by:
Hi, I have a very small simple program below which does the following: 1) post a username & password to a website - THIS WORKS 2) follow a link - THIS WORKS 3) update values of 2 fields and...
1
by: jonathan184 | last post by:
Hi I am trying to login a JMS admin tool and execute JMS commands and using perl windows to do this. This is the e.g of connection string they said to use when trying to connec to jms ****connect ...
5
by: rdl735 | last post by:
I'm relatively new programming on Windows. I need some pointers badly. On Unix, Sybase::DBlib has worked fine for me. I tried to use DBI, DBD::ODBC installed on a server, but I get the following...
6
by: ajays | last post by:
I want to get the full computer name using the ActiveState Perl on windows . Actually i can get that using the "hostname" command, but i want to have the output of the "hostname" command stored in...
1
by: prashantkuppa | last post by:
please help me anyone, here i am struck up with extracting check box status from pdf file using perl please give anybody some suggestions its urgent thanks prashant
1
parajaganesh
by: parajaganesh | last post by:
I am using Windows ClearCase Explorer. I do some scripting process to create a new view in ClearCase. But it cannot be displayed in the current screen. We need to press Alt + F5 after running my...
5
by: cnsabar | last post by:
Hi., I am having the index pg no. data in file .. i need to sort the data ., Can any one help regarding this using PERL .. Its very urgent ... Source file <ce:intra-ref id="10011#f0070"/>310f,...
6
by: nb999 | last post by:
Hello All, I need to find disk space on one of my drives in windows machine using perl. But, I cant seem to find windows command that I can script. I have performed similar task for unix...
3
by: Max58kl | last post by:
Trying to access data and print it to the screen using Perl Builders I/O Window -------------------------------------------------------------------------------- Hi I am using a program called...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.