Old 23rd January 2015, 05:36   #1
newbie1983_blr
Junior Member
 
Join Date: Jan 2015
Posts: 4
Hello team,

Thank you for your time and hint.
This is a code snippet which i want to make silent
Can you give me an example using the same code snippet.
This would be of great help to us.

Function Authenticate
#Call to REST API for user authentication
nsJSON::Set /file "c:\temp\<some file>"
ShowWindow $WAITMSG ${SW_SHOW}
${NSD_SetText} $WAITMSG "User authentication in progress...."
AnimGif:lay /NOUNLOAD /HALIGN=83 /VALIGN=73 $PLUGINSDIR\a.gif
inetc:ost "grant_type=password&username=$UserNameText&password=$UserPwdText" /SILENT "<URL>" "c:\temp\<some file>" /END
NsisCrypt::Base64Encode $UserNameText
Pop $1
#MessageBox MB_OK $1
nsJSON::Set /file "c:\temp\<some file>" /END
nsJSON::Get /exists "access_token" /END
Pop $0
${If} $0 == "yes"
nsJSON::Get "access_token" /END
Pop $TOKEN
#MessageBox MB_OK $TOKEN
StrCpy $isValidUser "true"
#Call to REST API for getting the institution details
${NSD_SetText} $WAITMSG "Getting Institution details...."
inetc::get /SILENT "<URL>" "c:\temp\<some file>" /END

nsJSON::Set /file "c:\temp\<some file>" /END
nsJSON::Get /count /END
Pop $INSTITUTIONCOUNT
${Else}
StrCpy $isValidUser "false"
${EndIf}
#delete "c:\temp\<some file>"
ShowWindow $WAITMSG ${SW_HIDE}
AnimGif::stop
FunctionEnd
newbie1983_blr is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
silent installer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump