Solved

Call a File from Batch/Shortcut

Posted on 2009-04-02
7
1,209 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

861 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

26 Experts available now in Live!

Get 1:1 Help Now