• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1386
  • Last Modified:

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\
0
Howzatt
Asked:
Howzatt
  • 5
  • 4
1 Solution
 
Pedro GamaCommented:
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 GamaCommented:
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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
HowzattAuthor Commented:
Tried that before. Same result.
0
 
Pedro GamaCommented:
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 GamaCommented:
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now