Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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
  #1 (permalink)  
Old January 5th, 2007, 04:11 AM
Authorized User
 
Join Date: Nov 2005
Location: , , Spain.
Posts: 72
Thanks: 3
Thanked 0 Times in 0 Posts
Default HELP, I CANT EXECUTE a CMD anymore! URGENT

Hi,

My server was always running fine until this morning.
I am executing a CMD.EXE on the server Using the next code:
===
Dim Executor
Set Executor = Server.CreateObject("ASPExec.Execute")
  Executor.Application = "cmd.exe /c copy C:\\codigobar\\cinta"&session("cinta")&"\\codigo.t xt \\CINTA"&session("cinta")&"\\zebra"&session("cinta ")
  Executor.Parameters = ""
  strResult = Executor.ExecuteDosApp
 Response.Write "<pre>" & strResult & "</pre>"
===

The session("cinta"),etc... are OK. Because if I execute it by hand (using the CMD command) it prints the ticket.
But it seems that suddenly it doesn´t execite a DOS COMMAND....
Normally you see at the server a CMD opening and closing very fast.... now you don´t.

I tried to install the ASPEXEC.DLL in the c:\windows\system32 and c:\windows directories (just to be sure). No result here.

The problems started after this night, that the server resetted itself.


Any help is welcome!!!!

Johny




  #2 (permalink)  
Old January 9th, 2007, 09:43 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Any particular reason you have to use CMD, rather than using FSO?
something like (and this is off the top of my head, so there may be errors)
Code:
Dim objFSO, srcFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set srcFile = objFSO.GetFile("C:\codigobar\cinta" & session("cinta") & "\codigo.txt")
srcFile.Copy ("C:\somewhere\else\file.txt")
Set srcFile = Nothing
Set objFSO = Nothing


I am a loud man with a very large hat. This means I am in charge


Similar Threads
Thread Thread Starter Forum Replies Last Post
not receiving emails anymore Michele_Haywood Access VBA 1 October 27th, 2006 09:52 AM
My ActiveX doesn't work anymore stenci Pro VB 6 0 April 2nd, 2006 02:21 AM
connection.execute and command.execute difference vinod_yadav1919 Classic ASP Databases 0 September 28th, 2005 06:34 AM
Right after DTS, query doesn't work anymore?! rweide Classic ASP Databases 6 January 21st, 2005 04:11 PM
conn.execute,command.execute or rs.open vinod_yadav1919 Crystal Reports 0 January 3rd, 2005 10:26 AM





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