Tuesday, November 11, 2008

[THIN] Re: Published applications in a mixed OS environment

i think if you use the "start" command to launch the program the dos box will after launching the program.

Try:

@echo off

IF /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" (

Start "%ProgramFiles(x86)%\Microsoft Office\Office12\EXCEL.EXE"

) ELSE (

Start "%ProgramFiles%\Microsoft Office\Office12\EXCEL.EXE"

)

Exit /B 0





On Tue, Nov 11, 2008 at 11:24 AM, Jim Kenzig http://thin.ms <jkenzig@gmail.com> wrote:
You could have it run minimized so at least it wasn't so noticable

Jim Kenzig
Blog: http://www.techblink.com


On Tue, Nov 11, 2008 at 12:19 PM, George Wasgatt <gwasgatt@gmail.com> wrote:

This works!  Problem is that it leaves a black DOS screen open until you exit the application.  Any ideas?

 

From: thin-bounce@freelists.org [mailto:thin-bounce@freelists.org] On Behalf Of Jeremy Saunders
Sent: Monday, November 10, 2008 4:57 PM


To: thin@freelists.org
Subject: [THIN] Re: Published applications in a mixed OS environment

 

Good pick up Dennis. I just typed it directly into Outlook without thinking J

 

@echo off

IF /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" (

"%ProgramFiles(x86)%\Microsoft Office\Office12\EXCEL.EXE"

) ELSE (

"%ProgramFiles%\Microsoft Office\Office12\EXCEL.EXE"

)

Exit /B 0

 

Cheers,

Jeremy.

 

From: thin-bounce@freelists.org [mailto:thin-bounce@freelists.org] On Behalf Of Dennis Parker
Sent: Tuesday, November 11, 2008 6:34 AM
To: thin@freelists.org
Subject: [THIN] Re: Published applications in a mixed OS environment

 

I see what "may" be a problem with that. I copied and pasted the second command structure below and once I added the proper % in the IF EXIST "%pro ...

I was able to recreate the error message.

 

I was able to clear it up by changing the quotes from the Fancy quotes to "Standard" quotes.

 

Does that make sense?

 

Hope it helps,

Dennis

 


From: George Wasgatt <gwasgatt@gmail.com>
To: thin@freelists.org
Sent: Monday, November 10, 2008 12:11:11 PM
Subject: [THIN] Re: Published applications in a mixed OS environment

I see where I was going wrong, I thought that the programfiles environment variable would tell me which architecture I was running on – not so. There are two programfiles environment variables for X-64 and one for X-32.  So I can't use that approach.

 

The processor architecture test should work, if I can get the syntax correct.  Here's the slightly modified batch file:

 

@echo on

IF /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" (

"%ProgramFiles(x86)%\Microsoft Office\Office12\EXCEL.EXE"

) ELSE (

"%ProgramFiles%\Microsoft Office\Office12\EXCEL.EXE"

)

Exit /B 0

 

I get back:

 

\Microsoft was unexpected at this time.

 

I tried a different approach, testing for the existence of the x86 file:

 

@echo on

IF EXIST "programfiles(x86)%\Microsoft Office\Office12\EXCEL.EXE" (

"%ProgramFiles(x86)%\Microsoft Office\Office12\EXCEL.EXE"

) ELSE (

"%ProgramFiles%\Microsoft Office\Office12\EXCEL.EXE"

)

Exit /B 0

 

And I get the same response: \Microsoft was unexpected at this time.

 

From: thin-bounce@freelists.org [mailto:thin-bounce@freelists.org] On Behalf Of Jeremy Saunders
Sent: Monday, November 10, 2008 12:08 PM
To: thin@freelists.org
Subject: [THIN] Re: Published applications in a mixed OS environment

 

Personally, I've not tried mixing architectures before in the same published application, and I would suggest that it's not a recommended practice, but you could get it to work a different way.

 

Change your published app to launch a .cmd file. The .cmd file would make the decision on the location of the application based on the %PROCESSOR_ARCHITECTURE% variable. Something like this…

 

@echo off

IF /I "%PROCESSOR_ARCHITECTURE%"=="x64" (

"%ProgramFiles(x86)%\Microsoft Office\Office12\EXCEL.EXE"

) ELSE (

"%ProgramFiles%\Microsoft Office\Office12\EXCEL.EXE"

)

Exit /B 0

 

Cheers,

Jeremy.

 

From: thin-bounce@freelists.org [mailto:thin-bounce@freelists.org] On Behalf Of George Wasgatt
Sent: Tuesday, November 11, 2008 1:50 AM
To: thin@freelists.org
Subject: [THIN] Re: Published applications in a mixed OS environment

 

We upgraded our farm to Presentation Manager 4.5 and added a new server running Windows 2003 Standard x64.  We want to load balance across the entire farm so we loaded our standard set of applications on the server.  We immediately ran into a problem – some of the applications were loaded into the subdirectory c:\program files (x86) rather than into c:\program files like they were on the 32 bit servers.

 

I thought I could just change the published application to something like this:

 

Command line:

  "%programfiles%\Microsoft Office\Office12\EXCEL.EXE"

 

Working Directory:

  %programfiles%\Microsoft Office\Office12

 

After testing this it starts OK on the 32 bit servers but fails on the 64 bit server with this error message (note: I named the published application Excel 64):

 

"Excel 64" Failed to start.

The Citrix server is unable to process your request.

Please try again.  If the problem persists,  contact your administrator.

 

But, if I hit OK on this message and launch the application again it starts just fine.

 

George Wasgatt

Network Administrator

ProHealth Physicians

4 Farm Spring Rd.

Farmington, CT 06032

Phone: 860-284-5264

 


Confidentiality and Privilege Notice
This document is intended solely for the named addressee.  The information contained in the pages is confidential and contains legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you.


 


Confidentiality and Privilege Notice
This document is intended solely for the named addressee.  The information contained in the pages is confidential and contains legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you.




No comments: