473,397 Members | 2,028 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,397 software developers and data experts.

Calling Exe in Asp

Hi,
I have a problem, i am calling an exe from asp program. Its not working
fine.
When i execute the exe through the dos program directly i get the desired
result.
My exe will convert files in the folder to encrypted files.

But when i call it thru asp program its not working fine. I have tried the
following method.

a) Calling the exe through shell program.
b) Calling the exe through ASPEXEC.
c) Calling the exe through the Batch Files.

I would like to know your suggestions.
Regards
Vinod

Jul 22 '05 #1
8 8305
Can you define "it's not working fine"?? (e.g. what IS happening?)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Vinod" <vi***@erivasystems.com> wrote in message
news:#L**************@TK2MSFTNGP10.phx.gbl...
Hi,
I have a problem, i am calling an exe from asp program. Its not working
fine.
When i execute the exe through the dos program directly i get the desired
result.
My exe will convert files in the folder to encrypted files.

But when i call it thru asp program its not working fine. I have tried the
following method.

a) Calling the exe through shell program.
b) Calling the exe through ASPEXEC.
c) Calling the exe through the Batch Files.

I would like to know your suggestions.
Regards
Vinod

Jul 22 '05 #2
"Vinod" wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
: I have a problem, i am calling an exe from asp program. Its not working
: fine.
: When i execute the exe through the dos program directly i get the desired
: result.
A single tasking mode app that only uses real memory?

: My exe will convert files in the folder to encrypted files.
What type?

: But when i call it thru asp program its not working fine. I have tried the
: following method.
Fine is relative.

: a) Calling the exe through shell program.
: b) Calling the exe through ASPEXEC.
: c) Calling the exe through the Batch Files.
:
: I would like to know your suggestions.

With all the calling you've probably run over on your minutes. It's peak
hours and you could be roaming. My suggestion is wait until after 9pm and
try again or display the errors you are getting with the processes you are
trying.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp

Jul 22 '05 #3
Hi Steven,

I will explain the scenario, when i run my exe from dos prompt it
works fine.The end result of the exe is to
convert all the files in the folder to encrypted file.The exe works
fine.

When i call this exe thru asp program.Its not showing the desired
results ie the files are still in the same format its not encrypted.

I used the following method

Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c c:\test\encrypt.exe"

There is no error coming after the execution of the above.

Regards
Vinod
"Steven Burn" <so*******@in-time.invalid> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Can you define "it's not working fine"?? (e.g. what IS happening?)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Vinod" <vi***@erivasystems.com> wrote in message
news:#L**************@TK2MSFTNGP10.phx.gbl...
Hi,
I have a problem, i am calling an exe from asp program. Its not working
fine.
When i execute the exe through the dos program directly i get the desired result.
My exe will convert files in the folder to encrypted files.

But when i call it thru asp program its not working fine. I have tried the following method.

a) Calling the exe through shell program.
b) Calling the exe through ASPEXEC.
c) Calling the exe through the Batch Files.

I would like to know your suggestions.
Regards
Vinod


Jul 22 '05 #4
"Vinod" <vi***@erivasystems.com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl...
Hi Steven,

I will explain the scenario, when i run my exe from dos prompt it
works fine.The end result of the exe is to
convert all the files in the folder to encrypted file.The exe works fine.

When i call this exe thru asp program.Its not showing the desired
results ie the files are still in the same format its not encrypted.

I used the following method

Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c c:\test\encrypt.exe"

There is no error coming after the execution of the above.

Regards
Vinod


[snip]

Where are the files?
Are they also in "c:\test\"?
Or can you specify a path as an argument?
Is "encrypt.exe" a downloadable utility?

Jul 22 '05 #5
The files will be wmv files.The path can be specified as an argument.
Its not a downloadable utility. It resides in a folder in the server and i
will invoke it thru my asp program.
Or
If it is a downloadable utility it will display the popup message
(open,save), is there a way around so that it will by default will open and
i wont see
this popup.
Regards
Vinod


"McKirahan" <Ne**@McKirahan.com> wrote in message
news:Le********************@comcast.com...
"Vinod" <vi***@erivasystems.com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl...
Hi Steven,

I will explain the scenario, when i run my exe from dos prompt it works fine.The end result of the exe is to
convert all the files in the folder to encrypted file.The exe

works
fine.

When i call this exe thru asp program.Its not showing the desired results ie the files are still in the same format its not encrypted.

I used the following method

Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c c:\test\encrypt.exe"

There is no error coming after the execution of the above.

Regards
Vinod


[snip]

Where are the files?
Are they also in "c:\test\"?
Or can you specify a path as an argument?
Is "encrypt.exe" a downloadable utility?

Jul 22 '05 #6
"Vinod" <vi***@erivasystems.com> wrote in message
news:uG*************@TK2MSFTNGP15.phx.gbl...
The files will be wmv files.The path can be specified as an argument.
Its not a downloadable utility. It resides in a folder in the server and i
will invoke it thru my asp program.
Or
If it is a downloadable utility it will display the popup message
(open,save), is there a way around so that it will by default will open and i wont see
this popup.
Regards
Vinod


[snip]

Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c c:\test\encrypt.exe"

Is the code you posted (above) the code you run or just an example?

It doesn't include a path to your ".wmv" files?

When you specify a path make sure that it's relative to your Web root.

Also, I was asking where can I download this utility to test it.

(Please do not top post.)
Jul 22 '05 #7

"McKirahan" <Ne**@McKirahan.com> wrote in message
news:Su********************@comcast.com...
"Vinod" <vi***@erivasystems.com> wrote in message
news:uG*************@TK2MSFTNGP15.phx.gbl...
The files will be wmv files.The path can be specified as an argument.
Its not a downloadable utility. It resides in a folder in the server and i will invoke it thru my asp program.
Or
If it is a downloadable utility it will display the popup message (open,save), is there a way around so that it will by default will open

and
i wont see
this popup.
Regards
Vinod


[snip]

Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c c:\test\encrypt.exe"

Is the code you posted (above) the code you run or just an example?

It doesn't include a path to your ".wmv" files?

When you specify a path make sure that it's relative to your Web root.

Also, I was asking where can I download this utility to test it.

(Please do not top post.)

Hi,

The code i posted above is just an example only small changes is there. I
will say the full code will look like this

Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c c:\test\encrypt.exe c:\test\"

The first parameter will be the folder name and the second parameter will be
the location of wmv files.

See my exe will be present in the server and the files will also reside in
the server, i will change the location of the files dynamically thru the
program.

If you can suggest me any place i will upload it there.

Regards
Vinod


Jul 22 '05 #8
> a) Calling the exe through shell program.
b) Calling the exe through ASPEXEC.
c) Calling the exe through the Batch Files.

Hi,
I'm going to tag along at this thread - dealing with the same problem as
you at the moment.
I have a some .bat files generating .txt files with pings and traceroutes
to certain hosts, and i need to call these .bat files from asp.
I have tried with wscript.shell and AspExec, and also i am not getting any
errors but the files aren't getting executed
I have tried assigning iusr_servername permissions on both tracert.exe, ping.exe,
cmd.exe and the .bat files.

The script combinations i have tried are the following, and the fiels works
fine when calling them manually on the server:
set wshell = server.createobject("wscript.shell")
wshell.Run "cmd.exe /c c:\Inetpub\wwwroot\scripts\script.bat"
set wshell = nothing

set wshell = server.createobject("wscript.shell")
Response.write wshell.run("c:\Inetpub\wwwroot\scripts\script.bat" )
set wshell = nothing

Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "c:\Inetpub\wwwroot\scripts\script.bat"
Executor.TimeOut = 10000
Executor.ShowWindow = False
Executor.ExecuteWinApp

Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cmd.exe"
Executor.Parameters = "/c c:\Inetpub\wwwroot\scripts\script.bat"
Executor.TimeOut = 10000
Executor.ShowWindow = False
Executor.ExecuteWinApp
I have tried with executing as DosApp too and with ShowWindows = True, without
any luck.
I tried the AspExec example tracerouting too, however this didnt work until
i gave iusr_servername permissions at tracert.exe - but which permissions
can be missing when it still aint working in my bat files? they look like
this:
ping -a cnn.com > c:\Inetpub\wwwroot\data\ping.txt
tracert cnn.com > c:\Inetpub\wwwroot\data\traceroute.txt
Could it perhaps be something that denies the bat file to write the textfiles?
I have assigned writing permissions for iusr_servername too, but is there
any application i am missing to assign them to?
And is there anything that i could add to the .bat file so that i could see
if it's even being executed or not?
--
Regards,
Sune

Jul 22 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Asapi | last post by:
1. Are linkage convention and calling convention referring to the same thing? 2. Does calling convention differ between languages C and C++? 3. How does calling convention differ between...
8
by: Muthu | last post by:
I've read calling conventions to be the order(reverse or forward) in which the parameters are being read & understood by compilers. For ex. the following function. int Add(int p1, int p2, int...
7
by: Klaus Friese | last post by:
Hi, i'm currently working on a plugin for Adobe InDesign and i have some problems with that. I'm not really a c++ guru, maybe somebody here has an idea how to solve this. The plugin is...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
3
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. ...
2
by: Geler | last post by:
A theoretical question: Sorry if its a beginner question. Here is a quote from the MSDN explaning the C/C++ calling convention.. It demonstrates that the calling function is responsible to clean...
47
by: teju | last post by:
hi, i am trying 2 merge 2 projects into one project.One project is using c language and the other one is using c++ code. both are working very fine independently.But now i need to merge both...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
10
by: sulekhasweety | last post by:
Hi, the following is the definition for calling convention ,which I have seen in a text book, can anyone give a more detailed explanation in terms of ANSI - C "the requirements that a...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.