This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unable to run excel via cron


On Tue, Jun 16, 2015 at 9:27 AM, Kertz, Denis (D)** CTR **
<d.kertz@alcatel-lucent.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:
>
> 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
>

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.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]