Running a Windows shortcut with prowin32.exe and -b (PROPATH

Posted by MBeynon on 28-Dec-2017 06:06

Hi,

As above I have a windows shortcut with the following;

Target;

C:\OE102B\bin\prowin32.exe -b -basekey ini -ininame RunTasks.ini -pf RunTasks.pf -p RunTasks.r -param '1,2,3'

Start In;

C:\.....jobs.

My problem is that the PROPATH does not seem to getting set. My RunTasks.p file tries to access a static property of a class;

...utilities.LoadConfig:pConfig = ipcConfigPath NO-ERROR.

But I get the error;

LoadConfig error: Static instance failed to load. Cannot reference ....utilities.LoadConfig. (14631)

I tried to instanciate an instance class too but with no luck. The error was;

** "...taskscheduler.TaskScheduler" was not found. (293)

My ini file looks correct. I also tried not using an ini file and using a starter program to set the correct PROPATH and call my RunTasks.p, also with no luck.

Can anyone help with this?

Thanks,

Mark.

All Replies

Posted by Brian K. Maher on 28-Dec-2017 06:12

What is shown if you add this line to your code...
 
message propath view-as alert-box.
 
Brian

Posted by MBeynon on 28-Dec-2017 06:20

Hi Brian,

I get the expected PROPATH in the message. That's what's confusing me a little!

PROPATH: C:\...TaskScheduler,C:\...jobs,C:\...utilities,C:\...classes,C:\OE102B\gui,C:\OE102B\gui\adecomm.pl,C:\OE102B\gui\adecomp.pl,C:\OE102B\gui\adedesk.pl,C:\OE102B\gui\adedict.pl,C:\OE102B\gui\adeedit.pl,C:\OE102B\gui\adeicon.pl,C:\OE102B\gui\aderes.pl,C:\OE102B\gui\adeshar.pl,C:\OE102B\gui\adeuib.pl,C:\OE102B\gui\adeweb.pl,C:\OE102B\gui\adexml.pl,C:\OE102B\gui\prodict.pl,C:\OE102B\gui\protools.pl,C:\OE102B,C:\OE102B\bin

My Config class with the static properties and methods lives in the utilities folder.

Mark.

Posted by MBeynon on 28-Dec-2017 06:23

Hi Brian.

I get the expected output;

PROPATH: C:\...TaskScheduler,C:\...jobs,C:\...utilities,C:\...classes,C:\OE102B\gui,C:\OE102B\gui\adecomm.pl,C:\OE102B\gui\adecomp.pl,C:\OE102B\gui\adedesk.pl,C:\OE102B\gui\adedict.pl,C:\OE102B\gui\adeedit.pl,C:\OE102B\gui\adeicon.pl,C:\OE102B\gui\aderes.pl,C:\OE102B\gui\adeshar.pl,C:\OE102B\gui\adeuib.pl,C:\OE102B\gui\adeweb.pl,C:\OE102B\gui\adexml.pl,C:\OE102B\gui\prodict.pl,C:\OE102B\gui\protools.pl,C:\OE102B,C:\OE102B\bin

My static property class LoadConfig is in the utilities folder.

Mark

Posted by Brian K. Maher on 28-Dec-2017 06:28

Specify fully qualified paths (no ..’s)

Posted by Brian K. Maher on 28-Dec-2017 06:30

I think you are being hit by MS’s “i know better than you do” mentiality where it makes the current working directory be something other than what you specified.
 
You can test this by running the following code:
 
file-info:file-name = “.”.
message file-info:full-pathname view-as alert-box.

Posted by Brian K. Maher on 28-Dec-2017 06:30

Also, when you say the my config class lives in the utilities folder, make sure that it matches the class package name (i.e. my.config.someclass would need to be in c:\...utilities\my\config directory).

Posted by MBeynon on 28-Dec-2017 06:52

I've taken your advice Brian and everything checks out. Still no joy I'm afraid but thanks for taking the time to reply.

My gut feeling is that it's the -b startup parameter so I'll concentrate my efforts in that area.

Mark.

Posted by Brian K. Maher on 28-Dec-2017 07:00

Mark,
 
What happens if you remove the -b parameter?  Does the code work?

Posted by MBeynon on 28-Dec-2017 07:05

All sorts of hilarity ensues as the AVM tries to open each one of the -param entries as if it were a file;

[17/12/28@13:02:47.034+0000] P-010296 T-014168 2 4GL 4GLMESSAGE '1

[17/12/28@13:02:47.034+0000] P-010296 T-014168 2 4GL 4GLMESSAGE Cannot open file.

[17/12/28@13:02:47.034+0000] P-010296 T-014168 2 4GL 4GLMESSAGE

[17/12/28@13:02:47.034+0000] P-010296 T-014168 2 4GL 4GLMESSAGE The path or filename may be incorrect or the file may not exist.

[17/12/28@13:02:47.034+0000] P-010296 T-014168 2 4GL 4GLMESSAGE Creating Untitled buffer in its place.

Posted by Brian K. Maher on 28-Dec-2017 07:08

I believe that’s because your code doesn’t end with a QUIT statement.

Posted by MBeynon on 28-Dec-2017 07:13

Ah, yes, I'd forgotten that I'd commented the QUIT out! Still the same problem so there goes my -b theory!

Posted by Brian K. Maher on 28-Dec-2017 07:28

Mark,
 
Join this gotomeeting and we can work through the problem...
 

Meet Now

Please join my meeting from your computer, tablet or smartphone.
https://global.gotomeeting.com/join/912223661

You can also dial in using your phone.
United States (Toll Free): 1 877 309 2070
United States: +1 (312) 757-3117

Access Code: 912-223-661

More phone numbers
Argentina (Toll Free): 0 800 266 1378
Australia (Toll Free): 1 800 191 358
Australia: +61 2 6188 5490
Austria (Toll Free): 0 800 202144
Austria: +43 7 2082 8053
Bahrain (Toll Free): 800 81 305
Belarus (Toll Free): 8 820 0011 0331
Belgium (Toll Free): 0 800 81382
Belgium: +32 25 88 4300
Brazil (Toll Free): 0 800 047 4902
Bulgaria (Toll Free): 00800 120 4413
Canada (Toll Free): 1 877 777 3281
Canada: +1 (647) 497-9379
Chile (Toll Free): 800 395 146
China (Toll Free): 4008 866143
Colombia (Toll Free): 01 800 012 9057
Czech Republic (Toll Free): 800 500453
Denmark (Toll Free): 8025 3112
Denmark: +45 32 72 03 69
Finland (Toll Free): 0 800 94473
Finland: +358 942 72 0972
France (Toll Free): 0 805 541 052
France: +33 187 210 241
Germany (Toll Free): 0 800 723 5274
Germany: +49 693 8098 999
Greece (Toll Free): 00 800 4414 4282
Hong Kong (Toll Free): 30774812
Hungary (Toll Free): (06) 80 986 259
Iceland (Toll Free): 800 9993
India (Toll Free): 18002669775
Indonesia (Toll Free): 001 803 852 9155
Ireland (Toll Free): 1 800 818 263
Ireland: +353 15 295 146
Israel (Toll Free): 1 809 388 020
Italy (Toll Free): 800 906955
Italy: +39 0 260 06 31 11
Japan (Toll Free): 0 120 242 200
Korea, Republic of (Toll Free): 0806180880
Luxembourg (Toll Free): 800 29524
Malaysia (Toll Free): 1 800 81 6859
Mexico (Toll Free): 01 800 083 5535
Netherlands (Toll Free): 0 800 020 0178
Netherlands: +31 202 251 001
New Zealand (Toll Free): 0 800 47 0051
New Zealand: +64 4 889 4083
Norway (Toll Free): 800 69 055
Norway: +47 21 98 42 03
Panama (Toll Free): 001 800 507 2789
Peru (Toll Free): 0 800 77844
Philippines (Toll Free): 1 800 8908 8243
Poland (Toll Free): 00 800 1124748
Portugal (Toll Free): 800 784 711
Romania (Toll Free): 0 800 410 025
Russian Federation (Toll Free): 8 800 100 6217
Saudi Arabia (Toll Free): 800 844 3636
Singapore (Toll Free): 18007231322
South Africa (Toll Free): 0 800 555 451
Spain (Toll Free): 800 900 593
Spain: +34 935 43 3647
Sweden (Toll Free): 020 980 768
Sweden: +46 855 765 700
Switzerland (Toll Free): 0 800 000 452
Switzerland: +41 315 2081 00
Taiwan (Toll Free): 0 800 666 846
Thailand (Toll Free): 001 800 658 129
Turkey (Toll Free): 00 800 4488 29001
Ukraine (Toll Free): 0 800 60 9142
United Arab Emirates (Toll Free): 800 044 40444
United Kingdom (Toll Free): 0 800 389 5276
United Kingdom: +44 330 054 0001
Uruguay (Toll Free): 0004 019 1017
Viet Nam (Toll Free): 122 80 106

Joining from a video-conferencing room or system?
Dial: 67.217.95.2##912223661
Cisco devices: 912223661@67.217.95.2

First GoToMeeting? Let's do a quick system check: link.gotomeeting.com/system-check

Posted by Brian K. Maher on 28-Dec-2017 07:44

Hi Mark,
 
I cancelled the gotomeeting after 15 minutes since you didn’t join (didn’t want to waste $$).
 
If you have Skype for Business you can try reaching me at maher@progress.com.
 
Brian

Posted by MBeynon on 28-Dec-2017 07:56

Hi Brian,

That's very kind of you but I've sorted it. I was my PROPATH. Specifically, the .\ prefix which I presumed means go to the top folder and work down but was actually working down from my starting folder (which doesn't contain all the src code).

Mark.

Posted by MBeynon on 28-Dec-2017 07:57

P.S. Sorry about the delay in getting back to you re the meeting. I was sat with a work colleague.

Posted by Brian K. Maher on 28-Dec-2017 08:08

Hi Mark,
 
No problem.
 
The .\ means current directory (whatever that happens to be from moment to moment).  I don’t recommend using relative paths in the propath because it is too easy on windows for the current directory to change.
 
Brian

This thread is closed