Page 1 of 1 1
Topic Options
#119233 - 2004-05-09 02:46 PM Starting IIS service
thijs Offline
Fresh Scripter

Registered: 2003-05-09
Posts: 14
Loc: The nederlands
How can i start the IIS service. And write that result to an TXT file.
Below is the script i have made but it gifs an error on line 9.

Can someone help me.
Break on
$f=2
$date=@DATE
$chr10=Chr(10)
Do
? "@TIME / @DATE"

$www=Run "cmd /c net start W3SVC"
Sleep 15
$iis=Run "cmd /c net start IISADMIN"
Sleep 15
$ftp=Run "cmd /c net start MSFTPSVC"
Sleep 15
$rep=Run "cmd /c net start RpcSs"

Open (1,"D:\scripts\logiis\$date.txt",5)
WriteLine (1,"---------------------------- $chr10 Log van: @TIME/@DATE $chr10 $chr10 De IIS admin service is: $iis $chr10 $chr10 De webservice is:$www $chr10 $chr10 De ftpservice is:$ftp De Replication services is: $rep $chr10 ----------------------------"
Close (1)
Sleep 300
Until $f=1

Top
#119234 - 2004-05-09 03:02 PM Re: Starting IIS service
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Your RUN lines are all wrong. See the FAQ
Not quite everything you wanted to know about RUN and SHELL
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#119235 - 2004-05-09 03:04 PM Re: Starting IIS service
thijs Offline
Fresh Scripter

Registered: 2003-05-09
Posts: 14
Loc: The nederlands
But with out the $ sign it works.....

I don't understand that. Do you have an explenation

Top
#119236 - 2004-05-09 03:08 PM Re: Starting IIS service
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I don't believe you. You cannot redirect output from RUN to a var with $www=Run! Did you even read the FAQ?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#119237 - 2004-05-09 03:10 PM Re: Starting IIS service
thijs Offline
Fresh Scripter

Registered: 2003-05-09
Posts: 14
Loc: The nederlands
Off course i red the FAQ.
But is there an other options be side this one ">>"(Dos command)

Top
#119238 - 2004-05-09 03:13 PM Re: Starting IIS service
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
THere are several PIPE() UDFs posted that let you skip the redirect to file.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#119239 - 2004-05-09 03:16 PM Re: Starting IIS service
thijs Offline
Fresh Scripter

Registered: 2003-05-09
Posts: 14
Loc: The nederlands
Oke thanks i will have an look around
Top
#119240 - 2004-05-09 03:17 PM Re: Starting IIS service
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
There are also several SERVICE() UDFs posted that will start and report the status.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 170 anonymous users online.
Newest Members
dimi575, Drecksnacken, Nlill, webtools321, multiman
17734 Registered Users

Generated in 0.033 seconds in which 0.011 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org