Solved

Is there any way to autologin to msn when the machine is not logged in ?

Posted on 2003-12-03
18
284 Views
Last Modified: 2010-05-03
Is there any way to autologin to msn when the machine is not logged in ? Have any one tried this ?
0
Comment
Question by:PradeepYadhav
  • 8
  • 7
  • 3
18 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9866150
What do you mean by "not logged in"? no session opened?
You could put a ket in the registry at HKLM\software\microsoft\windows\currentversion\run pointing to your autologin app.
If you haven't last one, take a look at:
http://www.angelfire.com/realm/vb-shared/IEDOM_Tip06.htm
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9866218
I don't think you can because msn require console to display
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9866261
hummm, maybe i misunderstood, what msn we are talking about?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 26

Expert Comment

by:EDDYKT
ID: 9866346
?msn messenger?
0
 

Author Comment

by:PradeepYadhav
ID: 9866412
yes msn messenger
0
 

Author Comment

by:PradeepYadhav
ID: 9866462
Hi EDDYKT

"I don't think you can because msn require console to display."

There are 2 methods for the api.
AutoSignin
SignIn 0, sSignInName, sPassword

Autosignin works only when you log into the computer. When you logoff autosignin doesnt work.
Signin - brings up a dialog to enter the password. It bypasses emailid but not the password.

Is there a way around

0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9866524
The problem is msn messenger will not run without user login.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9866551
isn't possible to use Messenger object library and use .Signin method?
(you have to provide user and password as arguments)
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9866575
What are you tring to do? Let's see we can come up with alternative
0
 

Author Comment

by:PradeepYadhav
ID: 9866682
Trying to send an instant message (alert) to a contact using msn, from  server , when the server is not logged in. Due to security reasons server might not be logged in.

My program works fine if the server is logged in.
0
 

Author Comment

by:PradeepYadhav
ID: 9866702
I have a service to do this. But I think I am not able to  autologin to msn when the server logs off.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9866724
>>My program works fine if the server is logged in.


The only alterative I can think of is you use autologin and login as a user. Set the screen-saver to 1 min and enable password

Follows this link and add some registry key for autologin
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q97/5/97.asp&NoWebContent=1
 
0
 

Author Comment

by:PradeepYadhav
ID: 9867366
I dont want to auto login the computerwhich is a security issue.

Is there any other way to do the same bit of functionality, without using msn. To show client side alerts to a user from the server without any client side (daemon) install program running on the client.

I opted for msn because its easy to do the job to show client side alerts by just specifiying the email id. But the user doesn't want to login his server.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9867515
You can send message to client just like net send command

0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 350 total points
ID: 9867543
ie

Option Explicit

Private Const OPEN_EXISTING = 3
Private Const GENERIC_READ = &H80000000
Private Const GENERIC_WRITE = &H40000000
Private Const GENERIC_EXECUTE = &H20000000
Private Const GENERIC_ALL = &H10000000
Private Const INVALID_HANDLE_VALUE = -1
Private Const FILE_SHARE_READ = &H1
Private Const FILE_SHARE_WRITE = &H2
Private Const FILE_ATTRIBUTE_NORMAL = &H80


Private Declare Function CloseHandle Lib "kernel32" (ByVal hHandle As Long) As Long


Private Declare Function WriteFile Lib "kernel32" (ByVal hFileName As Long, ByVal lpBuff As Any, ByVal nNrBytesToWrite As Long, lpNrOfBytesWritten As Long, ByVal lpOverlapped As Long) As Long


Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwAccess As Long, ByVal dwShare As Long, ByVal lpSecurityAttrib As Long, ByVal dwCreationDisp As Long, ByVal dwAttributes As Long, ByVal hTemplateFile As Long) As Long
           
           


Function SendToWinPopUp(PopFrom As String, PopTo As String, MsgText As String) As Long


    Dim rc As Long
    Dim mshandle As Long
    Dim msgtxt As String
    Dim byteswritten As Long
    Dim mailslotname As String
    ' name of the mailslot
    mailslotname = "\\" + PopTo + "\mailslot\messngr"
    msgtxt = PopFrom + Chr(0) + PopTo + Chr(0) + MsgText + Chr(0)
    mshandle = CreateFile(mailslotname, GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
    rc = WriteFile(mshandle, msgtxt, Len(msgtxt), byteswritten, 0)
    rc = CloseHandle(mshandle)
End Function



Private Sub Command1_Click()

    SendToWinPopUp "From machine", "To machine", "3333"
End Sub
0
 

Author Comment

by:PradeepYadhav
ID: 9873330
Hi EDDYKT
Its quite nice. This will work for an intranet application. Its similar to net send. But I want this to work in internet.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 9873925
Have you tried to use IP address instead

ie SendToWinPopUp "1.1.1.1", "2.2.2.2", "3333"
0
 

Author Comment

by:PradeepYadhav
ID: 9874440
Hi EDDYKT

I tried using IP address. It works on the network. But tried to send to a machine which is not connected to my network, over internet to my friends pc. I suppose either my end or at his end they must have disabled popups or must be in a firewall. Hope I am right.

Any how i thank you for your support.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

821 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