Jump to content

Run Application as Windows XP System Service


Recommended Posts

I admit I am not very good at using this sites search feature and I apologize if I missed this answer on another thread.

I would like to create an application using LabView that executes on startup for Windows and runs an icon in the system tray.

I am really unsure where to even begin with this, so any help will be greatly appreciated.

Thanks!

Link to comment

Funny you should mention this, because I was just thinking of creating an application like that, and then do the "tray icon" part as a .net Class library.

You can then create the "Icon tray" object set its properties/icons and then when a user interacts with the system tray icon the .net part fires call backs to LabVIEW.

I've done a similar project before and the callback works great.

If I have time to finish the code I'll post it here.

//Mikael

Link to comment

QUOTE(Noxious @ Aug 31 2007, 02:18 AM)

Also see this thread on the NI forums: http://forums.ni.com/ni/board/message?board.id=170&message.id=229208' target="_blank">http://forums.ni.com/ni/board/message?boar...ssage.id=229208

Windows services start on windows startup and you can use third party software such as srvany to start your application as a service. Getting your application to a system tray as an icon is a different thing. For this purpose you don't need a windows service but a windows startup program that you set to start from the registry. The system tray interactions are complitely unknown field to me but I guess there is an API for that. You better serarch microsoft documentation rather than LabVIEW documentation as you are pioneering in this field...

Tomi

Link to comment

QUOTE(Michael_Aivaliotis @ Sep 1 2007, 09:42 AM)

Now I remember why I didn't use this the last time I saw it - it requires .NET callbacks, which aren't supported in LV 7.0. :(

Link to comment

Now I know for a fact that at some point in time in the past, at at least 7.0, NI themselves released a small package that would allow you to interface with the notifier/system tray. I know this because I downloaded it and it had the NI logo on it and came from an NI person. Now whether this is the CVI one that I have seen on the NI forums I am unsure because I have yet to download it and my backup drive did not show that anything like it was available. And on top of that there was one also released for free at at least the time of 7.0 that came from a 3 letter acronym company like SVT or STV or SFT or ... well heck I can't get it otherwise I would have found it by now.

Gotta run for now, but does anyone remember this to prove that the bathroom chemicals did not permanently damage my memory.

Link to comment

QUOTE(Karissap @ Aug 31 2007, 01:38 AM)

Only if you are quite good at C and integrating that through a DLL into LabVIEW. The System Tray API in Windows uses callbacks and integrating that with LabVIEW is not trivial. ActiveX should be easier but I don't think there is a standard Windows ActiveX control that does System Tray.

QUOTE(MikaelH @ Aug 30 2007, 08:17 PM)

You can then create the "Icon tray" object set its properties/icons and then when a user interacts with the system tray icon the .net part fires call backs to LabVIEW.

The .Net System tray API seems to have a problem somehow. I've seen several applications using that and they all seem to not remove the icon from the system tray when the application closes. Apparently there is no way to properly cause such an icon to disappear, especially when the application closed unexpectedly.

Rolf Kalbermatter

Link to comment

QUOTE(Donald @ Sep 5 2007, 04:07 AM)

Don't forget to put following key in .ini file: runAsService=TRUE

This key tells the LabVIEW Run-Time Engine to ignore the Windows WM_ENDSESSION message that is sent when a user logs off!

Now THAT is a setting to remember! Thanks for the tip! :thumbup:

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.