Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:58:02+00:00 2026-06-12T23:58:02+00:00

Thanks for all the help so far. I was able to send the $Email

  • 0

Thanks for all the help so far. I was able to send the $Email variable to the stdio stream and receive it in the vb script. I am having a problem now with some of the code

Option Strict On

Imports MySql.Data.MySqlClient
Imports System.Runtime.Serialization

Module jrConnect

    Sub Main(ByVal cmdArgs() As String)
        Dim returnValue As Integer = 0
        ' See if there are any arguments.
        If cmdArgs.Length > 0 Then
            For argNum As Integer = 0 To UBound(cmdArgs, 1)

                Console.Write("your email address is " & cmdArgs(argNum))
                If cmdArgs(argNum) <> "" Then
                    Dim email As String = cmdArgs(argNum)
                    Console.Write("Your email is " & email)
                End If
             Next argNum
        End If
        Dim cs As String = "*********"
        Dim conn As New MySqlConnection(cs)
        Dim entID As String

        Try
            conn.Open()
            Dim stm As String = "SELECT ***** FROM **** WHERE email =" & "'" & email & "'"
            Dim cmd As MySqlCommand = New MySqlCommand(stm, conn)
            Dim reader As MySqlDataReader = cmd.ExecuteReader()

            While reader.Read()
                entID = reader.GetString(0)
            End While
            reader.Close()

            Dim stm2 = "SELECT ***** FROM ****** WHERE ***** = " & entID
            Dim cmd2 As MySqlCommand = New MySqlCommand(stm2, conn)
            Dim reader2 As MySqlDataReader = cmd2.ExecuteReader()
            Dim counter As Integer = 0

            While reader2.Read() And counter < 3
                Console.WriteLine(reader2.GetString(0) & "%")
                counter = counter + 1
            End While
            reader.Close()

        Catch ex As MySqlException
        Finally
            conn.Close()
        End Try

    End Sub

End Module

It will print the email address correctly but when it calls the email address in the sql statement it states that “email is not declared” Is it changing the value of it in the “Next argNum” command? It only writes the email to console once. Here is my NSIS script if necessary as well.

Outfile "test.exe"
Section
    SetOutPath $DOCUMENTS/
    Var /GLOBAL Email
    StrCpy $Email "spkelly8@gmail.com"

    nsExec::ExecToLog '"C:path/vbapp.exe" $Email'
    Pop $1
    Pop $2

    DetailPrint $1
    DetailPrint $2

SectionEnd
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:58:03+00:00Added an answer on June 12, 2026 at 11:58 pm

    From the NSIS manual:

    nsExec will execute command-line based programs and capture the output
    without opening a dos box
    

    Your console.Readline will expect some kind of interation and since its not connected to stdin/stdout, will fail. Since you dont want the DOS box, and you want to send the email string via stdin rather than enter it manually, use ExecDos::exec

    ExecDos::exec /TIMEOUT=2000 "$DOCUMENTS\VBApp.exe" "$Email$\n"
    

    Note the $ in front of \n for NSIS to send a literal new line rather than the string \n

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, thanks for all the help I've received so far from StackOverflow. I've learned
Thanks for your help! I'd like to output all companyName entries that have uploads
Thanks to all that responded to my previous thread. There is still a problem
Firs of all thanks for reading this. I'm having trouble updating the progress from
I need some help with my code (clearly). So far I'm able to get
First, I would to thank everyone for all the help they provide via this
First of all thanks in advance, this has been very frustrating and I'm hoping
first of all thanks for taking your time! I'm a junior Dev, working with
First of all thanks for taking the time to look into this. I store
First off thanks to all the users who have made my android developing adventure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.