Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB Script Password InputBox

VB Script Password InputBox

Scheduled Pinned Locked Moved Visual Basic
toolshelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    morde1ac
    wrote on last edited by
    #1

    I am working on some VB Script and am using an InputBox that accepts a password. When the user types in the password, I would like it to show up as ********* Any help doing this would be great. Here is some of the code: strUserIn = InputBox("Enter Password") if strUserIn <> "" then Set fs = CreateObject("Scripting.FileSystemObject") strFileName = fs.BuildPath(Wscript.ScriptFullName & "\..", "~userp.txt") strFileName = fs.GetAbsolutePathName(strFileName) Set ts = fs.OpenTextFile(strFileName, 2, True) ts.WriteLine strUserIn ts.Close end if

    D 1 Reply Last reply
    0
    • M morde1ac

      I am working on some VB Script and am using an InputBox that accepts a password. When the user types in the password, I would like it to show up as ********* Any help doing this would be great. Here is some of the code: strUserIn = InputBox("Enter Password") if strUserIn <> "" then Set fs = CreateObject("Scripting.FileSystemObject") strFileName = fs.BuildPath(Wscript.ScriptFullName & "\..", "~userp.txt") strFileName = fs.GetAbsolutePathName(strFileName) Set ts = fs.OpenTextFile(strFileName, 2, True) ts.WriteLine strUserIn ts.Close end if

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      VBScript and the Windows Script Host don't yet support a password-type input box yet. You'll have to use an external component of some kind to do this or make your code run in an HTML page and use an HTML password box. But, there are limitation on what your script can do inside a browser. RageInTheMachine9532

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups