Ladewig-Wustl
1 Copper

HAPI not loading if CCTK called from outside directory

I've noticed that if run CCTk from the folder where the executable is located, it is able to load HAPI dynamically. If we call CCTK from another directory, it says "HAPI Driver Load error". I ran process monitor and it looks like cctk.exe assumes the HAPI subfolder is located beneath whatever folder it was called from. So for example, if cctk.exe is located at "c:\program files (x86)\dell\cctk\x86_64" and you run cctk, from that folder, it correctly located the hapi subfolder. if i move up one level and run the program from "c:\program files (x86)\dell\cctk", it looks for HAPi in "c:\program files (x86)\dell\cctk\hapi".

Any plans to fix that? We can work around it, but cctk should know where it is located and use that fodler to locate the files for HAPI/
0 Kudos
3 Replies
DELL-Warren B
4 Tellurium

Re: HAPI not loading if CCTK called from outside directory

Thanks for the detailed feedback, I'll pass it along to the dev team.

0 Kudos
Highlighted
DELL-Warren B
4 Tellurium

Re: HAPI not loading if CCTK called from outside directory

Response from the dev team is that the issue will be corrected in the next release of CCTK.

dquick1
1 Copper

RE: HAPI not loading if CCTK called from outside directory

I don't believe this has been fixed.  I run a .vbs script that calls the cctk from is respective os arch folder on a machine without the hapi installed and it fails.  Here is a snippet of the code.

Set objShell = WScript.CreateObject("WScript.Shell")
comspec = objShell.ExpandEnvironmentStrings("%comspec%")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem in colItems
    If objItem.OSArchitecture = "64-bit" Then
        cctkPath = "X86_64"
    Else
        cctkPath = "X86"
    End If
Next

cctkExec1 = comspec & " /c " & cctkpath & "\cctk.exe --setuppwd=password --logfile=%windir%\temp\DellBios.log"

objShell.run(cctkExec1), 0, true    ' Sets BIOS password