"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
Go Back  Xtreme Visual Basic Talk > > > "Logon failure: unknown user name or bad password"


Reply
 
Thread Tools Display Modes
  #1  
Old 04-01-2010, 04:48 PM
mjordan1 mjordan1 is offline
Newcomer
 
Join Date: Apr 2010
Posts: 1
Exclamation "Logon failure: unknown user name or bad password"


Hi there, this is a simple code to open MS-Word Document using process,
by the way I am aware of the other way that uses
Microsoft.Office.Interop.Word

Any help please, No matter what the password is I always get this error
"Logon failure: unknown user name or bad password"

Code:
        Dim passString As New String("5632")
        Dim pass As New System.Security.SecureString()
        For Each c As Char In passString
            pass.AppendChar(c)
        Next

        Try
            Process.Start("WINWORD.EXE", "O:\\x.docx", Environment.UserName, pass, Environment.UserDomainName)
        Catch ex As Exception
            ' I always get this message even if the password is correct 
            ' "Logon failure: unknown user name or bad password"
            ' ANY SUGGESTIONS???
        Finally

        End Try
Reply With Quote
  #2  
Old 04-02-2010, 04:56 PM
Roger_Wgnr's Avatar
Roger_Wgnr Roger_Wgnr is offline
CodeASaurus Hex

Forum Leader
* Expert *
 
Join Date: Jul 2006
Location: San Antonio TX
Posts: 2,427
Default

Most likely the user name/password/domain need to be enclosed in quotes (just guessing here as my system is undergoing a major scan and I can not test it).

Try the following:
Code:
Process.Start("WINWORD.EXE", "O:\\x.docx", """" & Environment.UserName & """", """" & pass & """", """" & Environment.UserDomainName & """")
__________________
Code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. ~Martin Golding
The user is a peripheral that types when you issue a read request. ~Peter Williams
MSDN Visual Basic .NET General FAQ
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password" "Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
 
"Logon failure: unknown user name or bad password"
"Logon failure: unknown user name or bad password"
 
-->