Jump to content

Run a Shorcut lnk with ini


Jobo
 Share

Recommended Posts

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?

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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:
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...