PDA

View Full Version : Auto Launch after update = EC:3



NewsArchive
02-23-2016, 02:21 AM
Hello All,

I'm running a streamlined update, that is no Welcome/License/Select
???/etc dialogs... all works well except that the Auto launch
"MyApp.exe" at the end of the script always generates an EC:3 (Path Not
Found) and that in turn terminates the app.

I do stored the Installed Dir in the registry and read it at the start
of each update script (stored into %_SB_INSTALLDIR%). All the updated
files/folders are "good to go".


The launch snippet looks like this...

If %WINVER% Less Than "$WIN_VISTA$" Then
Run Program %_SB_INSTALLDIR%\bk.exe (Always Install)
Else
Run Program %_SB_INSTALLDIR%\bk.exe (Always Install) [Non-Elevated]
End


Not sure what I'm missing.

Thanks,

db

NewsArchive
02-23-2016, 02:21 AM
David,

> "MyApp.exe" at the end of the script always generates an EC:3 (Path Not
> Found) and that in turn terminates the app.

So "bk.exe" is your application executable and it reports "EC:3 (Path Not
Found)"? What does the error code "EC:3" stand for? Perhaps your "bk.exe"
makes use of the Windows current directory and this folder is not set to the
expected value.

Friedrich

NewsArchive
02-23-2016, 11:11 AM
> Found)"? What does the error code "EC:3" stand for? Perhaps your "bk.exe"

Sorry about that, errorcode = 3 when trying to open the first file.
This is a very vanilla ABC app gen exe.

I thought setting the %_SB_INSTALLDIR% would set the path for the app on
start up.

Is there a way to set the current path using the scripts?

db

NewsArchive
02-24-2016, 02:05 AM
Hi David,

> Not sure what I'm missing.

Do you have it set up on the "Finish Dialog" tab so that it runs after
the install exits? Don't know if that makes any difference...

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
02-24-2016, 03:11 AM
Hi David,

> Sorry about that, errorcode = 3 when trying to open the first file.
> This is a very vanilla ABC app gen exe.
>
> I thought setting the %_SB_INSTALLDIR% would set the path for the app
> on start up.
>
> Is there a way to set the current path using the scripts?

First of all, you should never ever rely on the current directory (if your
..exe is a multithreaded application or a shared library). If you set the
"Default Directory" then changes are that the working directory is set to an
expected path at application start up. But it is not guaranteed that the
current folder is still set to this "working directory" when you use the
path in your app.

IMO, you have a typical current folder issue here.

Friedrich

NewsArchive
02-25-2016, 03:05 AM
Dave,

does your Installer run in elevated Admin-mode and is this Admin able to see
and start a program from that directory?

Just a wild guess from
Wolfgang

Regards,
Wolfgang Orth
www.odata.de