delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/06/17/12:45:58

X-Recipient: archive-cygwin AT delorie DOT 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:references:in-reply-to:subject:date
:message-id:mime-version:content-type:content-transfer-encoding;
q=dns; s=default; b=J3aJwoxeTeI0RTMN32j/SpCZyPIgllWGkPcQ4pdZaVZ
Qi0OYcc7TjtWgo9Nu+W37mPG8TezEPpH2SHmccRtqXl5M0uEAy6agjLs8qDXdWIx
fwLTwdDAa68uZeWO14zDXCoxWEPyq1ZmzPfkitSGwkcKHlKKV7nqu4zXFDGB2YcE
=
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:references:in-reply-to:subject:date
:message-id:mime-version:content-type:content-transfer-encoding;
s=default; bh=P3hsM8bkJeHGUl3yceL+ffDXikU=; b=VH8g5ZR0IASXRfgf1
XUzT9azPGHv3tCFHNIBPyrKnlWonTSozhzhhTmeqFMjyEpjVWhno7rPnHOol9PZ2
2kRVSaHuSqMbYwha23iND0ElS7Zrbxhx4NGnvYUKOrJTA6GjeDYTcgqTno6/ijrq
x685i5bCXrbQrD3gXUzcpsaijI=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.0 required=5.0 tests=AWL,BAYES_50,CYGWIN_OWNER_BODY,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2
X-HELO: resqmta-po-02v.sys.comcast.net
From: "Andy Hall" <fixpertise-consulting AT comcast DOT net>
To: "'Kiehl, Horst'" <h DOT p DOT kiehl AT fz-juelich DOT de>,
"'Kertz, Denis \(D\)** CTR **'" <d DOT kertz AT alcatel-lucent DOT com>,
<cygwin AT cygwin DOT com>
References: <883F2CBBC85A62419E181EB2F0ECF21F45DE3905 AT US70UWXCHMBA04 DOT zam DOT alcatel-lucent DOT com> <5cd29bc9b87544e98bceea5756738610 AT IBTEXCHMB1 DOT ibt DOT kfa-juelich DOT de>
In-Reply-To: <5cd29bc9b87544e98bceea5756738610@IBTEXCHMB1.ibt.kfa-juelich.de>
Subject: RE: Unable to run excel via cron
Date: Wed, 17 Jun 2015 09:45:29 -0700
Message-ID: <007401d0a91d$066a2630$133e7290$@comcast.net>
MIME-Version: 1.0
X-IsSubscribed: yes

> -----Original Message-----
> From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of Kiehl, Horst
> Sent: Wednesday, June 17, 2015 8:10 AM
> To: Kertz, Denis (D)** CTR **; cygwin AT cygwin DOT com
> Subject: RE: Unable to run excel via cron
> 
> (Trying to remove TOFU to make the conversation appear chronological again and with correct attributions.)
> 
> Kertz, Denis (D)** CTR ** <d.kertz at alcatel-lucent dot com> wrote:
> > > > 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:
> > > >
> > > > [...]
> 
> Bryan Berns wrote:
> > > What bitness of Excel and Cygwin are you running?
> > >
> > > CreateObject("Excel.application") will attempt to create a 32-bit
> > > instance of Excel when launched through the 32-bit version of
> > > wscript.exe or a 64-bit instance of Excel when launched through the
> > > 64-bit version of Excel.  Which bitness of WScript.exe ends up being
> > > run will depend on the bitness of the parent program (which may be
> > > different in a command prompt vice Cygwin).  Try changing it to run
> > > Wscript.exe in SysWow64 instead of System32 (which is subject to
> > > automatic redirection) and see if changes the behavior.  If you're not
> > > running a 64-bit OS, then just ignore everything I said.
> 
> Kertz, Denis (D)** CTR ** wrote:
> 
> > Unfortunately, using the 64-bit wscript.exe didn't change anything - same behavior as before with excel hanging.
> >
> > We are using 64-bit cygwin and 32-bit Excel (Excel 2007).
> 
> Although the aspect Corinna wrote about may be the culprit already,
> just in case:
> 
> It appears that you, Denis, were misunderstanding Bryan. The consequence
> of what he tried to point out might be that you, using 64-bit Cygwin and
> 32-bit Excel, would have to explicitly use the 32-bit wscript.exe
> instead of the 64-bit wscript.exe, to make sure that wscript.exe
> (32-bit) will start Excel (32-bit) successfully. In other words, you
> might have to use $windir/SysWOW64/wscript.exe (i.e.
> %windir%\SysWOW64\wscript.exe) from your 64-bit Cygwin process.
> 
> (The reason for the seemingly backwards 32-bitness and 64-bitness of
> executables in SysWOW64 and system32, respectively, if viewed from a
> 64-bit process, is to make code with hardcoded "system32", whether
> compiled or interpreted, continue to work in a 64-bit context as well as
> in a 32-bit context.)
> 
> Horst
> 
Years ago,  I had a similar problem on Windows Server 2003.  I needed to run a component of Visual Studio in a
Cygwin-based nightly build system.   It would not run unless Visual Studio was running prior to the builds starting.   I
solved it by first bringing up Visual Studio this way.

VISUAL_STUDIO="Microsoft Visual Studio 8"

ps -W | grep -q "$VISUAL_STUDIO" || \
	cygstart --showminnoactive \
	"/cygdrive/c/Program Files/$VISUAL_STUDIO/Common7/IDE/devenv.exe" /edit

So my question is, does having the Excel UI visible prior to running the cron job help?  

The other difference is I used the Windows Task Scheduler instead of cron to kick off the nightly build.   The .bat file
(still running, but obviously obsolete)  is

======
	@echo off

	C:
	chdir C:\cygwin\bin

	rem set CYGWIN=ntsec
	set CYGWIN=binmode,nodosfilewarning

	bash --login -i "/home/build/bin/nightly_bootstrap.sh"
======

This seemed to side-step any problems resulting from the differences in permission handling between Cygwin and Windows.


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019