X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:message-id:content-type
	:content-transfer-encoding:mime-version; q=dns; s=default; b=JTJ
	c6lragDPHSgrgbkgT5D/jfqWmruqlv2MsZYn/i1TfoHPAFvLQiaYs7zMSoUrGX2q
	cDVJJgEAx6zN20l5ZsnlDM/mNI3rdAfw3NOgcliz7KINKk9L9oYZqGan62bdbrab
	eonq2mo9jnRLhJDjCWpm108dilaEF/ME3izTSgD0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:message-id:content-type
	:content-transfer-encoding:mime-version; s=default; bh=vdsFDOwWU
	lMDct8iegLWhixj3BA=; b=fAngZBaKx+vG0XUHpQZAI+mcIA+7E/84Ssio8ukYC
	C2IFIudnvR5ySkcuASaljsK/XubFnLgIlGbr3Vf3ble7eXpzrR2ecjjT8QLjPFnD
	WIYmee/nxOuczShuIHo5DEnhEATeeU2EUtb09cNPbR45K9SgyqtfQZwf9eJ5ake6
	cs=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: Yes, score=6.5 required=5.0 tests=AWL,BAYES_50,GARBLED_BODY,KAM_LAZY_DOMAIN_SECURITY,MIME_CHARSET_FARAWAY,RP_MATCHES_RCVD autolearn=no version=3.3.2
X-HELO: smtp-fr.alcatel-lucent.com
From: "Kertz, Denis (D)** CTR **" <d.kertz@alcatel-lucent.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Unable to run excel via cron
Date: Tue, 16 Jun 2015 13:27:48 +0000
Message-ID: <883F2CBBC85A62419E181EB2F0ECF21F45DE3251@US70UWXCHMBA04.zam.alcatel-lucent.com>
x-cr-puzzleid: {9676CA7D-EF4D-4822-A835-60909D61225D}
x-cr-hashedpuzzle: CEvn CYOS C6D6 DKbw DUTx DymX ENVv EsEH E1nm E/rz FHo8 FkJr GDmm GEd5 GWtQ G/uF;1;YwB5AGcAdwBpAG4AQABjAHkAZwB3AGkAbgAuAGMAbwBtAA==;Sosha1_v1;7;{9676CA7D-EF4D-4822-A835-60909D61225D};ZAAuAGsAZQByAHQAegBAAGEAbABjAGEAdABlAGwALQBsAHUAYwBlAG4AdAAuAGMAbwBtAA==;Tue, 16 Jun 2015 13:27:42 GMT;VQBuAGEAYgBsAGUAIAB0AG8AIAByAHUAbgAgAGUAeABjAGUAbAAgAHYAaQBhACAAYwByAG8AbgA=
Content-Type: text/plain; charset="koi8-r"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t5GDSBMa001065

We need to run some Excel programs via cron and are using vbscript to do this. We have this running on a WinXP machine but are having trouble running on a Win7 machine, but we don't think it is a Win7 problem. 

Here's the script to run a simple test excel program: 

Dim xlApp 
Dim xlWb 
Set xlApp = CreateObject("Excel.application") 
xlApp.Visible = True 
Set xlWb = xlApp.workbooks.Open("c:\Shared\Prospect\Bin\TestExcel.xls") 
xlApp.Quit 
Set xlWb = Nothing 
Set xlApp = Nothing 

Here's how we run this test script from a terminal command prompt: 

c:/Windows/System32/wscript.exe 'c:\cygwin64\home\<cygwinLogin>\tst.vbs' 

This runs fine from a command line prompt but hangs when run as a cron job. We have trapped the error message we get when the workbooks.Open is executed and get this: 

Microsoft Office Excel cannot access the file 'c:\Shared\Prospect\Bin\TestExcel.xls'. There are several possible reasons: 

 The file name or path does not exist. 
 The file is being used by another program. 
 The workbook you are trying to save has the same name as a currently open workbook. 

We don't believe any of these possible reasons apply. In particular, since it looked like this could be a permission issue, we changed the vbscript to simply copy the TestExcel.xls file and that works fine:

dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
If filesys.FileExists("c:\Shared\Prospect\Bin\TestExcel.xls") Then
 filesys.CopyFile "c:\Shared\Prospect\Bin\TestExcel.xls", "c:\cygwin64\home\<cygwinLogin>\"
Else
 WScript.Echo "file does not exist"
End If

This hanging also happens if we create a new spreadsheet and try to save it (and this works fine from a command line prompt). So we can run excel programs from a cron job as long as we don't open an excel program or save a spreadsheet, which means it is useless. 

We also have a couple of other Win7 PCs. This problem happens on 2 of the 3 Win7 PCs but works on one of the Win7 PCs. All 3 PCs are running Excel 2007 SP3. Two of these 3 PCs have the exact same version of Excel 2007 and one works and the other doesn't.

Anybody have any idea what could be going on here? We only have this cron job problem when running an excel program via vbscript. We haven't had any cron job problems with other non-excel scripts. 

Denis

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


