User Support VBS Script

Home Forums Scripting General Scripting User Support VBS Script

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    VortexICS
    Member
    #112748

    Hello guys,
    I just tried to create a couple of scripts that would allow users to send me messages when they need computer help.
    Now, I am trying to get more than 2 variables from one script (input.vbs) to another one (output.vbs).
    The first one gets the user information, the second one sends it to an email address.
    My problem is that I can’t seem to find a way to get more than one variable accross the scripts with several characters.

    input.vbs

    Code:
    Set objShell = CreateObject(“Wscript.Shell”)

    chrValue = InputBox(“Username:”)
    strCommandLine = “output.vbs ” & chrValue

    objShell.Run(strCommandLine)

    [/CODE]

    output.vbs
    [code]
    Set objEmail = CreateObject(“CDO.Message”)
    chrValue = Wscript.Arguments.Item(0)

    objEmail.From = “[email protected]
    objEmail.To = “[email protected]
    objEmail.Subject = “Troubleshooting Ticket”
    objEmail.Textbody = (chrValue)

    objEmail.Configuration.Fields.Item _
    (“http://schemas.microsoft.com/cdo/configuration/sendusing”) = 2
    objEmail.Configuration.Fields.Item _
    (“http://schemas.microsoft.com/cdo/configuration/smtpserver”) = _
    “exchangeserver”
    objEmail.Configuration.Fields.Item _
    (“http://schemas.microsoft.com/cdo/configuration/smtpserverport”) = 25
    objEmail.Configuration.Fields.Update
    objEmail.Send

    I got some of the code from the technet ms site, so any help would be greatly appreciated.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.