Solved

Call a File from Batch/Shortcut

Posted on 2009-04-02
7
1,205 Views
Last Modified: 2012-05-06
There are two desktop applications that I am trying to run at the same time via a desktop shortcut or a batch file but one of the applications needs to call an XML file.  We are trying to prevent our users from having to navigate to the location of the XML file (network or local) each time they run the application.

App1:  Onbase client   (Hyland software)
App2:  AppEnabler (this needs to call the XML file)   (Hyland software)  

Running AppEnabler via the command prompt/batch file works just fine, see below.  It calls and opens the XML file automatically.   The app then stays in the system tray.  But I am trying to combine this with the onbase client.

(THIS WORKS) START "" "C:\Program Files\Hyland\Application Enabler\AEClient.exe" "\\Path\to\XML\file\AE.xml"

The Onbase client can be launched with a -AE switch (appenabler) appended at the end of the desktop shortcut ("c:\path to client\onbase.exe" -AE).  This will launch appenabler but prompts the users to the XML file each time.  I've tried  "c:\path to client\onbase.exe" -AE "path-to-XML file" but does not work.  

Essentially, I want the users to be able to launch the onbase client, appenable, and calls the XML automatically - all in one shot via a shortcut or a batch file.

Thank you.


0
Comment
Question by:isstechy
7 Comments
 
LVL 43

Accepted Solution

by:
Steve Knight earned 250 total points
ID: 24054532
Well... you could easily make a batch file with two START commands in called "RunOnbase.cmd" for instance and send the shortcut there OR you could do a single shortcut running

cmd /c START "" "C:\Program Files\Hyland\Application Enabler\AEClient.exe" "\\Path\to\XML\file\AE.xml" & START "" "c:\path to client\onbase.exe"

all on one line

e.g. I just did this as a test shortcut:

%windir%\system32\cmd.exe /c START "" excel & START "" winword

which fires up word and excel at th same time.

Steve
0
 
LVL 6

Expert Comment

by:Justin_W_Chandler
ID: 24054761
This is not a problem of batch scripting, but a problem of knowing the command execution syntax for APPENABLER.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 24055210
Yeap, nothing you can do besides getting the correct syntax for the Hyland software.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Closing Comment

by:isstechy
ID: 31565999
Thanks for the syntax.  It worked for us.  Appreciate your expert suggestion.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 24121744
glad it helped

steve
0
 
LVL 6

Expert Comment

by:Justin_W_Chandler
ID: 24129641
This was not a valid solution to the problem. He didn't like the real answer [which was that if his application is not opening the file submitted as a command line argument, it won't work], so he just awarded points to you.

J
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 24131455
I read it differently... he said if the app enabler was run with commandline then it  worked but needed to be run from the same shortcut.  Another possible solution may be (and of course also depends on the app) is changing the working directory to be the path of the enabler files and then it may be looking in the pwd for it.

He said if run manualy then it works so will work identically to that from a batch file suggested for instance...

Anyway neither here nor there, though always good to get feedback from h person asking.

Steve
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now