?
Solved

how to assign a password as system.security.secureString  VB.NET 2.0

Posted on 2008-06-10
1
Medium Priority
?
6,069 Views
Last Modified: 2013-11-26
I want to open a file using a password with process start.  The password is "pass+word".  How can I convert the password to type system.security.secure string?


Dim sFile = "\\server\servdir\somefile.pdf"
Dim sUser As String = "user"
Dim sPass As String = "pass+word"
Dim SDomain As String = "XYZ"
 
'newPass = New System.Security.SecureString() ???????
 
Process.Start(sFile, sUser, newPass, SDomain)

Open in new window

0
Comment
Question by:stevep01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
jcoehoorn earned 750 total points
ID: 21752664
I haven't worked with secure string, but maybe try this:

Dim newPass as New Security.SecureString()
For Each c As Char In sPass
    newPass.AppendChar(c)
Next c

Open in new window

1

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question