Page 1 of 1

Taskbar jump list App current folder!

Posted: Sun Apr 04, 2021 6:50 pm
by ChrisR
When my application is (re)launched from the taskbar jump list (the context menu with Close, Pin, App)
It crashes, it does not find some required linked files, which are in the current folder next to the exe
It seems that the current folder is not the one of the exe but C:\Windows\System32
No worries if I pin the app and start it from the jump list.

Do you have any idea how to solve this problem?

Re: Taskbar jump list App current folder!

Posted: Sun Apr 04, 2021 6:56 pm
by mk-soft

Code: Select all

Procedure.s GetProgramPath()
  Protected r1.s
  r1 = GetPathPart(ProgramFilename())
  ProcedureReturn r1
EndProcedure

Debug GetProgramPath()

Re: Taskbar jump list App current folder!

Posted: Sun Apr 04, 2021 7:07 pm
by ChrisR
Thanks mk-soft :)
My problem is solved now with:
SetCurrentDirectory(GetPathPart(ProgramFilename()))

However, it is not so good when debugging:
GetPathPart(ProgramFilename()) = C:\Users\ChrisR\AppData\Local\Temp\

Re: Taskbar jump list App current folder!

Posted: Sun Apr 04, 2021 7:45 pm
by mk-soft
Set compiler option to create temporäre executable into the quell code folder

Re: Taskbar jump list App current folder!

Posted: Sun Apr 04, 2021 7:58 pm
by ChrisR
:)
I was mainly interested for the executable
But good to have in debug, if needed.
Thanks