spkelly86
8th October 2012 22:57 UTC
writing a program to use with nsExec
I'm trying to develop an executable using vb so that I can access and query my MySQL database. I need to send an email and password to the server to verify connection and was wondering how to define the parameters to be sent to the program. Should I write a different function for email and password or do they need to be separate classes? Thanks in advance :)
T.Slappy
9th October 2012 06:43 UTC
This is a VB question or NSIS question?
If you want to use nsExec with your VB app and pass email/password to it then it is simple:
nsExec::Exec '"path\your_app.exe" -email=st@st.xy -pwd=1234'
Pop $0 # return value/error/timeout
All what your VB app needs is to read parameters from command line - it does not matter you have 2 classes or 2 functions or whatever.
spkelly86
9th October 2012 18:41 UTC
Thanks a lot. I figured it would be easier then I was making it out to be.
spkelly86
17th October 2012 23:52 UTC
Originally posted by T.Slappy
If you want to use nsExec with your VB app and pass email/password to it then it is simple:
nsExec::Exec '"path\your_app.exe" -email=st@st.xy -pwd=1234'
Pop $0 # return value/error/timeout
I tried this method and in the VB script the first thing i do is read from the command line and set it into a variable but it is timing out saying there is no input. Does it literaly write the parameter to the command line? Here is my script.
nsExec::ExecToLog '"C:\path\vbProgram.exe" -email=$Email'
spkelly86
18th October 2012 23:15 UTC
fixed the issue :) thanks