XenApp 6.5 - I want to publish client Software that is launched from a vbs file, which opens a batch file.

I am trying to publish the HP Device Manager Client software via XenApp 6.5.

The client software is a Java application. To Launch it, the Console shortcut launches a VBS file. The VBS then fires up a Batch file, which then launches the Java App.

The shortcut launches the following vbs file:
VBS
set wbs = wscript.createobject("WScript.shell")
wbs.run("Console.bat"), 0, true

Which as you can see launches the bat file
Batch File
cd lib
"..\..\JVM\bin\java.exe" -Xms256m -Xmx1024m -Dfile.encoding=Cp1252 -classpath .\*;hpdm-console.jar com.hp.hpdm.console.main.Console

But when I try launch the App, I get the following.
capture
The App is configured as follows:

Command Line:
c:\windows\system32\wscript.exe "\\(HOSTNAME)\d$\Program Files (x86)\Hewlett-Packard\HP Device Manager\Console\Console.vbs"

Working Directory:
c:\windows\system32\
HowzattAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pedro GamaCitrix AdminCommented:
Hello,

that "hostname" is your citrix server from where you wan't the app to be published?
0
HowzattAuthor Commented:
its the server it's been published from. When you create the published app, you pick the path to the server its installed on (which is the command line above). Then next window after that is to select the servers it is going to be running off.
0
Pedro GamaCitrix AdminCommented:
Yes that is correct. But you shouldn't input the path using the administrative share d$. You can also just target to the vbs file (without calling wscript.exe before)

Please try it this way:

Command Line:
"d:\Program Files (x86)\Hewlett-Packard\HP Device Manager\Console\Console.vbs"

(you can also try to run this command line from you citrix server just to check the path)
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

HowzattAuthor Commented:
Tried that before. Same result.
0
Pedro GamaCitrix AdminCommented:
If you run "d:\Program Files (x86)\Hewlett-Packard\HP Device Manager\Console\Console.vbs" on the server the command runs fine? Where is console.bat located?
0
HowzattAuthor Commented:
in the same folder
0
HowzattAuthor Commented:
and yes it runs fine
0
Pedro GamaCitrix AdminCommented:
Change the vbs script to:

set wbs = wscript.createobject("WScript.shell")
wbs.run("d:\Program Files (x86)\Hewlett-Packard\HP Device Manager\Console.bat"), 0, true


Publish the app using the following command line:

"d:\Program Files (x86)\Hewlett-Packard\HP Device Manager\Console\Console.vbs"
0
HowzattAuthor Commented:
If I try launch with the new script locally on the host server, it fails saying it can't find the file. I picked up that it's missing the last folder in the path (Console), but it still fails saying it cant find the file.
0
oBdACommented:
Change the "Working Directory" of the published app to "D:\Program Files (x86)\Hewlett-Packard\HP Device Manager\Console".
Both the VB script and the batch script rely on the working directory being the "Console" folder, while you published it with the working directory as "C:\Windows\system32", so the VB script looks for "C:\Windows\system32\console.bat" which it can't find for the obvious reason.
The command line should include the interpreter, in order to avoid issues if vbs is either associated with an editor or with cscript; the latter would still run the script, but the VB script is there to hide the batch console window, and if the VB script is started using cscript, you'll have the cscript console window open.
So to sum it up:
Command Line:
C:\Windows\system32\wscript.exe "D:\Program Files (x86)\Hewlett-Packard\HP Device Manager\Console\Console.vbs"

Open in new window

Working Directory:
D:\Program Files (x86)\Hewlett-Packard\HP Device Manager\Console

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Citrix

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.