cancel
Showing results for 
Search instead for 
Did you mean: 

EndInstall() Call Returns Zero But SAP Still Times Out?

Former Member
0 Kudos


Hi,

I have an add on installer where the setup.exe file was created and compiled using InnoSetup. Since switching from 32 bit to 64 bit it has been a struggle since there is so little documented by SAP on this. I finally found out that we cannot call the EndInstall and EndUninstall functions directly in AddOnInstallAPI_x64.dll like we could in AddOnInstallAPI.dll for 32 bit add ons. I created a Visual Studio wrapper project that contains the calls to EndInstall and EndUninstall and I launch that compiled executable at the end of my setup.exe installation procedure. I have logging inside the wrapper which gives me the result of the EndInstall call and it is returning a 0 which means it was successful. Even still, SAP still sits until it times out and tells me the add on registration failed and it needs to be corrected. Oddly enough, if I run my wrapper executable manually right at the end of my installer, SAP does get the signal and says the add on was installed successfully.

I need to get this resolved so I can do a required add on upgrade. Has anyone else experienced this?  Is there any way yet that we can call the 64-bit functions directly from the DLL file yet?  Why has SAP not addressed this yet?

Thanks,

David

Accepted Solutions (1)

Accepted Solutions (1)

pedro_magueija
Active Contributor
0 Kudos

Hi David,

You should be able to call EndInstallEx from the AddOnInstallAPI_x64. Are you using EndInstall or EndInstallEx?


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

Hi Pedro,

I've tried both EndInstall and EndInstallEx directly from the 64 bit DLL but neither worked. Here was my code in InnoSetup to call EndInstallEx.

function SetAddOnFolder(Path: String): Integer;
external 'SetAddOnFolder@{code:TargetDir}\extern\AddOnInstallAPI_x64.dll';

function RestartNeeded(): Integer;
external 'RestartNeeded@{code:TargetDir}\extern\AddOnInstallAPI_x64.dll';

function EndInstallEx(Info: String; InstallSucess: Boolean): Integer;
external 'EndInstallEx@AddOnInstallAPI_x64.dll';

function GetCustomSetupExitCode: Integer;

var

  nResult: Integer;

begin

nResult := EndInstallEx('', true);

end;

You think this should actually work?

Thanks,

David

pedro_magueija
Active Contributor
0 Kudos

Hi David,

From a currently working installer (VB):


ret = EndInstallEx(addOnPath, True)

I only see one difference that being that we pass in the addon path to the function.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

Hi Pedro,

Thanks for you responses.  I cannot call any functions in the 64 bit DLL from InnoSetup.  I changed my wrapper project back to calling EndInstallEx and it worked once and then started actually crashing SAP B1 altogether.  The only difference I could see was that the time it worked it ran very slow.  I put a sleep in my script to timeout for 10 seconds and now it works perfectly fine.  If I call EndInstallEx and sooner than 10 seconds, either the installer times out or it crashes SAP B1.  I'm not sure why but I guess I'll leave it wait so it succeeds.

Thanks,

David

Former Member
0 Kudos

Hi Pedro,

I was facing the same problem, after use EnnInstallEx it works, but is there any documentation on how it method works? I didn't understand the Info parameter.

Regards,

Danilo

pedro_magueija
Active Contributor
0 Kudos

Hi Danilo,

There is some documentation on the SDK Help Center. And there is also a sample for an installer provided with the SDK. These are the only I know of.

Regarding the info argument that is the addon path that is passed in to the function. Unfortunately I don't know what the function does with it.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

Yeah, I saw on these places, on SDK Help Center doesn't explain too much and the sample uses the deprecate method EndInstall.

Thanks anyway

Answers (1)

Answers (1)

Former Member
0 Kudos

I should also mention, this only fails for silent installs which is what is required for our client as they have 30+ clients who run SAP but don't have admin access to install add ons.  With silent installs, it works fine on Windows Server 2008 R2 Enterprise but fails on Windows Server 2012 Standard.  What would be different about the OS that would make this fail?