I want to check for an error code when I create a folder. I have been creating the folders with no problem, but thought it would wise to check for an error just in case.

I get an error code of 0 in my test installer made with SB72 after the create folder function. The folder already exists.

The help file says:

If the function succeeds, the %_SB_ERRORCODE% return value is nonzero.

If the function fails, the return value is zero.

Remarks

The Create Folder function can be used to create multiple nested directories at the same time.

An error occurs if the specified folder already exists.

Which one is it really? Maybe I do not need to check for an error when creating a folder in the CSIDL_COMMON_DOCUMENTS location. Or check for the creation of a share or grant access.


Jim