Service Explorer Plugin

Support for developers of new plugins, third-party plugin announcements and discussions.
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

Re: Service Explorer Plugin

Post by vld »

EXCELLENT!!! Works with 2.51 & 2.52 and no additional software required. :mrgreen:
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Service Explorer Plugin

Post by Jan Rysavy »

Mike, there are differences in Properties dialog, did you build it yourself? (looks like a lot of work...)
properties.png
properties.png (123.59 KiB) Viewed 30443 times
Could you please also make the Properties menu item bold as default item?
properties2.png
properties2.png (16.3 KiB) Viewed 30442 times
Mike12345
Plugin Developer
Plugin Developer
Posts: 43
Joined: 03 May 2006, 00:11
Location: Germany

Re: Service Explorer Plugin

Post by Mike12345 »

Unfortunatly there is no easy way to invoke a mmc snap-in dialog without diving deep into COM. :(
I thought it would be easier/faster to build one on my own even it lacks a few (not so often used) features in the first.

The context menu is updated - download the new version from the first post.
Thanks for your feedback. :wink:
xm
Posts: 69
Joined: 11 Dec 2007, 11:11

Re: Service Explorer Plugin

Post by xm »

1st thanks for this plugin, I have started using it every day.

As you wrote your own "Properties" dlg and not using the system one, it could not be a big problem for you to change the first item "Service name" to be also selectable and copyable (Ctrl+C) as the later ones (DisplayName and Description). What do you think?

I often need this name to do some stuff on cmdline after, i.e. "sc delete 'servicename'" and unfortunately authors of services tend to give them long obscure hard-to-remember names. So the Ctrl+C posibility could be handy.
Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1112
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: Service Explorer Plugin

Post by Petr Solin »

I have tried version 0.0.7 and it does not work because svcexp.spl is of version 0.0.6.16 and its english.slg is 0.0.7.16. Please fix the installation package. ;-)
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Service Explorer Plugin

Post by Jan Rysavy »

some small glitches:

-the TAB-order in your properties dialog box is weird

-there are not hot keys assigned to labels such as "Display name", "Description", etc

-what about the Help button, does it have any sense?

-typo in "Path to executable:" label

-small spacing above the "Path to executable:" label
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Service Explorer Plugin

Post by Jan Rysavy »

Another (productivity) idea: basic support for paths. It would allow to store Hot Path to particular service.
Try Shift+F7 with following path:
reg:\HKEY_CURRENT_USER\Software\Altap\Altap Salamander 2.52\Configuration\Language
-> "Configuration" key is opened and the "Language" value is focused

You can see implementation in AS SDK / Demoplugin on simulated file system (dfs:c:\AUTOEXEC.BAT)

For Alt+Insert function you need to implement CPluginFSInterfaceAbstract::GetFullName
The Shift+F7 look at ChangePath, you need to return "file name" that should be focused using parameters 'cutFileName' and 'pathWasCut'.
Mike12345
Plugin Developer
Plugin Developer
Posts: 43
Joined: 03 May 2006, 00:11
Location: Germany

Re: Service Explorer Plugin

Post by Mike12345 »

@xm:
Shouldn't be a problem. Do you have need of the new "Delete Service" Feature also? :mrgreen:
New version is up - download it from first post.

Code: Select all

Version 0.0.8 (08.09.2009)
-------------------------
+ new "delete service" function (use with caution!)
* changed tab order 
* Servicename is now selectable
@Jan:
Thank you for your ideas, bug reports und SDK references.
I will try to fix & implement them in one of the next versions.
Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1112
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: Service Explorer Plugin

Post by Petr Solin »

I believe "Delete Service" function can be very useful, especially because it is not in Service Control Manager (BTW, it's only "Services" at least on Vista). I suggest to move it from Properties dialog to context menu (it would be much easier to find it).

If you want to be perfect, try to add it to CPluginFSInterface::Delete. ;-) Then users can use Delete or F8 key or toolbar buttons as they are used on disks. How to do it? Add FS_SERVICE_DELETE to CPluginFSInterface::GetSupportedServices(). Implement CPluginFSInterface::Delete: ignore 'mode' parameter, just display delete confirmation messagebox (parent 'parent', number of selected services to delete is in 'selectedFiles', if 'selectedFiles' is 0, you should delete focused service, you are working in panel 'panel', use GetPanelFocusedItem and GetPanelSelectedItem to get name of focused or only one selected service for confirmation text, see Demoplugin how to use them). When delete is confirmed, just delete focused/selected services (again use GetPanelFocusedItem and GetPanelSelectedItem). Return TRUE and 'cancelOrError'=FALSE if success, all selected services from panel will be deselected. Return TRUE and 'cancelOrError'=TRUE if operation is canceled or failed (nothing will be deselected).

Little bug: open Services in both panels, Start/Stop some service, listing is refreshed only in active panel, other panel remains with old listing. You can certainly post refresh also to other panel (only if it contains your FS), but "clear" solution is to add FS_SERVICE_ACCEPTSCHANGENOTIF to CPluginFSInterface::GetSupportedServices() and call PostRefreshPanelFS(this) in CPluginFSInterface::AcceptChangeOnPathNotification (you have no paths, so any change coming here is yours). After action with services just call PostChangeOnPathNotification to broadcast change notification.
xm
Posts: 69
Joined: 11 Dec 2007, 11:11

Re: Service Explorer Plugin

Post by xm »

2 Mike12345:
> Shouldn't be a problem. Do you have need of the new "Delete Service" Feature also?
> New version is up - download it from first post.
------

Thanks a lot, that I called "service" ;-)

"sc delete" was taken only as an example, but actually it is one of my favourite ones when it comes to "cleaning" an user PC from malware etc...
User avatar
th.
Posts: 116
Joined: 04 Sep 2006, 23:09
Location: Germany

Re: Service Explorer Plugin

Post by th. »

Under Windows 7 Ultimate RTM (German) there is one service that is listed only when Salamander is run as admin. It is called "Heimnetzgruppen-Listener" ("Homegroup Listener" I guess in English), part of the new Homegroup feature of Windows 7.
svcexp_user.png
svcexp_user.png (64.29 KiB) Viewed 30231 times
svcexp_admin.png
svcexp_admin.png (67.24 KiB) Viewed 30229 times
Mike12345
Plugin Developer
Plugin Developer
Posts: 43
Joined: 03 May 2006, 00:11
Location: Germany

Re: Service Explorer Plugin

Post by Mike12345 »

@th.:
Thanks for reporting - i will look into this.
Does anybody has seen this on Vista also?

@Petr:
Thank you for you detailed explanations, references and sharp eyes. :D
New Version is up. Download from 1st post.

Code: Select all

Version 0.0.9 (11.09.2009)
-------------------------
+ F8/DEL | FS_SERVICE_DELETE implemented
* "delete service" function moved from properties dialog to contextmenu
- if two service panels were active only the active panel was refreshed on a state change - fixed
Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1112
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: Service Explorer Plugin

Post by Petr Solin »

Great! ;-) I have tested it and found out some bugs. Delete from context menu does not work. And when I select three services and use Delete key, it asks if I want to delete the first selected service (I expected "Do you want to delete 3 selected services?"). After a service is deleted, it remains in the list of services and is only "marked for deletion". When I try to change state of such service, I get message "service is marked for deletion" in Services Control Manager, maybe your plugin could also show this message (now it shows just some error message).
Mike12345
Plugin Developer
Plugin Developer
Posts: 43
Joined: 03 May 2006, 00:11
Location: Germany

Re: Service Explorer Plugin

Post by Mike12345 »

Damn - sorry, for missing the contextmenu :? will fix that asap.

As for the implementation of the delete dialog i was quite unsure what is best way.
The "Do you want to delete xxx selected services" was the first one i tried but i thought it would be to dangerous to give the user the abbility to delete (maybe) all services at once in a blink of an eye. There is no trash bin as for files where you can "recover" deleted services. You could really harm your system with that. Instead i thought asking for confirmation for each and every service would be a saver way. Ofcourse this could be changed. :wink:

If a service can be deleted the plugin will delete it the same way as the service control manager would do. There shouldn't be any difference.
"Marked for deletion" gives the service the possibility to "clean up the things", "write into database" etc before a hard delete. So this is quite usual and depends on the service.
I will try to use the same error message as scm. Maybe you remember the errornumber which was printed before the messagetext?

Thank you for your feedback. 8)
Mike12345
Plugin Developer
Plugin Developer
Posts: 43
Joined: 03 May 2006, 00:11
Location: Germany

Re: Service Explorer Plugin

Post by Mike12345 »

Code: Select all

Version 0.0.10 (12.09.2009)
--------------------------
- missing contextmenu functionality for "delete" service - fixed
* "service is marked for deletion" errormessage
Download from 1st post.
Post Reply