UNSOLVED

Ladewig-Wustl

updated

16 years ago

0

115363

August 31st, 2010 11:00

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/
  • DELL-Warren B

    1 Rookie

    •

    1124 Posts

    1573

    0

    Posted January 3rd, 2012 15:00

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

  • DELL-Warren B

    1 Rookie

    •

    1124 Posts

    1573

    1

    Posted January 4th, 2012 07:00

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

  • dquick1

    3 Posts

    1573

    1

    Posted October 23rd, 2014 12:00

    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