Windows Service - nejjednodušší získání cesty ke klíči v registru – .NET – Fórum – Programujte.com
 x   TIP: Přetáhni ikonu na hlavní panel pro připnutí webu

Windows Service - nejjednodušší získání cesty ke klíči v registru – .NET – Fórum – Programujte.comWindows Service - nejjednodušší získání cesty ke klíči v registru – .NET – Fórum – Programujte.com

 

Toto vlákno bylo označeno za vyřešené — příspěvek s řešením.
22. 8. 2017   #1
-
0
-

Ahoj,

při instalaci služby se vytvoří v HKLM\SYSTEM\CurrentControlSet\Services klíč do kterého pak přidávám nastavení služby. Potřebuji jednoduchým způsobem získat "full path" k tomuto klíči. Jak na to? Zatím jsem používal načtení z app.config, což je hodně neohrabané, vždy musím správnou cestu ručně vytvořit.

hu

Nahlásit jako SPAM
IP: 195.178.67.–
JerryM0
Věrný člen
23. 8. 2017   #2
-
0
-

#1 hlucheucho
uplně nerozumim otázce, ale najít klíč v registru jde takhle

https://www.youtube.com/watch?v=Rg3ths8lb68

a je na to aj funkce enumerace

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724256(v=vs.85).aspx

možná že existuje něco lepšího

Nahlásit jako SPAM
IP: 2a00:1028:83be:235a:e449:...–
23. 8. 2017   #3
-
0
-

#2 JerryM
Ono nejde o hledání. Klíč se nachází v konkrétním umístění a jmenuje se jako služba. A tady je kámen úrazu. Službu lze při instalaci pojmenovat jinak. Když k tomu přidám svou omylnost, je na problém zaděláno. Takže jde o to za běhu vědět jak je služba pojmenována a full path klíče v registru složit nebo ještě lépe přímo získat full path klíče v registru.

hu

Nahlásit jako SPAM
IP: 193.86.81.–
BDS+3
Věrný člen
23. 8. 2017   #4
-
0
-

#3 hlucheucho
Nevím jestli po tomto druhém vysvětlení to někdo pochopil lépe...

Na základě čeho tu cestu vytváříš, když to děláš ručně?

 kdyby náhodou:

using Microsoft.Win32;

static void Main(string[] args)
{
    //ukázka přístupu ke klíči: HKEY_CURRENT_USER\Control Panel
    try
    {
        using (RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser , RegistryView.Default))
        {
            using (RegistryKey sub_key = key.OpenSubKey("Control Panel", false))
            {
                Console.WriteLine(sub_key.Name);
                Console.WriteLine("-----------------------------------\n");
                var names = sub_key.GetSubKeyNames(); //výpis podklíčů
                foreach(string s in names)
                {
                    Console.WriteLine(s);
                }
                Console.WriteLine("-----------------------------------\n");
                //výpis hodnod podklíče: HKEY_CURRENT_USER\Control Panel\Colors
                using(RegistryKey colors_key = sub_key.OpenSubKey("Colors"))
                {
                    var values = colors_key.GetValueNames(); //výpis hodnot
                    foreach (string s in values)
                    {
                        Console.WriteLine(s);
                    }
                }
            }
        }
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex.Message);
    }
    Console.ReadKey();
}
Nahlásit jako SPAM
IP: 185.69.69.–
W11 :)
gna
~ Anonymní uživatel
1875 příspěvků
23. 8. 2017   #5
-
0
-

To je klíč, kde Windows mají informace o službách. Ne kam si služby mají ukládat svoje data.

Můžeš najít službu s tvým ProcessId a zjistit její jméno. Nejjednodušeji přes WMI (ManamegentObject). Jestli ji instaluješ pod jiným jménem, než pod kterým běží a nikam ho neukládáš, tak holt asi budeš muset ty klíče projít a ten svůj nějak identifikovat.

Nebo to prostě neprasit :-)

Nahlásit jako SPAM
IP: 213.211.51.–
24. 8. 2017   #6
-
0
-

#4 BDS
Na základě čeho tu cestu vytváříš, když to děláš ručně?

Nevytvářím ho. Každé službě je při instalaci vytvořen její klíč v HKLM\SYSTEM\CurrentControlSet\Services. Proč tomu tak je se zeptej Microsoftu. I pro moji službu při její instalaci se HKLM\SYSTEM\CurrentControlSet\Services vytvoří klíč pojmenovaný jako služba. V tuto chvíli je cesta ke klíči zapsaná v app.config. Toto řešení má nevýhodu, při instalaci se buď nesmí služba přejmenovat nebo se musí upravit řetězec v app.config podle skutečnosti. 

hu

Nahlásit jako SPAM
IP: 195.178.67.–
24. 8. 2017   #7
-
0
-

Klíč služby obsahuje nastavení služby, i mnou vytvořená. Umístění všech nastavení na jednom místě je logické. Umím klíč otevřít, umím ho přečíst. Problém je v ručním nastavování cesty ke klíči v nějakém app.config. Pokud budu znát alespoň jméno služby pod kterým byla instalována, znám jméno klíče, znám jeho umístění (je pevně dáno) a mohu ho přečíst bez jakéhokoliv hledání.

Pokud se ptám na jméno služby (= jméno klíče) nebo full path klíče, ptám se na identifikaci klíče. Tvrzení 

klíče projít a ten svůj nějak identifikovat.

mne tedy vrátí k původnímu dotazu. Pořád jsem přesvědčený, že služba za běhu "ví jak se jmenuje" nebo možná i zná cestu ke svému klíčí v registru.

Zatím tu padla jediná snad použitelná myšlenka - jméno procesu.

hu

Nahlásit jako SPAM
IP: 195.178.67.–
JerryM0
Věrný člen
24. 8. 2017   #8
-
0
-

#1 hlucheucho
a neni to tohle ?

http://windowsitpro.com/windows/q-how-can-i-find-short-service-name-windows-service-service-display-name

Nahlásit jako SPAM
IP: 2a00:1028:83be:235a:e4c9:...–
JerryM0
Věrný člen
24. 8. 2017   #9
-
0
-

tohle je taky zajímavý

http://mikefrobbins.com/2015/12/24/use-powershell-to-determine-services-with-a-starttype-of-automatic-or-manual-with-trigger-start/

Nahlásit jako SPAM
IP: 2a00:1028:83be:235a:e4c9:...–
JerryM0
Věrný člen
24. 8. 2017   #11
-
0
-

takhle vypadá seznam procesů (nějakých) který běží pod windows:

nr. : 0

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 752
Handle count: 312
ID: 1376
Machine name: .
------------------------------------------------------------------
nr. : 1

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 756
Handle count: 559
ID: 1176
Machine name: .
------------------------------------------------------------------
nr. : 2

Process: CDASrv
Base priority: 8
Enable rising events: False
Handle: 760
Handle count: 118
ID: 2356
Machine name: .
------------------------------------------------------------------
nr. : 3

Process: taskhost
Base priority: 8
Enable rising events: False
Handle: 764
Handle count: 249
ID: 1764
Machine name: .
------------------------------------------------------------------
nr. : 4

Process: vmware-usbarbitrator64
Base priority: 8
Enable rising events: False
Handle: 768
Handle count: 150
ID: 3536
Machine name: .
------------------------------------------------------------------
nr. : 5

Process: vialogsv
Base priority: 8
Enable rising events: False
Handle: 772
Handle count: 99
ID: 2940
Machine name: .
MainModule: System.Diagnostics.ProcessModule (vialogsv.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 11296
NonpagedSystemMemorySize64: 11296
PagedMemorySize: 2326528
PagedMemorySize64: 2326528
PagedSystemMemorySize: 112344
PagedSystemMemorySize64: 112344
PeakPagedMemorySize: 2490368
PeakPagedMemorySize64: 2490368
PeakVirtualMemorySize: 70393856
PeakVirtualMemorySize64: 70393856
PeakWorkingSet: 6402048
PeakWorkingSet64: 6402048
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 2326528
PrivateMemorySize64: 2326528
PrivilegedProcessorTime: 00:00:00.0468003
ProcessName: vialogsv
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0468003
UserProcessorTime: 00:00:00
VirtualMemorySize: 66461696
VirtualMemorySize64: 66461696

------------------------------------------------------------------
nr. : 6

Process: usb3Monitor
Base priority: 8
Enable rising events: False
Handle: 776
Handle count: 91
ID: 2348
Machine name: .
MainModule: System.Diagnostics.ProcessModule (usb3Monitor.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 9488
NonpagedSystemMemorySize64: 9488
PagedMemorySize: 1978368
PagedMemorySize64: 1978368
PagedSystemMemorySize: 166640
PagedSystemMemorySize64: 166640
PeakPagedMemorySize: 1978368
PeakPagedMemorySize64: 1978368
PeakVirtualMemorySize: 94121984
PeakVirtualMemorySize64: 94121984
PeakWorkingSet: 6717440
PeakWorkingSet64: 6717440
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 1978368
PrivateMemorySize64: 1978368
PrivilegedProcessorTime: 00:00:00.0468003
ProcessName: usb3Monitor
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0936006
UserProcessorTime: 00:00:00.0468003
VirtualMemorySize: 88453120
VirtualMemorySize64: 88453120

------------------------------------------------------------------
nr. : 7

Process: wisptis
Base priority: 13
Enable rising events: False
Handle: 780
Handle count: 159
ID: 1128
Machine name: .
------------------------------------------------------------------
nr. : 8

Process: IPROSetMonitor
Base priority: 8
Enable rising events: False
Handle: 784
Handle count: 75
ID: 1556
Machine name: .
------------------------------------------------------------------
nr. : 9

 

------------------------------------------------------------------
nr. : 11

Process: RtkNGUI64
Base priority: 8
Enable rising events: False
Handle: 748
Handle count: 282
ID: 2340
Machine name: .
------------------------------------------------------------------
nr. : 12

Process: vmware-vmx
Base priority: 8
Enable rising events: False
Handle: 796
Handle count: 418
ID: 2140
Machine name: .
------------------------------------------------------------------
nr. : 13

Process: vmnetdhcp
Base priority: 8
Enable rising events: False
Handle: 800
Handle count: 50
ID: 2532
Machine name: .
MainModule: System.Diagnostics.ProcessModule (vmnetdhcp.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 7272
NonpagedSystemMemorySize64: 7272
PagedMemorySize: 7782400
PagedMemorySize64: 7782400
PagedSystemMemorySize: 49928
PagedSystemMemorySize64: 49928
PeakPagedMemorySize: 7827456
PeakPagedMemorySize64: 7827456
PeakVirtualMemorySize: 37642240
PeakVirtualMemorySize64: 37642240
PeakWorkingSet: 10653696
PeakWorkingSet64: 10653696
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 7782400
PrivateMemorySize64: 7782400
PrivilegedProcessorTime: 00:00:00.0156001
ProcessName: vmnetdhcp
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0468003
UserProcessorTime: 00:00:00.0312002
VirtualMemorySize: 36331520
VirtualMemorySize64: 36331520

------------------------------------------------------------------
nr. : 14

Process: NMIndexingService
Base priority: 8
Enable rising events: False
Handle: 804
Handle count: 144
ID: 3516
Machine name: .
MainModule: System.Diagnostics.ProcessModule (NMIndexingService.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 13704
NonpagedSystemMemorySize64: 13704
PagedMemorySize: 7102464
PagedMemorySize64: 7102464
PagedSystemMemorySize: 122616
PagedSystemMemorySize64: 122616
PeakPagedMemorySize: 8740864
PeakPagedMemorySize64: 8740864
PeakVirtualMemorySize: 94797824
PeakVirtualMemorySize64: 94797824
PeakWorkingSet: 13168640
PeakWorkingSet64: 13168640
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 7102464
PrivateMemorySize64: 7102464
PrivilegedProcessorTime: 00:00:00.3432022
ProcessName: NMIndexingService
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.4680030
UserProcessorTime: 00:00:00.1248008
VirtualMemorySize: 73826304
VirtualMemorySize64: 73826304

------------------------------------------------------------------
nr. : 15

Process: atieclxx
Base priority: 8
Enable rising events: False
Handle: 808
Handle count: 156
ID: 1148
Machine name: .
------------------------------------------------------------------
nr. : 16

Process: vmware-authd
Base priority: 8
Enable rising events: False
Handle: 812
Handle count: 216
ID: 3116
Machine name: .
MainModule: System.Diagnostics.ProcessModule (vmware-authd.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 17240
NonpagedSystemMemorySize64: 17240
PagedMemorySize: 4886528
PagedMemorySize64: 4886528
PagedSystemMemorySize: 159888
PagedSystemMemorySize64: 159888
PeakPagedMemorySize: 4943872
PeakPagedMemorySize64: 4943872
PeakVirtualMemorySize: 99880960
PeakVirtualMemorySize64: 99880960
PeakWorkingSet: 9633792
PeakWorkingSet64: 9633792
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 4886528
PrivateMemorySize64: 4886528
PrivilegedProcessorTime: 00:00:03.1044199
ProcessName: vmware-authd
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:03.7596241
UserProcessorTime: 00:00:00.6552042
VirtualMemorySize: 93401088
VirtualMemorySize64: 93401088

------------------------------------------------------------------
nr. : 17

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 816
Handle count: 369
ID: 4100
Machine name: .
------------------------------------------------------------------
nr. : 18

Process: spoolsv
Base priority: 8
Enable rising events: False
Handle: 820
Handle count: 479
ID: 1340
Machine name: .
------------------------------------------------------------------
nr. : 19

Process: vmnat
Base priority: 8
Enable rising events: False
Handle: 824
Handle count: 84
ID: 2912
Machine name: .
MainModule: System.Diagnostics.ProcessModule (vmnat.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 11368
NonpagedSystemMemorySize64: 11368
PagedMemorySize: 1830912
PagedMemorySize64: 1830912
PagedSystemMemorySize: 79328
PagedSystemMemorySize64: 79328
PeakPagedMemorySize: 2002944
PeakPagedMemorySize64: 2002944
PeakVirtualMemorySize: 52858880
PeakVirtualMemorySize64: 52858880
PeakWorkingSet: 5210112
PeakWorkingSet64: 5210112
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 1830912
PrivateMemorySize64: 1830912
PrivilegedProcessorTime: 00:00:00.0156001
ProcessName: vmnat
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0624004
UserProcessorTime: 00:00:00.0468003
VirtualMemorySize: 48926720
VirtualMemorySize64: 48926720

------------------------------------------------------------------
nr. : 20

Process: WUDFHost
Base priority: 8
Enable rising events: False
Handle: 828
Handle count: 209
ID: 1728
Machine name: .
------------------------------------------------------------------
nr. : 21

Process: NMIndexStoreSvr
Base priority: 8
Enable rising events: False
Handle: 832
Handle count: 170
ID: 2712
Machine name: .
MainModule: System.Diagnostics.ProcessModule (NMIndexStoreSvr.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 20192
NonpagedSystemMemorySize64: 20192
PagedMemorySize: 12070912
PagedMemorySize64: 12070912
PagedSystemMemorySize: 173552
PagedSystemMemorySize64: 173552
PeakPagedMemorySize: 13721600
PeakPagedMemorySize64: 13721600
PeakVirtualMemorySize: 130416640
PeakVirtualMemorySize64: 130416640
PeakWorkingSet: 19333120
PeakWorkingSet64: 19333120
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 12070912
PrivateMemorySize64: 12070912
PrivilegedProcessorTime: 00:00:00.3900025
ProcessName: NMIndexStoreSvr
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:01.2792082
UserProcessorTime: 00:00:00.8892057
VirtualMemorySize: 112066560
VirtualMemorySize64: 112066560

------------------------------------------------------------------
nr. : 22

Process: dwm
Base priority: 13
Enable rising events: False
Handle: 836
Handle count: 160
ID: 344
Machine name: .
------------------------------------------------------------------
nr. : 23

Process: csrss
Base priority: 13
Enable rising events: False
Handle: 840
Handle count: 768
ID: 540
Machine name: .
------------------------------------------------------------------
nr. : 24

Process: sidebar
Base priority: 8
Enable rising events: False
Handle: 844
Handle count: 442
ID: 2704
Machine name: .
------------------------------------------------------------------
nr. : 25
310. Laura Pausini - E Ritorno Da Te - Winamp
Process: winamp
Base priority: 8
Enable rising events: False
Handle: 848
Handle count: 361
ID: 4080
Machine name: .
MainModule: System.Diagnostics.ProcessModule (winamp.exe)
Main window handle: 132316
Main window title: 310. Laura Pausini - E Ritorno Da Te - Winamp
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 36744
NonpagedSystemMemorySize64: 36744
PagedMemorySize: 18845696
PagedMemorySize64: 18845696
PagedSystemMemorySize: 260280
PagedSystemMemorySize64: 260280
PeakPagedMemorySize: 18862080
PeakPagedMemorySize64: 18862080
PeakVirtualMemorySize: 168968192
PeakVirtualMemorySize64: 168968192
PeakWorkingSet: 28897280
PeakWorkingSet64: 28897280
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 18845696
PrivateMemorySize64: 18845696
PrivilegedProcessorTime: 00:00:08.1432522
ProcessName: winamp
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:02:26.5473394
UserProcessorTime: 00:02:18.4040872
VirtualMemorySize: 165515264
VirtualMemorySize64: 165515264

------------------------------------------------------------------
nr. : 26

Process: atiesrxx
Base priority: 8
Enable rising events: False
Handle: 852
Handle count: 112
ID: 896
Machine name: .
------------------------------------------------------------------
nr. : 27

Process: SETEVENT
Base priority: 8
Enable rising events: False
Handle: 856
Handle count: 55
ID: 1516
Machine name: .
MainModule: System.Diagnostics.ProcessModule (SETEVENT.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 7144
NonpagedSystemMemorySize64: 7144
PagedMemorySize: 1019904
PagedMemorySize64: 1019904
PagedSystemMemorySize: 56528
PagedSystemMemorySize64: 56528
PeakPagedMemorySize: 1073152
PeakPagedMemorySize64: 1073152
PeakVirtualMemorySize: 33714176
PeakVirtualMemorySize64: 33714176
PeakWorkingSet: 3624960
PeakWorkingSet64: 3624960
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 1019904
PrivateMemorySize64: 1019904
PrivilegedProcessorTime: 00:00:00.0156001
ProcessName: SETEVENT
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0156001
UserProcessorTime: 00:00:00
VirtualMemorySize: 32403456
VirtualMemorySize64: 32403456

------------------------------------------------------------------
nr. : 28
Windows Service - nejjednodušší získání cesty ke klíči v registru – .NET – Fórum – Programujte.com - Mozilla Firefox
Process: firefox
Base priority: 8
Enable rising events: False
Handle: 860
Handle count: 1662
ID: 4864
Machine name: .
------------------------------------------------------------------
nr. : 29

Process: MOM
Base priority: 8
Enable rising events: False
Handle: 864
Handle count: 359
ID: 3484
Machine name: .
------------------------------------------------------------------
nr. : 30

Process: wmpnetwk
Base priority: 8
Enable rising events: False
Handle: 868
Handle count: 427
ID: 4016
Machine name: .
------------------------------------------------------------------
nr. : 31

Process: vmware-unity-helper
Base priority: 8
Enable rising events: False
Handle: 872
Handle count: 174
ID: 2228
Machine name: .
MainModule: System.Diagnostics.ProcessModule (vmware-unity-helper.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 20232
NonpagedSystemMemorySize64: 20232
PagedMemorySize: 7585792
PagedMemorySize64: 7585792
PagedSystemMemorySize: 259424
PagedSystemMemorySize64: 259424
PeakPagedMemorySize: 7766016
PeakPagedMemorySize64: 7766016
PeakVirtualMemorySize: 147279872
PeakVirtualMemorySize64: 147279872
PeakWorkingSet: 16363520
PeakWorkingSet64: 16363520
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 7585792
PrivateMemorySize64: 7585792
PrivilegedProcessorTime: 00:00:00.0312002
ProcessName: vmware-unity-helper
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0780005
UserProcessorTime: 00:00:00.0468003
VirtualMemorySize: 136290304
VirtualMemorySize64: 136290304

------------------------------------------------------------------
nr. : 32

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 876
Handle count: 648
ID: 128
Machine name: .
------------------------------------------------------------------
nr. : 33

Process: wininit
Base priority: 13
Enable rising events: False
Handle: 880
Handle count: 82
ID: 520
Machine name: .
------------------------------------------------------------------
nr. : 34

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 884
Handle count: 392
ID: 712
Machine name: .
------------------------------------------------------------------
nr. : 35

Process: Pen_Tablet
Base priority: 8
Enable rising events: False
Handle: 888
Handle count: 73
ID: 2480
Machine name: .
------------------------------------------------------------------
nr. : 36

Process: IoctlSvc
Base priority: 8
Enable rising events: False
Handle: 892
Handle count: 65
ID: 1888
Machine name: .
MainModule: System.Diagnostics.ProcessModule (IoctlSvc.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 7568
NonpagedSystemMemorySize64: 7568
PagedMemorySize: 1036288
PagedMemorySize64: 1036288
PagedSystemMemorySize: 58448
PagedSystemMemorySize64: 58448
PeakPagedMemorySize: 1089536
PeakPagedMemorySize64: 1089536
PeakVirtualMemorySize: 34615296
PeakVirtualMemorySize64: 34615296
PeakWorkingSet: 3780608
PeakWorkingSet64: 3780608
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 1036288
PrivateMemorySize64: 1036288
PrivilegedProcessorTime: 00:00:00
ProcessName: IoctlSvc
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00
UserProcessorTime: 00:00:00
VirtualMemorySize: 33304576
VirtualMemorySize64: 33304576

------------------------------------------------------------------
nr. : 37

Process: WmiPrvSE
Base priority: 8
Enable rising events: False
Handle: 896
Handle count: 121
ID: 3260
Machine name: .
------------------------------------------------------------------
nr. : 38

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 900
Handle count: 1328
ID: 500
Machine name: .
------------------------------------------------------------------
nr. : 39

Process: Fuel.Service
Base priority: 8
Enable rising events: False
Handle: 904
Handle count: 147
ID: 1484
Machine name: .
------------------------------------------------------------------
nr. : 40

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 908
Handle count: 799
ID: 296
Machine name: .
------------------------------------------------------------------
nr. : 41

Process: CCC
Base priority: 8
Enable rising events: False
Handle: 912
Handle count: 917
ID: 3836
Machine name: .
------------------------------------------------------------------
nr. : 42

Process: explorer
Base priority: 8
Enable rising events: False
Handle: 916
Handle count: 720
ID: 1272
Machine name: .
------------------------------------------------------------------
nr. : 43

Process: vmware-tray
Base priority: 8
Enable rising events: False
Handle: 920
Handle count: 65
ID: 3436
Machine name: .
MainModule: System.Diagnostics.ProcessModule (vmware-tray.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 9616
NonpagedSystemMemorySize64: 9616
PagedMemorySize: 1802240
PagedMemorySize64: 1802240
PagedSystemMemorySize: 133152
PagedSystemMemorySize64: 133152
PeakPagedMemorySize: 1859584
PeakPagedMemorySize64: 1859584
PeakVirtualMemorySize: 74973184
PeakVirtualMemorySize64: 74973184
PeakWorkingSet: 6332416
PeakWorkingSet64: 6332416
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 1802240
PrivateMemorySize64: 1802240
PrivilegedProcessorTime: 00:00:00
ProcessName: vmware-tray
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00
UserProcessorTime: 00:00:00
VirtualMemorySize: 73662464
VirtualMemorySize64: 73662464

------------------------------------------------------------------
nr. : 44

Process: TabTip
Base priority: 13
Enable rising events: False
Handle: 924
Handle count: 256
ID: 1856
Machine name: .
------------------------------------------------------------------
nr. : 45
Total Commander (x64) 8.51a - Bmc Software Israel Ltd.
Process: TOTALCMD64
Base priority: 8
Enable rising events: False
Handle: 928
Handle count: 300
ID: 2752
Machine name: .
------------------------------------------------------------------
nr. : 46

Process: dllhost
Base priority: 8
Enable rising events: False
Handle: 932
Handle count: 131
ID: 2248
Machine name: .
MainModule: System.Diagnostics.ProcessModule (DllHost.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 16152
NonpagedSystemMemorySize64: 16152
PagedMemorySize: 5275648
PagedMemorySize64: 5275648
PagedSystemMemorySize: 183632
PagedSystemMemorySize64: 183632
PeakPagedMemorySize: 5795840
PeakPagedMemorySize64: 5795840
PeakVirtualMemorySize: 104419328
PeakVirtualMemorySize64: 104419328
PeakWorkingSet: 9871360
PeakWorkingSet64: 9871360
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 5275648
PrivateMemorySize64: 5275648
PrivilegedProcessorTime: 00:00:00.0312002
ProcessName: dllhost
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0780005
UserProcessorTime: 00:00:00.0468003
VirtualMemorySize: 100847616
VirtualMemorySize64: 100847616

------------------------------------------------------------------
nr. : 47

Process: smss
Base priority: 11
Enable rising events: False
Handle: 936
Handle count: 32
ID: 264
Machine name: .
------------------------------------------------------------------
nr. : 48

Process: csrss
Base priority: 13
Enable rising events: False
Handle: 940
Handle count: 756
ID: 440
Machine name: .
------------------------------------------------------------------
nr. : 49

Process: wisptis
Base priority: 13
Enable rising events: False
Handle: 944
Handle count: 219
ID: 1848
Machine name: .
------------------------------------------------------------------
nr. : 50

Process: Pen_TabletUser
Base priority: 8
Enable rising events: False
Handle: 948
Handle count: 55
ID: 3028
Machine name: .
------------------------------------------------------------------
nr. : 51

Process: armsvc
Base priority: 8
Enable rising events: False
Handle: 952
Handle count: 75
ID: 1448
Machine name: .
MainModule: System.Diagnostics.ProcessModule (armsvc.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 7808
NonpagedSystemMemorySize64: 7808
PagedMemorySize: 1236992
PagedMemorySize64: 1236992
PagedSystemMemorySize: 75520
PagedSystemMemorySize64: 75520
PeakPagedMemorySize: 1347584
PeakPagedMemorySize64: 1347584
PeakVirtualMemorySize: 46145536
PeakVirtualMemorySize64: 46145536
PeakWorkingSet: 4042752
PeakWorkingSet64: 4042752
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 1236992
PrivateMemorySize64: 1236992
PrivilegedProcessorTime: 00:00:00.0312002
ProcessName: armsvc
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0312002
UserProcessorTime: 00:00:00
VirtualMemorySize: 43524096
VirtualMemorySize64: 43524096

------------------------------------------------------------------
nr. : 52

Process: winampa
Base priority: 8
Enable rising events: False
Handle: 956
Handle count: 113
ID: 3416
Machine name: .
MainModule: System.Diagnostics.ProcessModule (winampa.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 11048
NonpagedSystemMemorySize64: 11048
PagedMemorySize: 1921024
PagedMemorySize64: 1921024
PagedSystemMemorySize: 141512
PagedSystemMemorySize64: 141512
PeakPagedMemorySize: 2621440
PeakPagedMemorySize64: 2621440
PeakVirtualMemorySize: 86638592
PeakVirtualMemorySize64: 86638592
PeakWorkingSet: 7962624
PeakWorkingSet64: 7962624
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 1921024
PrivateMemorySize64: 1921024
PrivilegedProcessorTime: 00:00:00
ProcessName: winampa
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0156001
UserProcessorTime: 00:00:00.0156001
VirtualMemorySize: 75583488
VirtualMemorySize64: 75583488

------------------------------------------------------------------
nr. : 53

Process: Pen_Tablet
Base priority: 13
Enable rising events: False
Handle: 960
Handle count: 146
ID: 1836
Machine name: .
------------------------------------------------------------------
nr. : 54
PCD (Čes->Ang)
Process: WDICT32
Base priority: 8
Enable rising events: False
Handle: 964
Handle count: 118
ID: 3016
Machine name: .
MainModule: System.Diagnostics.ProcessModule (WDICT32.EXE)
Main window handle: 131120
Main window title: PCD (Čes->Ang)
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 14536
NonpagedSystemMemorySize64: 14536
PagedMemorySize: 4325376
PagedMemorySize64: 4325376
PagedSystemMemorySize: 173832
PagedSystemMemorySize64: 173832
PeakPagedMemorySize: 4489216
PeakPagedMemorySize64: 4489216
PeakVirtualMemorySize: 104726528
PeakVirtualMemorySize64: 104726528
PeakWorkingSet: 10629120
PeakWorkingSet64: 10629120
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 4325376
PrivateMemorySize64: 4325376
PrivilegedProcessorTime: 00:00:00.1092007
ProcessName: WDICT32
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.2340015
UserProcessorTime: 00:00:00.1248008
VirtualMemorySize: 95633408
VirtualMemorySize64: 95633408

------------------------------------------------------------------
nr. : 55

Process: CNMNSST
Base priority: 8
Enable rising events: False
Handle: 968
Handle count: 93
ID: 3408
Machine name: .
MainModule: System.Diagnostics.ProcessModule (CNMNSST.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 10040
NonpagedSystemMemorySize64: 10040
PagedMemorySize: 1585152
PagedMemorySize64: 1585152
PagedSystemMemorySize: 137144
PagedSystemMemorySize64: 137144
PeakPagedMemorySize: 1748992
PeakPagedMemorySize64: 1748992
PeakVirtualMemorySize: 78094336
PeakVirtualMemorySize64: 78094336
PeakWorkingSet: 5902336
PeakWorkingSet64: 5902336
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 1585152
PrivateMemorySize64: 1585152
PrivilegedProcessorTime: 00:00:00
ProcessName: CNMNSST
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0156001
UserProcessorTime: 00:00:00.0156001
VirtualMemorySize: 74162176
VirtualMemorySize64: 74162176

------------------------------------------------------------------
nr. : 56

Process: RadeonSettings
Base priority: 8
Enable rising events: False
Handle: 972
Handle count: 363
ID: 2220
Machine name: .
------------------------------------------------------------------
nr. : 57

Process: winlogon
Base priority: 13
Enable rising events: False
Handle: 976
Handle count: 110
ID: 840
Machine name: .
------------------------------------------------------------------
nr. : 58
Windows 7 x32 sp1 - VMware Workstation
Process: vmware
Base priority: 8
Enable rising events: False
Handle: 980
Handle count: 492
ID: 4440
Machine name: .
MainModule: System.Diagnostics.ProcessModule (vmware.exe)
Main window handle: 2361046
Main window title: Windows 7 x32 sp1 - VMware Workstation
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 89216
NonpagedSystemMemorySize64: 89216
PagedMemorySize: 70082560
PagedMemorySize64: 70082560
PagedSystemMemorySize: 488896
PagedSystemMemorySize64: 488896
PeakPagedMemorySize: 95432704
PeakPagedMemorySize64: 95432704
PeakVirtualMemorySize: 328577024
PeakVirtualMemorySize64: 328577024
PeakWorkingSet: 120016896
PeakWorkingSet64: 120016896
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 70082560
PrivateMemorySize64: 70082560
PrivilegedProcessorTime: 00:00:02.4960160
ProcessName: vmware
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:12.1524779
UserProcessorTime: 00:00:09.6564619
VirtualMemorySize: 300347392
VirtualMemorySize64: 300347392

------------------------------------------------------------------
nr. : 59

Process: Service_KMS
Base priority: 8
Enable rising events: False
Handle: 984
Handle count: 172
ID: 2016
Machine name: .
------------------------------------------------------------------
nr. : 60

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 988
Handle count: 458
ID: 5008
Machine name: .
------------------------------------------------------------------
nr. : 61

Process: vmware-hostd
Base priority: 8
Enable rising events: False
Handle: 992
Handle count: 334
ID: 3980
Machine name: .
MainModule: System.Diagnostics.ProcessModule (vmware-hostd.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 43336
NonpagedSystemMemorySize64: 43336
PagedMemorySize: 34701312
PagedMemorySize64: 34701312
PagedSystemMemorySize: 233256
PagedSystemMemorySize64: 233256
PeakPagedMemorySize: 34873344
PeakPagedMemorySize64: 34873344
PeakVirtualMemorySize: 177922048
PeakVirtualMemorySize64: 177922048
PeakWorkingSet: 47943680
PeakWorkingSet64: 47943680
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 34701312
PrivateMemorySize64: 34701312
PrivilegedProcessorTime: 00:00:00.2964019
ProcessName: vmware-hostd
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:02.5584164
UserProcessorTime: 00:00:02.2620145
VirtualMemorySize: 173989888
VirtualMemorySize64: 173989888

------------------------------------------------------------------
nr. : 62

Process: raid_tool
Base priority: 8
Enable rising events: False
Handle: 996
Handle count: 134
ID: 3092
Machine name: .
MainModule: System.Diagnostics.ProcessModule (raid_tool.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 14176
NonpagedSystemMemorySize64: 14176
PagedMemorySize: 3223552
PagedMemorySize64: 3223552
PagedSystemMemorySize: 178472
PagedSystemMemorySize64: 178472
PeakPagedMemorySize: 3448832
PeakPagedMemorySize64: 3448832
PeakVirtualMemorySize: 109805568
PeakVirtualMemorySize64: 109805568
PeakWorkingSet: 10391552
PeakWorkingSet64: 10391552
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 3223552
PrivateMemorySize64: 3223552
PrivilegedProcessorTime: 00:00:00.1248008
ProcessName: raid_tool
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.1716011
UserProcessorTime: 00:00:00.0468003
VirtualMemorySize: 100126720
VirtualMemorySize64: 100126720

------------------------------------------------------------------
nr. : 63

Process: SearchIndexer
Base priority: 8
Enable rising events: False
Handle: 1000
Handle count: 618
ID: 3924
Machine name: .
------------------------------------------------------------------
nr. : 64

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 1004
Handle count: 378
ID: 788
Machine name: .
------------------------------------------------------------------
nr. : 65

Process: NBService
Base priority: 8
Enable rising events: False
Handle: 1008
Handle count: 117
ID: 1596
Machine name: .
MainModule: System.Diagnostics.ProcessModule (NBService.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 12016
NonpagedSystemMemorySize64: 12016
PagedMemorySize: 3117056
PagedMemorySize64: 3117056
PagedSystemMemorySize: 104400
PagedSystemMemorySize64: 104400
PeakPagedMemorySize: 3338240
PeakPagedMemorySize64: 3338240
PeakVirtualMemorySize: 65392640
PeakVirtualMemorySize64: 65392640
PeakWorkingSet: 8372224
PeakWorkingSet64: 8372224
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 3117056
PrivateMemorySize64: 3117056
PrivilegedProcessorTime: 00:00:00.0312002
ProcessName: NBService
ProcessorAffinity: 15
Responding: True
SessionId: 0
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.1092007
UserProcessorTime: 00:00:00.0780005
VirtualMemorySize: 60149760
VirtualMemorySize64: 60149760

------------------------------------------------------------------
nr. : 66

Process: lsm
Base priority: 8
Enable rising events: False
Handle: 1012
Handle count: 247
ID: 608
Machine name: .
------------------------------------------------------------------
nr. : 67

Process: DTLite
Base priority: 8
Enable rising events: False
Handle: 1016
Handle count: 149
ID: 2380
Machine name: .
MainModule: System.Diagnostics.ProcessModule (DTLite.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 14176
NonpagedSystemMemorySize64: 14176
PagedMemorySize: 3256320
PagedMemorySize64: 3256320
PagedSystemMemorySize: 171352
PagedSystemMemorySize64: 171352
PeakPagedMemorySize: 3424256
PeakPagedMemorySize64: 3424256
PeakVirtualMemorySize: 100806656
PeakVirtualMemorySize64: 100806656
PeakWorkingSet: 14389248
PeakWorkingSet64: 14389248
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 3256320
PrivateMemorySize64: 3256320
PrivilegedProcessorTime: 00:00:00.3432022
ProcessName: DTLite
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.7020045
UserProcessorTime: 00:00:00.3588023
VirtualMemorySize: 95608832
VirtualMemorySize64: 95608832

------------------------------------------------------------------
nr. : 68

Process: InputPersonalization
Base priority: 6
Enable rising events: False
Handle: 1020
Handle count: 141
ID: 3360
Machine name: .
------------------------------------------------------------------
nr. : 69

Process: lsass
Base priority: 9
Enable rising events: False
Handle: 1028
Handle count: 872
ID: 600
Machine name: .
------------------------------------------------------------------
nr. : 70

Process: TabTip32
Base priority: 8
Enable rising events: False
Handle: 1032
Handle count: 32
ID: 1976
Machine name: .
MainModule: System.Diagnostics.ProcessModule (TabTip32.exe)
Main window handle: 0
Main window title:
Max working set: 1413120
Min working set: 204800
NonpagedSystemMemorySize: 5640
NonpagedSystemMemorySize64: 5640
PagedMemorySize: 835584
PagedMemorySize64: 835584
PagedSystemMemorySize: 83760
PagedSystemMemorySize64: 83760
PeakPagedMemorySize: 835584
PeakPagedMemorySize64: 835584
PeakVirtualMemorySize: 43405312
PeakVirtualMemorySize64: 43405312
PeakWorkingSet: 2985984
PeakWorkingSet64: 2985984
PriorityBoostEnabled: True
PriorityClass: Normal
PrivateMemorySize: 835584
PrivateMemorySize64: 835584
PrivilegedProcessorTime: 00:00:00
ProcessName: TabTip32
ProcessorAffinity: 15
Responding: True
SessionId: 1
Site:
StartInfo: System.Diagnostics.ProcessStartInfo
TotalProcessorTime: 00:00:00.0156001
UserProcessorTime: 00:00:00.0156001
VirtualMemorySize: 43405312
VirtualMemorySize64: 43405312

------------------------------------------------------------------
nr. : 71

Process: services
Base priority: 9
Enable rising events: False
Handle: 1036
Handle count: 253
ID: 576
Machine name: .
------------------------------------------------------------------
nr. : 72

Process: System
Base priority: 8
Enable rising events: False
------------------------------------------------------------------
nr. : 73

Process: svchost
Base priority: 8
Enable rising events: False
Handle: 1040
Handle count: 683
ID: 348
Machine name: .
------------------------------------------------------------------
nr. : 74

Process: audiodg
Base priority: 8
Enable rising events: False
------------------------------------------------------------------
nr. : 75

Process: Idle
Base priority: 0
Enable rising events: False


Nahlásit jako SPAM
IP: 2a00:1028:83be:235a:e4c9:...–
JerryM0
Věrný člen
24. 8. 2017   #12
-
0
-
Nahlásit jako SPAM
IP: 2a00:1028:83be:235a:e4c9:...–
JerryM0
Věrný člen
24. 8. 2017   #13
-
0
-

seznam služeb jde taky před PowerShell ale ten využívá rozhraní WMI

https://superuser.com/questions/144960/how-do-i-extract-a-list-of-windows-services-and-their-status-to-a-text-file


Nahlásit jako SPAM
IP: 2a00:1028:83be:235a:e4c9:...–
24. 8. 2017   #14
-
0
-

Získání jména procesu je k ničemu, vrací jméno exe bez přípony.

Při gůglení jsem narazil na obdobný dotaz, bohužel neměl odpověď jak na to. Jinde jsem pak narazil na "fintu" s parametrem. Ale i ten parametr se vkládal ručně po instalaci služby buď prostřednictvím okna Vlastnosti (klik pravým tlačítkem na službu v okně Služby) nebo úpravou hodnoty ImagePath v registru.

Ještě mne napadlo hledat klíč podle ImagePath. Znamená to prohledání velkého počtu klíčů. Navíc to bude fungovat jen v případě jedné instance služby. Pokud bude instalováno více instancí (což sice nepředpokládám, ale vyloučeno to nijak není), tento způsob selže.

Docela by mne zajímalo, co obsahuje SavedState při obsluze událostí BeforeInstall, AfterInstall. Jestli páry klíč - hodnota, které se zapisují do registru při instalaci, bylo by možné při instalaci vzít hodnotu "Display Name" a přidat ji jako parametr do ImagePath. Pak by služba na základě parametru věděla, kde přečíst nastavení. (zatím jen úvaha)

hu

Nahlásit jako SPAM
IP: 195.178.67.–
Řešení
gna
~ Anonymní uživatel
1875 příspěvků
24. 8. 2017   #15
-
0
-
Vyřešeno Nejlepší odpověď

Jaké jméno procesu? Najdi svůj proces v seznamu služeb.

string name = new ManagementObjectSearcher("SELECT * FROM Win32_Service where ProcessId = " + Process.GetCurrentProcess().Id).Get().Cast<ManagementObject>().First()["Name"].ToString();
Nahlásit jako SPAM
IP: 213.211.51.–
gna
~ Anonymní uživatel
1875 příspěvků
25. 8. 2017   #16
-
0
-

Přidat parametry můžeš, hodnota pro ImagePath je v Context.Parameters["assemblyPath"]. Ale nedával bych tam DisplayName, ale ServiceName.

Nahlásit jako SPAM
IP: 213.211.51.–
28. 8. 2017   #17
-
0
-

#15 gna
Třída proces má property Name. Ta obsahuje, co jsem napsal.

Vypadá to, že tvůj kód vrací jméno služby. Zkoušel jsem to jen letmo.

Edit: vypadá to, že je to "to pravý vořechový"

hu

Nahlásit jako SPAM
IP: 195.178.67.–
Zjistit počet nových příspěvků

Přidej příspěvek

Toto téma je starší jak čtvrt roku – přidej svůj příspěvek jen tehdy, máš-li k tématu opravdu co říct!

Ano, opravdu chci reagovat → zobrazí formulář pro přidání příspěvku

×Vložení zdrojáku

×Vložení obrázku

Vložit URL obrázku Vybrat obrázek na disku
Vlož URL adresu obrázku:
Klikni a vyber obrázek z počítače:

×Vložení videa

Aktuálně jsou podporována videa ze serverů YouTube, Vimeo a Dailymotion.
×
 
Podporujeme Gravatara.
Zadej URL adresu Avatara (40 x 40 px) nebo emailovou adresu pro použití Gravatara.
Email nikam neukládáme, po získání Gravatara je zahozen.
-
Pravidla pro psaní příspěvků, používej diakritiku. ENTER pro nový odstavec, SHIFT + ENTER pro nový řádek.
Sledovat nové příspěvky (pouze pro přihlášené)
Sleduj vlákno a v případě přidání nového příspěvku o tom budeš vědět mezi prvními.
Reaguješ na příspěvek:

Uživatelé prohlížející si toto vlákno

Uživatelé on-line: 0 registrovaných, 6 hostů

 

Hostujeme u Českého hostingu       ISSN 1801-1586       ⇡ Nahoru Webtea.cz logo © 20032024 Programujte.com
Zasadilo a pěstuje Webtea.cz, šéfredaktor Lukáš Churý