0

I'm trying to get info on errors that may be happening when I LaunchApplication in installScript, but get an error when I do exactly what this example shows: store error code from custom action

export prototype CmdExecute(HWND);

function CmdExecute(hMSI)
begin 
    LAAW_SHELLEXECUTEVERB = "runas";
    String returnCodeStr;
end;

When I build, I get, ErrorCode C8025, String: undefined identifier. When I type string, it suggests the word STRING. I've tried STRING and String like the example shows but it's always unidentified. How do I get the installScript to let me define strings?

I want to do what the example at the link shows.

Thanks for any help! I am using InstallShield 2021.

1 Answer 1

0

I figured it out. The string declaration was in the wrong place. The String and other type/variable declarations go above begin.

function CmdExecute(hMSI)
STRING returnCodeStr;
NUMBER nvSize,returnCode;
begin 
    nvSize=250;
    LAAW_SHELLEXECUTEVERB = "runas";
    returnCode=LaunchApplication("C:/Windows/Microsoft.NET/Framework/v4.0.30319/RegAsm.exe",
"pathTo/failename.dll /codebase", "",
SW_NORMAL, WAIT, LAAW_OPTION_WAIT_INCL_CHILD);
     if( returnCode <ISERR_SUCCESS ) then
         MessageBox ("CmdExecute call failed!", SEVERE);
     endif;
     NumToStr(returnCodeStr,returnCode);
     SprintfMsiLog("returnCode="+returnCodeStr);
end;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.