Sign in to follow this  
Followers 0
Jobo

Run a Shorcut lnk with ini

7 posts in this topic

Hi I am new at this,

I have a program which I need to run first before launching two subsequent ones.

The problem is that the program uses an ini file to launch a specific version.(server or client)

Information for the shortcut lnk as follows:

Shortcut target Path: "C:\Program Files\AGFA\d-workflow\GPLauncher.exe"

Working Directory: "C:\Program Files\AGFA\d-workflow\server"

Arguments: launch_server.ini

Link Path info:

C:\Documents and Settings\All Users\Start Menu\Programs\Agfa\d-workflow\Server.Lnk

I have tried the following but the program gives an error:

Run('"C:\Program Files\AGFA\d-workflow\GPLauncher.exe" launch_server.ini')

ERROR message given by app. "Cannot open launch_server.ini"

I help on to either run the shortcut link or a run command that will get the exe to apply the ini file?

Share this post


Link to post
Share on other sites



ERROR message given by app. "Cannot open launch_server.ini"

Are you trying to actually open the INI and view it?

Because you do not need to run it to read whats in it

Look at

'IniRead'

In the helpfile

Share this post


Link to post
Share on other sites

Are you trying to actually open the INI and view it?

Because you do not need to run it to read whats in it

Look at

'IniRead'

In the helpfile

No I do not need to view the INI, the exe requires the setting in the ini to run.

Rgds

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

run("<shortcut path>")

couldnt u just run the shortcut?

Edited by Golbez

Share this post


Link to post
Share on other sites

run("<shortcut path>")

couldnt u just run the shortcut?

That would be easy but it does not work as with a standard shortcut to an exe.

This is the ini file contents called:

[ENVIRONMENT]

PATH=../dlls;%PATH%

JARS=../jars

CLASSPATH=.;../config;%JARS%/log4j.jar;%JARS%/jdom.jar;%JARS%/xerces.jar;%JARS%/pdmserver.jar

[COMMAND]

COMMAND=..\jre\bin\javaw.exe

OPTION=-Xmx128m

OPTION=-Djava.security.policy=resource/server.policy

OPTION=-DServerURL=localhost:2091

OPTION=-DClientCheckerPort=9998

OPTION=-DThreadSleepTime=2000

OPTION=-DCheckSpacePeriod=60000

OPTION=com.agfa.imaging.pdm.server.PDMServer

CAPTION=d-workflow

Tx

Share this post


Link to post
Share on other sites

Hi I am new at this,

I have a program which I need to run first before launching two subsequent ones.

The problem is that the program uses an ini file to launch a specific version.(server or client)

Information for the shortcut lnk as follows:

Shortcut target Path: "C:\Program Files\AGFA\d-workflow\GPLauncher.exe"

Working Directory: "C:\Program Files\AGFA\d-workflow\server"

Arguments: launch_server.ini

Link Path info:

C:\Documents and Settings\All Users\Start Menu\Programs\Agfa\d-workflow\Server.Lnk

I have tried the following but the program gives an error:

Run('"C:\Program Files\AGFA\d-workflow\GPLauncher.exe" launch_server.ini')

ERROR message given by app. "Cannot open launch_server.ini"

I help on to either run the shortcut link or a run command that will get the exe to apply the ini file?

Try something like this

Run('"C:\Program Files\AGFA\d-workflow\GPLauncher.exe" launch_server.ini',"C:\Program Files\AGFA\d-workflow\server")

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

Try something like this

Run('"C:\Program Files\AGFA\d-workflow\GPLauncher.exe" launch_server.ini',"C:\Program Files\AGFA\d-workflow\server")
Thanks for the Help - It is working fine now :whistle:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0