You shouldnt normally be forcing the launched EXE to 'think' it is running in another location.
So are you NOT supplying the full path to the required file?
That will only work if the program you want to laucnh exists on the windows 'PATH' environment variable.
(Places where it looks for exectuables if someone forgets to say where the program lives)
I think you misunderstood.
Every application has a "current directory" value which is irrelevant to where the application is actually located or one's ability to load that application, but affects that application's relative references to files or directories.
Processmonitor will show "application: C:\fulladdress to executable.exe + commandline vars" & "currentDirectory: C:\myrealstudioapp_directory"
The problem is, that the application I want to load requires access to certain files relative to it's location or it will close, and for it to have access to those files it's "current directory" value has to be set to the directory the executable was located. This is not my application, this is not something I can alter, it is out of my control regardless of whether that is or isn't normal behavior.
The problem with folderitem.launch is that it does not allow one to set the "current directory" value, the launched process then inherits the parent processes' directory which of course will not work for the sub process and it will self terminate.
I will clarify, folderitem.launch DOES load the application but the application will self terminate without the correct "current directory" value set, which folderitem.launch does not facilitate.
Thus, I require CreateProcess() or ShellExecute() both of which seem to dislike accepting the directory even though it's valid
edit: Well I managed to get it to work yey!