View Single Post
Old 3rd March 2016, 10:56   #1
Mircea M
Junior Member
Join Date: Aug 2014
Posts: 44
nsDialogs - NSD_SetText "timing" issue


I have the following function:

Function generate
Call getOptions
StrCpy $license "$hwsn-$build"
blowfish::encrypt $license ${BF_PASSWORD}
${NSD_SetText} $hCtl_license_gen_TextBox1 $8
${If} $autoApply == 1
nsExec::Exec "taskkill /F /T /IM MyApp.exe"
WriteINIStr "$PROGRAMFILES\MyApp\Config.ini" License LicenseKey $8
nsExec::ExecToStack "net stop MyAppApache /Y"

Basically what I do is generate an encrypted "license" which will be displayed to the user in a text field. If the checkbox "Auto Apply" is checked, the license will also be added to the config file.

My problem is the following: I would like the text field to be updated with the value of the license before the other operations (kill my process, write to ini, kill my service) but it doesn't. The value is added only when all the other things are done.

Any idea why?

Mircea M is offline   Reply With Quote