Post a reply to the thread: more error information on Create File Association?
Click here to log in
What's the name of our main installation product (in uppercase letters), directly followed by the current year?
You may choose an icon for your message from this list
Will turn www.example.com into [URL]http://www.example.com[/URL].
Re: more error information on Create File Association? Hi Arie, In most cases, we follow the Microsoft return codes. I think that quite a few developers are using the %_SB_ERRORCODE% variable to see if a function succeeded or not. Where possible, the value returns a system error code. For example, in the "Edit Service" function: - If the function succeeds, the %_SB_ERRORCODE% return value is zero. - If the function fails, the return value is a system error code. We'll do the same in the "Create File Association" function where the error code is always "0" (not handled at all) at the moment. In SetupBuilder 8, we'll introduce a new %_SB_LASTERRORCODE% variable for some functions to retrieve the last returned system error code. Friedrich
Re: more error information on Create File Association?
Re: more error information on Create File Association? Hi Friedrich, will a return value of non-zero in %_SB_ERRROCODE% still mean OK and a value of zero still mean not OK? If so, how will I be able to get more info about the cause of the failure? Enquiring minds... My preference would be (as obviously no-one has paid attention to the value returned into %_SB_ERRORCODE% until now ) that zero would mean OK and non-zero a failure whose meaning can be looked up somewhere. Best regards, Arie
Re: more error information on Create File Association? Hi Arie, Hmm, I did a quick source code check and I "think" that this function always returns "0". I don't see any real return code that is passed to %_SB_ERRORCODE% at all. We'll fix this in the next maintenance build. Thank you for bringing this to our attention. Friedrich
more error information on Create File Association? It seems the only error check I can do after Create File Association is to check if the value of %_SB_ERRORCODE% is non-zero (OK) or zero (not OK) When it is zero, however, I would like to get more details about why the Create File Association is failing (Insufficient rights? File type already registered? Something else?) In the Setup Builder documentation there are some references to the Windows API GetLastError, but not for Create File Association and also no details about how to obtain the getlasterror value How can I get more detailed error information when the Create File Association returns 0 ? Arie
more error information on Create File Association?
Forum Rules