SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Relative linking with RunAndWait

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Relative linking with RunAndWait
Author Message
Rachel



Joined: 23 Aug 2000
Posts: 11

Post Relative linking with RunAndWait Reply with quote

Dear Technical Support,

For the command RunAndWait, the first parameter is the path to the executable file. Is there a way to create a relative link to that file? I would like to minimize having to change all my links in my scripts should I ever move my executables.

Can I call my files by their Job Names using RunAndWait?

Thank you very much for all your help.

Rachel

Wed Aug 23, 2000 8:13 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6509

Post Re: Relative linking with RunAndWait Reply with quote

: For the command RunAndWait, the first parameter is the path to the executable
: file. Is there a way to create a relative link to that file? I would like
: to minimize having to change all my links in my scripts should I ever move
: my executables.

You can do something like the following:
1. Create a job that runs "on 24x7 startup"
// Declare global variable (in the script it must appear on one line)
Dim global.ROOT, string, "c:\\path\\to\\root\\directory\\where\\I\\keep\\my\\programs\\"

2. In all other script jobs:
Dim exe_name, string, "myprogram.exe"

Concat global.ROOT, exe_name, exe_name
RunAndWait exe_name, ....

This way you will need to change just one script in one place should you ever move your executables to some other place.

: Can I call my files by their Job Names using RunAndWait?
Use same tehnique.
In the "startup" job, establish names then use global variables instead of program names

For example
Dim global.FTPFiles123, string, "c:\\path\\to\\root\\directory\\where\\I\\keep\\my\\programs\\"

In onther jobs:
RunAndWait global.FTPFiles123


Wed Aug 23, 2000 8:38 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6509

Post Re: Relative linking with RunAndWait Reply with quote

Another good method (and probably better one) is to use some .INI file. This will let you change program names and directories even without going to 24x7. You can also use glabl search and replace to change their names.

Dim FTPFiles123, string
IniFileGetKey("c:\\24x7\\settings.ini", "Programs", "My FTP program", FTPFiles123)
RunAndWait FTPFiles123, ....

: You can do something like the following: 1. Create a job that runs "on
: 24x7 startup"
: // Declare global variable (in the script it must appear on one line)
: Dim global.ROOT, string,
: "c:\\path\\to\\root\\directory\\where\\I\\keep\\my\\programs\\"

: 2. In all other script jobs: Dim exe_name, string, "myprogram.exe"

: Concat global.ROOT, exe_name, exe_name
: RunAndWait exe_name, ....

: This way you will need to change just one script in one place should you ever
: move your executables to some other place.
: Use same tehnique.
: In the "startup" job, establish names then use global variables
: instead of program names

: For example
: Dim global.FTPFiles123, string,
: "c:\\path\\to\\root\\directory\\where\\I\\keep\\my\\programs\\"

: In onther jobs: RunAndWait global.FTPFiles123

Wed Aug 23, 2000 11:02 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.