Solved

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

Posted on 2003-12-03
18
281 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now