This works perfectly fine for me

Code:
If SetWallpaper('C:\HSHWP.BMP', 1) = 0
'Wallpaper set okay' ?
Else
'Unable to set Wallpaper ' + @ERROR + ' ' + @SERROR
EndIf