473,320 Members | 1,862 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,320 software developers and data experts.

Problem with execute program in ASP

I try to execute a program in ASP but i get an error.
Even with script below i get 1 as result.
What's wrong?
Pse help, i'm new in ASP.
greets
DanC

<%@ LANGUAGE="JSCript" %>
<%
var WshShell = new ActiveXObject("WScript.Shell");

var oExec = WshShell.run("cmd /C \"ren :\\sss\\back.js
back2.js\"",0,"TRUE");
if (oExec==0)
{
Response.Write("it works!");
}
else
{
Response.Write(oExec);
}

%>

Jul 22 '05 #1
5 3965
Previous code wasn't good. But has nothing to do with the error.

<%@ LANGUAGE="JSCript" %>
<%
var WshShell = new ActiveXObject("WScript.Shell");

var oExec = WshShell.run("cmd /C \"ren c:\\sss\\back.js
back2.js\"",0,"TRUE");
if (oExec==0)
{
Response.Write("it works!");
}
else
{
Response.Write(oExec);
}

%>

Jul 22 '05 #2
"DanC" <Da**@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
I try to execute a program in ASP but i get an error.
Even with script below i get 1 as result.
What's wrong?
Pse help, i'm new in ASP.
greets
DanC

<%@ LANGUAGE="JSCript" %>
<%
var WshShell = new ActiveXObject("WScript.Shell");


see http://www.aspfaq.com/show.asp?id=2059
Jul 22 '05 #3
It helped but have now

CScript Error: Loading your settings failed. (access denied)

The used code is now

<% Response.Buffer = true %>
<%
Set objWShell = CreateObject("WScript.Shell")
Set objCmd = objWShell.Exec("\\Dc_test\SSS\cscript.exe
\\Dc_test\SSS\sasysdag.js /?")
strPResult = objCmd.StdOut.Readall()
set objCmd = nothing: Set objWShell = nothing
response.write ".<br>" & replace(strPResult,vbCrLf,"<br>")
%>

It looks like i'm not far of the problem

Jul 22 '05 #4


Set objCmd = objWShell.Exec("cscript /?")

what should give the help of cscript, give also
CScript Error: Loading your settings failed. (access denied)
Jul 22 '05 #5
It has nothing to do with permissions or exc.
It was a setting in the properties of the website in IIS.
There were only permisions to scripts. And not to scripts and executable
files.

Tnx anyway for reply.
Greets
DanC

Jul 22 '05 #6

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

Similar topics

5
by: Lad | last post by:
I have the following program( only insert a record) ################ import MySQLdb conn = MySQLdb.connect (host = "localhost",user = "", passwd = "",db="dilynamobily") cursor = conn.cursor ()...
2
by: Spieg | last post by:
I've a program with VB6 working with SQLServer 2000. I have a Central Station with the program runnin with full prvileges and that can perform all the actions on the DB. There are also some...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
4
by: eap90210 | last post by:
Hi to all ng I 'm a non expert user og db2 and i made a program that it connect to db2 and after goes to a table, verify that exists a value and after return success or not. My problem is...
3
by: Jenny | last post by:
Hi I have a C# (windows app) program where I call several stored procs. However there stored proc are very long (total of about 15-20 minutes) My Problem is that when a execute the program, it...
4
by: nishi57 | last post by:
I hope I can get some help regarding this issue, which has been going on for a while. I have a desktop user who is having problem running "Stored Procedures". The DB2 Connect application works fine...
1
by: Zairay | last post by:
Hi All, I'm having a problem with the Shell32.dll when I try to open a program from my Access db. When I try to open a program called FalconViewLite from my access database I get an error in...
6
by: gallerto | last post by:
I have a very extrange problem with calloc. I am working with Dev-C++ in Windows. The code is in C but I compile it as C++. All my files are .cpp I will explain the situation. I have a program...
6
by: =?Utf-8?B?amVmZmVyeQ==?= | last post by:
i need help with a combo box and this same code works on my first tab with a combo box. The error or problem i have is this code causes an index out of range error when i run it on my second combo...
1
by: wnaveenkumar | last post by:
package com.trewport.orderprocess.action; import java.io.*; import java.sql.*; import java.util.*; import java.util.Date; import java.lang.Object; import javax.servlet.*; import...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.