The ShellExecute code works correctly and is not random as far as I can tell:
Section
System::Call '*(&l4, i ${SEE_MASK_NOCLOSEPROCESS}, p$HWNDPARENT, p0, t "cmd.exe", t "/c exit /b 666", p0, p5, p0, p0, p0, p0, p0, p0, p)p.r1'
System::Call 'SHELL32::ShellExecuteEx(t)i.r0 (pr1)' ; (t) is a hint for A/W detection
${If} $0 <> 0
System::Call '*$1(i, i, p, p, p, p, p, p, p, p, p, p, p, p, p.r0)'
System::Call 'KERNEL32::WaitForSingleObject(p r0, i ${INFINITE})'
System::Call 'KERNEL32::GetExitCodeProcess(p r0 s,*i.r0)'
System::Call 'KERNEL32::CloseHandle(p s)'
MessageBox mb_ok ExitCode=$0 ; 666 every time
${EndIf}
System::Free $1
SectionEnd
$1 will be "random" be cause it is a memory address but you don't need to look at it, just free it.
You can use Process Monitor from SysInternals to verify the exit code of start_wlansvc.exe.