Utility: LANegram - NET SEND Replacement [VB6]-VBForums
Results 1 to 33 of 33

Thread: Utility: LANegram - NET SEND Replacement [VB6]

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Arrow Utility: LANegram - NET SEND Replacement [VB6]

    This project should be useful as a utility and also as a source of sample code for using Mailslots in VB6 programs. The Mailslot.ctl in this Project should prove usuable for most simple applications of Mailslots in VB6. Just copy Mailslot.ctl and Mailslot.ctx to your Project folder and then use Add file... to add the control.

    Full source is provided here.

    Precompiled binary files were scanned with AVG Free 8.5 and should prove virus-free. They may currently be downloaded as LANegram.msi (1.3MB). See updated version below before downloading this one. Size limitations prevent the installer from being attached here.


    Description
    Right or wrong, the Windows Messenger Service was victimized as being vulnerable to "messenger spam." I suspect that users and the press confused the Windows Messenger Service with IM applications such as MSN Messenger and Windows Messenger. In any case the Messenger Service is gone starting with Vista and disabled under later Windows XP Service Packs.

    People have been advised to use the MSG utility instead of NET SEND in order to send alerts within intranets. This can be problematic since MSG is part of Terminal Services (and its subset Remote Desktop) which is not present in all editions of Windows and may even be disabled on versions and editions of Windows that have it.

    Nonetheless many people relied on using NET SEND for putting out different kinds of administrative alerts, and they need an alternative. Home and small business users trying to use Vista or Windows 7 Home editions in particular are left with no out of box solution. LANegram is one attempt at a replacement for NET SEND and the Messenger Service.


    Features
    • Command line Send.exe for sending broadcast or directed messages to users on the LAN.
    • Tray application LANegram.exe monitors and displays incoming alerts.
    • Supports alternate channels for subgroup messaging.
    • Incoming alerts produce a tray popup balloon.
    • Individual users can temporarily suppress balloons if engaged in a task this might disturb.
    • Double-clicking the tray icon brings up a window displaying a list of recently received alerts.
    • /NOEXIT switch can be used to suppress the Exit menu choice from the tray icon's menu.
    • LANegram can still be exited via "End Process" or Ctrl-X while the GUI window has focus.
    • Precompiled binary supplied as a Windows Installer package.


    Author
    Bob Riemersma


    System Requirements
    The enclosed precompiled binary uses Microsoft-built VB6 SP6 merge modules for its dependencies. It should run properly on all supported versions of Windows: Windows 2000 and later. Tested on XP SP3, Vista SP2, and Windows 7 RC.


    License
    Unencumbered public domain freeware. May be used by anyone in whole or in part in either source or binary forms. No guarantees or support offered. LANegram is made available as-is for use at your own discretion.

    A serious attempt has been made to debug the LANegram package but errors may still exist.
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by dilettante; Feb 7th, 2010 at 01:24 PM. Reason: Note re. newer version below.

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    LANegram 3.1 - Update

    Suggestions from early feedback prompted me to take another look at LANegram. In particular there is a need for a simple interface that just pops up a message box instead of having the elaborate tray icon, balloons, and alert log.

    The following changes have been made:
    • New /SIMPLE switch that can be used to select the alternate user interface.
    • PATH environment variable updated by the Installer package, making it easier to use Send from a command prompt.
    • Reworked the readme file, now provided in .RTF instead of .TXT format.

    The precompiled package is at LANegram 3-1.msi at the present time. It installs a copy of the readme to the program directory.

    I have attached a new source code package here as well. I hope no new bugs have been introduced.
    Attached Files Attached Files
    Last edited by dilettante; Oct 27th, 2009 at 02:10 PM. Reason: bug fix

  3. #3
    Lively Member
    Join Date
    Sep 2009
    Posts
    67

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    how to send one sample message?

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Once the application is installed sending messages is much like using NET SEND. For example you can open a command prompt and type:

    send * Hello World


    I'll add that you can navigate to the LANegram folder in Program Files using Windows Explorer, then either double-click on Send.exe or right-click and choose Create Shortcut (or Send to|Desktop) and use this shortcut. This will bring up a command window where you can enter one or more Send commands.
    Last edited by dilettante; Mar 22nd, 2010 at 04:09 PM. Reason: Update on running Send.exe via an icon

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Almost two years later this remains a popular small utility. Since Windows 7 was even more popular than Vista the XP-exodus continues to ramp up.

    Please remember that LANegram requires Windows 2000 or later, Win9x is not supported.


    Here is a new version 3.2 that contains only small changes. It should be fully compatible with 3.1 so a mixed network should work fine, allowing incremental deployment of the update. Because of the relative insignificance of the update there is no compelling reason to move from 3.1 to 3.2 and you can take your time.

    Changes:
    • Minor changes to a few tooltip messages.
    • /SIMPLE UI "Ok" button changed to "Cancel" and only activated via mouse click or Escape keystroke.

    The second change is the important one. Some users reported a problem where work typing in another window caused a popup dialog arrival to be dismissed by those other keystrokes. Changing Ok to a Cancel means mouseless users can still interact with the dialog without frequently dismissing the LANegram dialog inadvertantly as often.


    The prebuilt MSI package can be downloaded from LANegram 3-2.msi at this time.

    The full source code is attached here as a ZIP archive.

    Note:

    Some people must not use many Installer packages, because I was asked why MSIEXEC continues to run after the installation completes. This is normal, as described in Microsoft's support forums:

    MSIEXEC Process Remains in Memory
    The Windows Installer service (msiexec) stays running for 10 minutes after performing any installation activity. This is designed to be a performance enhancement in case multiple MSIs are installed sequentially. It should not stay running for more than 10 minutes under normal circumstances though unless installation activities are still happening on the system. You should be able to see descriptions of installation activities by going to the application event log on your system and looking for events with the source name MsiInstaller.
    Attached Files Attached Files
    Last edited by dilettante; Sep 13th, 2011 at 11:18 AM.

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Oops!

    I should have mentioned that to install 3.2 you must uninstall 3.1 first. Product/patch code management was not handled in these MSI packages, so running the 3.2 MSI where 3.1 is already installed just produces an uninstall/repair session, which won't help you.

    The 3.2 MSI uses a red banner with LANegram icons in it, so if you are seeing the blue-gray and shoreline banners you are not installing the updated 3.2 version. I hope that helps.

    Corrected!

    The reposted 3.2 MSI has a unique ProductCode and the same UpgradeCode, so Installer will properly replace 3.1 by 3.2 if you use this one and already have 3.1 installed.
    Last edited by dilettante; Sep 13th, 2011 at 11:52 AM. Reason: problem solved

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Ok here we go again: Version 3.2.0.1

    Small improvements to the Cancel button handling of 3.2, and hopefully will install over 3.1 without issues. When in doubt uninstall the old then install the new.

    Source attached, .MSI package at LANegram3-2a.msi
    Attached Files Attached Files

  8. #8
    New Member
    Join Date
    Nov 2011
    Posts
    2

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    A few of my users are getting Error 62, "Input past end of file" when launching LANegram.exe. They are all on Windows 7, HP workstations. It works fine for all other users with the same setup. It is working fine on all my XP and XP x64 machines.

    Have uninstalled/reinstalled; updated to latest version; tried to run it in compatiblitiy mode; restarted; etc. It always gives the same error.

    Any help on this matter would be greatly appreciated.

    Thanks for a reliable and easy replacement to NET SEND.

    Sincerely,

    Kevin

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Hmm.

    Sounds like a corrupted settings file. I'm not sure how else this error can occur. The file should be at:

    C:\Users\user name\AppData\Roaming\BVO Computing Services\LANegram Messenger\0.dat

    One detour might be to simply delete the file and let the progam create a new one.


    I'm wondering if the problem is related to putting this into the roaming profile. The settings involve screen coordinates and different PCs may well have different monitor dimensions. It may also be related to High DPI settings on your HP machines.

    Still, I'm not sure why this I/O error would occur. Can you post the contents of this file from a machine/user where the problem occurs?


    I can see several small tweaks that might help and of course some error trapping/recovery could help too. Seeing a settings file first might save several go-rounds trying to "fix" the wrong problem though.

  10. #10
    New Member
    Join Date
    Nov 2011
    Posts
    2

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Deleting the file worked. Thank You! Most of those 0.dat files were empty. I don't use roaming profiles, however I use a profile wizard to migrate setups. Maybe that is the root of the problem. Let me know if you need any more information to further debug.

    Thanks Again,

    Kevin

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    One thing I find laughable is the number of "magic uninstaller" vendors peddling their wares to "help you uninstall LANegram."

    In most cases any uninstall problem stems from trying to uninstall it while you have a copy of it running! Simply shut it down, or if you're desperate use Task Manager to kill it. No big deal.

    If you really want to get rid of the few tiny files it creates under Users' profiles see post #9 above.

    It's pretty much that simple.

    Softpedia gives it a "100% clean" award.
    Last edited by dilettante; Sep 13th, 2013 at 11:47 PM.

  12. #12
    New Member
    Join Date
    Jan 2012
    Posts
    2

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    I have a question. When the program gets to 100 messages, it stops showing new messages. I there a way I can have the newest message delete the oldest message, maybe after 50 messages?

    Thanks!

  13. #13

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Quote Originally Posted by R.U.Wasted View Post
    I have a question. When the program gets to 100 messages, it stops showing new messages. I there a way I can have the newest message delete the oldest message, maybe after 50 messages?
    This confused me at first because new messages past 100 were intended to delete the oldest and then add the new 100th entry.

    It turns out this was a bug I missed in testing that nobody has ever brought up before.


    New version, 3.3:

    So this bug (which only impacts "standard UI" users and not "simple UI" users) has been corrected.

    In addition a more visible change reversed the order of the listed messages in the standard interface. These used to run top to bottom, newest at the bottom and the oldest at the top.

    Now the newest message is listed at the top, "pushing" the older ones down. And once the 101st comes in the oldest gets deleted before the new 100th entry is added (at the top). I hope this makes more sense for most people.

    The readme.rtf file has been updated to reflect these changes. This appears at the end, in the change history.

    This version will work fine in a network where other machines are using an earlier version, so you can gradually update machines if you choose.


    Caution:

    As several people have commented before, even though these Installer packagers were authored to allow a new version install to replace an older one, there are some sequencing problems I have not had time to work on. The result is that you can end up with multiple entries in Add/Remove Programs and some general confusion if you try to revert a newer version to an older one by uninstalling the new one.

    So... I recommend that if you have an older version already installed you first remove (uninstall) the old LANegram, and then install the new one.


    Downloads

    MSI (binary installer) package is at LANegram 3-3.msi

    Source attached below.


    I hope this works. When you get away from a project it can take time to get your head back where it was so you rebuild everything correctly and especially get the repackaging right. I spent some time testing the new version and it seems fine. I verified the "upgrade" issue still exists.

    I'm also hoping most people won't have a problem with the messages listing in newest-first order too.
    Attached Files Attached Files
    Last edited by dilettante; Jan 22nd, 2012 at 02:33 PM.

  14. #14
    New Member
    Join Date
    Jan 2012
    Posts
    2

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Thanks for your help!

  15. #15

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    P.S.

    I would try moving this to another site, since most of the users never need the source code anyway. But there are a ton of links out there now pointing here and I'd risk breaking them.

    I still might do so though, with an entry here pointing to the new location after it happens.

  16. #16
    New Member
    Join Date
    Mar 2012
    Posts
    1

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Are you able to send to multiple users? if so what would the syntax be

  17. #17

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    The syntax is much like that of NET SEND.

    You can send to all using * or to all similar names like George and Gerry using ge* but it doesn't accept a list of names.

  18. #18
    New Member
    Join Date
    Mar 2012
    Posts
    1

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Hi dilettante,

    We have been using this in our school for some time now for admin notices, I wonder if you would mind us altering the source a little to better suit our needs, though mostly the look and feel of the popups? Along the same lines, any chance of converting the project files so we can open them in VB2010? We dont unfortuantely have VB2008 or so in our MS agreement

  19. #19

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    The source code is available here so you can do anything you like with it. See the first post above for license information. There are no usage restrictions at all.


    Sorry, I don't have a VB.Net version of this. It was written in VB6 in order to keep its footprint small. A VB.Net version would be pretty big with CLR & Framework deployment requirements as well.

    VB6 is part of VS 6.0, and the most practical way to acquire that is through an MSDN subscription today.

  20. #20
    New Member
    Join Date
    Mar 2012
    Posts
    1

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    I signed up to say thanks for this. It's just what I was looking for.

  21. #21

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    You're welcome.

  22. #22
    New Member
    Join Date
    Apr 2012
    Posts
    2

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    I successfully installed vb6 on a windows 7 and xp machine and it works both ways but I get two alerts whenever I send a message. This happens on both machines. Is this normal or there a fix?

  23. #23

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    I suspect you have two networks. Even with one physical LAN you may have more than one if you are using TCP/IP along with NetBEUI or IPX.

    There isn't any fix for this in the current product. A workaround isn't planned.

  24. #24
    New Member
    Join Date
    Apr 2012
    Posts
    2

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    IT may be that you are right. I have both my ethernet port and wireless running. Thanks!

  25. #25
    New Member
    Join Date
    Aug 2012
    Posts
    3

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Just found this awesome little program and it is almost everything ive been looking for. one question though...can i send a message to a group of computers or a group of users? I'm in an AD environment and would like to send messages to a AD group. thanks again for such a cool little program

  26. #26

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    No, it doesn't handle AD groups.

    It is possible to use a computer name or a user name as the destination, or use wildcards/patterns to send to "groups" in a looser sense, e.g.:

    send bzc* text

    Sends "text" to all users and computers with names starting with "bzc" and then anything else.

    send *bzc text

    Sends to all that end with "bzc" with anything else before that.

    More complex patterns can also be used, but there is nothing that can reference AD group membership.

  27. #27
    New Member
    Join Date
    Aug 2012
    Posts
    3

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    that still might work for me b/c my computer naming convention is similar on all computers...ill do some testing

    thanks again!

  28. #28

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    For reference, the way it works is that Send.exe always broadcasts each message. The "smarts" are at the receiver (LANegram.exe) end.

    The destination pattern is sent as part of the message. LANegram takes a received message and does a Like comparison between the sent pattern (after converting it to lower case) and each of the simple ComputerName (w/o the Domain) and simple UserName (after converting it to lower case). If either matches the LANegram considers this a message to "him."

    The full description of these Like patterns can be found in Like Operator.


    So a relatively complex "destination" example might be: *[BWZ]*

    This would mean "any computer name or user name that has a 'B' or 'W' or 'Z' anywhere in it."

    Since these are treated as case-insensitice by lowercasing them this example has identical results: *[bwz]*


    Another example might be: ??ABC?##*

    This means "two of any character, then 'ABC' followed by any single character and two numeric digits, followed by nothing or anything."


    Or even: [!G-Z]*

    Which means "one character not in 'G' though 'Z' followed by nothing or anything."
    Last edited by dilettante; Aug 23rd, 2012 at 04:39 AM.

  29. #29
    New Member
    Join Date
    Aug 2012
    Posts
    3

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    well it seems to be working pretty well until i started testing across different vlans...it seems if all the computers are on one vlan it works as it's supposed to but different vlan no message pops up at all. is this correct behavior?

    example:
    say my computer ip is 192.168.31.xx and i send a message to abc* all computers on 192.168.31.xx get the message pop up BUT computers using 192.168.32.xx, 192.168.30.xx, or any other vlan no pop up

    thanks for such quick responses!

  30. #30

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Well I can't take a lot of credit for quick responses, I just happen to be looking in here lately!

    Crossing VLANs depends entirely on how they are connected by switching and routing. The issue is that we're using Mailslot broadcasts. As far as I recall for NetBT these use:

    UDP 138, NETBIOS-DGM, NetBIOS datagram service

    Unless such broadcasts are allowed to pass unhindered you can't use LANegeam between your VLANs. Network admins often have legitimate reasons for blocking these (poorly behaved applications may generate excessive chatter) and part of the reason for VLAN and similar technologies is to isolate such traffic anyway.

    In "modern" AD domains the domain servers get around this by filtering traffic and passing things to each other via TCP connections. LANegram has no way to piggyback on this though, and would need to have its own "broadcast relay servers" on each VLAN, and of course they'd need to be configured to know about each other.

    I can't recall how the old NET SEND and Messenger Service dealt with this in later Windows versions. Perhaps those messages just "fell on the floor" as well?
    Last edited by dilettante; Aug 23rd, 2012 at 11:45 AM. Reason: typos

  31. #31
    Registered User
    Join Date
    Jun 2013
    Posts
    1

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Thanks for this awesome program! it is a lifesaver!

    I have just tried it out on Windows 8 and at first it worked OK but after installing a few apps I started to get this error?

    Run-Time error "62":

    Input past end of file


    Anyone seen this? Does this mean some VB6 runtime DLL has gotten overwritten ? If so what DLL's should I be looking for and where?

  32. #32

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    Quote Originally Posted by Naza View Post
    I have just tried it out on Windows 8 and at first it worked OK but after installing a few apps I started to get this error?

    Run-Time error "62":

    Input past end of file
    Sorry I didn't see this earlier. Even sorrier I don't have a fix since I haven't been able to find a reason why that error might occur. All I can think of might be a settings file corruption problem.

    See post #9 above.

    This could occur if you have had roaming profile problems within your network.

  33. #33

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,293

    Re: Utility: LANegram - NET SEND Replacement [VB6]

    There seems to be a problem with the file hosting of the binary installer packages. I am looking into this.

    Update:

    Problem resolved, at least for now.
    Last edited by dilettante; Sep 3rd, 2014 at 04:30 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.