Solved

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

Posted on 2003-12-03
18
283 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

777 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