Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

.ASP Remote Start Stop Windows Service using ASPExec
First shot at asp... and it works like a charm.
Great server-side call from client

All I had to do is register the aspexec.dll and setup iis.. Took a few
min
----------------------------------------------------------

-ASPEXEC executes remote applications as DOS Apps or Windows
Applications.

This is how we do it ..:)

REGISTER ASPEXEC
1)move file aspexec.dll to winnt/system32 directory
2)regsrv32 aspexec.dll

***ASPEXEC DOS Commands can sometimes not work properly if Norton
antivirus "Script Blocking is enabled, only Windows commands will work
smoothly!

***Remote application will not pop up window, whether you use DOS or
windows commands, due to SP3 service pack bug.

***IF REMOTE APP IS OPEN , then use terminate on XP, or kill on 2000
Server first!! Otherwise will not work.



SERVICES
1)World Wide Web Publishing--> Allow Service To Interact With Desktop
(checked)

IIS
1) Create virtual directory
-Scripts Only
-LOW IIS Process
-Anonymous Login /Windows Integration (checked)

ASP PAGE, WEB FOLDER PERMISSIONS
Example:  c:\Inetpub\wwwroot\virtualdirectory\myas
ppages

For DOS all you need :
Administrator -full control
Everyone-full control
For Windows add these too
Internet Guest Account(MACHINENAME/IUSR_MACHINENAME)-Read &
Execute,Read,List


REMOTE APPLICATION EXE FOLDER SECURITY/PERMISSIONS
Administrator -full control
Everyone-Read & Execute,Read,List
 ========================================
=================================

Here is what I use to start/stop Serv-U from any remote computer...



<html>
<head><title>Start/Stop</title><head>
<body>
<H3>Start/Stop</H3>

<form name"FTP" action"default.asp" method="post">

<td><input type="submit" Value="Start FTP" Name="Start_FTP"></td>
<td><input type="submit" Value="Stop FTP" Name="Stop_FTP"></td>

</form>


<%
Sub startFTP()
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "NET START"
Executor.Parameters = """Serv-U FTP Server"""
strResult = Executor.ExecuteDosApp
Response.Write "<pre>" & strResult & "</pre>"

Set Executor = nothing
End Sub

Sub stopFTP()
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "NET STOP"
Executor.Parameters = """Serv-U FTP Server"""

strResult = Executor.ExecuteDosApp
Response.Write "<pre>" & strResult & "</pre>"

Set Executor = nothing
End Sub
%>

<%
If Len(Request.Form("Start_FTP")) > 0 Then
startFTP()
Else
If Len(Request.Form("Stop_FTP")) > 0 Then
stopFTP()
End If
End If
%>



</body>

</html>


Report this thread to moderator Post Follow-up to this message
Old Post
yms.yfki@gmail.com
08-17-07 08:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:30 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.