Wrox Programmer Forums
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 4th, 2004, 11:58 PM
Registered User
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default This is how to make ASPEXEC, WSH work thru ASP

Objective to use an ASP page to run a remote application (exe file) on a web server with ASPEXEC.

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

This is how we do it ..:)

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.

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

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

Example: c:\Inetpub\wwwroot\virtualdirectory\myasppages

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

Administrator -full control
Everyone-Read & Execute,Read,List

ASP PAGE, excuting as Windows App.

<%@ Language=VBScript %>
<%Option Explicit %>
dim Executor,strResult,WaitObj
Response.Buffer = true
Executor.Application = """C:\Program Files\remoteapp\remoteapp.exe""/ARGUMENTS"
Executor.ShowWindow = false
Set Executor = Server.CreateObject("ASPExec.Execute")
Response.Write "Attempting to execute " & Executor.Application & "<br>"
strResult = Executor.ExecuteWinApp
Response.Write "done"
set Executor=nothing

ASP PAGE, excuting as DOS App.

<%@ Language=VBScript %>
<%Option Explicit %>
dim oShell,tmpStr,oExec,RetCode,sExecStr
sExecStr"""C:\Program Files\remoteapp\remoteapp.exe""/ARGUMENTS"
Set oShell = Server.CreateObject("WScript.Shell")
Set oExec = oShell.Exec(sExecStr)

set oShell=nothing
set oExec=nothing

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO run WSH scripts from ASP?? fhameed Classic ASP Professional 1 July 2nd, 2006 10:55 AM
Problems using WSH and ASPEXEC hugogabriel Classic ASP Components 2 September 28th, 2005 08:07 AM
How do I make this C# code work in ASP.NET? aowen355 ASP.NET 1.x and 2.0 Application Design 1 July 19th, 2005 01:00 PM
This is how to make ASPEXEC, WSH work thru ASP texter Classic ASP Professional 3 September 1st, 2004 07:13 PM
ASPExec does not work!!! planeswalk Classic ASP Components 7 January 28th, 2004 07:33 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.