Wiki source code of Registryschlüssel und -werte entfernen
Last modified by Jannis Klein on 2024/08/13 08:28
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{aagon.priorisierung}} | ||
2 | 160 | ||
3 | {{/aagon.priorisierung}} | ||
4 | |||
5 | {{aagon.floatingbox/}} | ||
6 | |||
7 | = Initial situation = | ||
8 | |||
9 | If you want to remove a registry key or value from one of your Clients, you need to find it specifically. This can be difficult if you do not know which Clients the value or key was set on in the past. To avoid this problem, you can create a Client Command that checks whether such a value or key is generally available on the Client that you want to optionally remove. | ||
10 | |||
11 | This use case explains how to check whether a particular registry key or value exists and how to remove it in the Command. Both sections can be used independently. Proceed as follows: | ||
12 | |||
13 | = Remove registry key = | ||
14 | |||
15 | == Select Script == | ||
16 | |||
17 | 1. Navigate to the //Client Commands// > //Create// module. | ||
18 | 1. Click //Add //on the ribbon bar. The Client Command Editor will open and you will need to decide whether it is a Console or Client Script. In this case select Client Script. | ||
19 | |||
20 | == **Adding and customising the //If registry key (not) exists //Command** == | ||
21 | |||
22 | 1. Select the //Condition// > //If registry key (not) exists// Command from the Command List. | ||
23 | 1. Double click to open the Command. | ||
24 | 1. In the //Details// tab, under Commands, select //If key exists//. | ||
25 | 1. Under Registry, ensure that //HKEY_LOCAL_MACHINE// is selected under the root key.{{aagon.infobox}}The root key specifies the folder path where the registry key is located. {{/aagon.infobox}} | ||
26 | 1. Enter the value you want to check under the key. You can either enter this key manually or search for it using the icon on the pages. In this example, the //ACMP Web Interface// is used as the key (\SOFTWARE\WOW6432Node\Aagon\ACMP Web Interfaces). | ||
27 | 1. Click //OK// when you are done. | ||
28 | The first line of the Command appears. | ||
29 | |||
30 | {{figure}} | ||
31 | (% style="text-align:center" %) | ||
32 | [[image:642_Use Case Client Command_Wenn Registryschlüssel (nicht) existiert_538.png]] | ||
33 | |||
34 | {{figureCaption}} | ||
35 | Customised Command //If registry key (not) exists// | ||
36 | {{/figureCaption}} | ||
37 | {{/figure}} | ||
38 | |||
39 | == Select and edit the //Delete registry key or value //Command == | ||
40 | |||
41 | 1. Navigate back to the Command List and double click //Registry// > //Delete registry key or value//. | ||
42 | 1. Select the //Details //tab. | ||
43 | 1. Select //HKEY_LOCAL_MACHINE //under the root key. | ||
44 | 1. Type the value you want to delete under the key. You can either enter this key manually or search for it using the icon on the pages. In this example, the //ACMP Web Interface// is used as the key (\SOFTWARE\WOW6432Node\Aagon\ACMP Web Interfaces). | ||
45 | 1. Activate the //Delete key// combo box under //Actions//. This is the only way to execute the Command correctly, as it removes the entire registry key. | ||
46 | 1. Click //OK// to display the Command in line 2.{{aagon.infobox}}ndent this Command either using the quick selection bar or the shortcut CTRL + -> so that it appears below the first Command (If the registry key (not) exists). When adding this Command, you can also simply drag the Command onto the line of the previous Command so that it is properly integrated.{{/aagon.infobox}} | ||
47 | 1. Save the Client Commands if you do not wish to make any further changes to the content. | ||
48 | |||
49 | {{figure}} | ||
50 | (% style="text-align:center" %) | ||
51 | [[image:642_Use Case Client Command_Registryschlüssel oder Wert löschen_518.png]] | ||
52 | |||
53 | {{figureCaption}} | ||
54 | Custom Command //Delete registry key or value// | ||
55 | {{/figureCaption}} | ||
56 | {{/figure}} | ||
57 | |||
58 | At this point the Client Command is complete and can be used if you wish to delete registry keys. Save the Command and continue with the Client Command phases. | ||
59 | |||
60 | {{figure}} | ||
61 | (% style="text-align:center" %) | ||
62 | [[image:65_Use Case Client Command_Registrykey entfernen_1661.png||alt="642_Use Case Client Command_Registrykey entfernen_1661.png"]] | ||
63 | |||
64 | {{figureCaption}} | ||
65 | Client Command Editor: Identifying and removing registry keys | ||
66 | {{/figureCaption}} | ||
67 | {{/figure}} | ||
68 | |||
69 | == Running through the Client Command phases == | ||
70 | |||
71 | Finally, the Client Command must go through the [[Test>>doc:ACMP.65.ACMP-Solutions.Client Commands.Client Command testen.WebHome]], [[Synchronise>>doc:ACMP.66.ACMP-Solutions.Client Commands.Client Command synchronisieren.WebHome]], [[Release>>doc:ACMP.66.ACMP-Solutions.Client Commands.Client Command freigeben.WebHome]] and [[Execute>>doc:ACMP.66.ACMP-Solutions.Client Commands.Client Command ausführen.WebHome]] phases before it can be used. Only then will it check that the registry key exists on your Clients, so that it can be deleted at the same time. | ||
72 | |||
73 | = Remove registry value = | ||
74 | |||
75 | == Select Script == | ||
76 | |||
77 | 1. Navigate to the //Client Commands// > //Create// module. | ||
78 | 1. Click //Add //on the ribbon bar. The Client Command Editor will open and you will need to decide whether it is a Console or Client Script. In this case select Client Script. | ||
79 | |||
80 | == Adding and customise the Command //If registry value name (not) exists// == | ||
81 | |||
82 | 1. First select the //Condition// > //If registry value name (not) exists// Command from the Command List. | ||
83 | 1. Double click to open the Command. | ||
84 | 1. Select //If value name exists //under the //Details //tab. | ||
85 | 1. Select the //HKEY_LOCAL_MACHINE// root key in the registry, if it is not already selected.{{aagon.infobox}}The root key specifies the folder path where the registry value is to be found. {{/aagon.infobox}} | ||
86 | 1. Enter the key where the value to be deleted is located. In this example, //ACMP// is used (\SOFTWARE\WOW6432Node\Aagon\ACMP). | ||
87 | 1. Enter the name of the value. If you know the name of the value, you can either type it manually or look it up using the icon on the page. In this case it will be //ActiveLevel//. | ||
88 | 1. Click //OK// when finished. | ||
89 | The first line of the Command appears. | ||
90 | |||
91 | {{figure}} | ||
92 | (% style="text-align:center" %) | ||
93 | [[image:642_Use Case Client Command_Wenn Registry Wertename (nicht) exisitiert_484.png]] | ||
94 | |||
95 | {{figureCaption}} | ||
96 | Customised Command //If registry value name (not) exists// | ||
97 | {{/figureCaption}} | ||
98 | {{/figure}} | ||
99 | |||
100 | == Select and edit //Delete registry key or value //Command == | ||
101 | |||
102 | 1. Navigate back to the Command List and double click the //Registry// > //Delete registry key or value// Command.{{aagon.infobox}}Indent this Command either using the quick selection bar or the CTRL + -> shortcut so that it appears below the first Command (If the registry key (not) exists). When adding this Command, you can also simply drag the Command onto the line of the previous Command so that it is properly integrated.{{/aagon.infobox}} | ||
103 | 1. Select the //Details// tab. | ||
104 | 1. Select //HKEY_LOCAL_MACHINE// under the root key, if this has not already been done. | ||
105 | 1. Enter the value you want to delete under the key. The key should be //ACMP// (\SOFTWARE\WOW6432Node\Aagon\ACMP). | ||
106 | 1. Insert the name of the value. Either type it in manually or look it up using the icon on the pages. In this case it will be //ActiveLevel//. | ||
107 | 1. Activate the //Delete Value// combo box under //Actions//. You need to do this to delete the value from the registry. | ||
108 | 1. Click //OK// to display the Command in second row. | ||
109 | 1. Save the Client Commands if you do not want to make any further changes to the content. | ||
110 | |||
111 | {{figure}} | ||
112 | (% style="text-align:center" %) | ||
113 | [[image:642_Use Case Client Command_Registryschlüssel oder Wert löschen (Registrywert löschen)_496.png]] | ||
114 | |||
115 | {{figureCaption}} | ||
116 | Custom Command //Delete registry key or value// | ||
117 | {{/figureCaption}} | ||
118 | {{/figure}} | ||
119 | |||
120 | The two Commands now allow you to check that the relevant registry value exists and also to remove it. Save the Command and proceed to the Client Commands phases. | ||
121 | |||
122 | {{figure}} | ||
123 | (% style="text-align:center" %) | ||
124 | [[image:65_Use Case Client Command_Registrywert entfernen_1661.png||alt="642_Use Case Client Command_Registrywert entfernen_1661.png"]] | ||
125 | |||
126 | {{figureCaption}} | ||
127 | Client Command Editor: Find and remove registry value | ||
128 | {{/figureCaption}} | ||
129 | {{/figure}} | ||
130 | |||
131 | == Running through the Client Command phases == | ||
132 | |||
133 | Finally, the Client Command must go through the [[Test>>doc:ACMP.65.ACMP-Solutions.Client Commands.Client Command testen.WebHome]], [[Synchronise>>doc:ACMP.66.ACMP-Solutions.Client Commands.Client Command synchronisieren.WebHome]], [[Release>>doc:ACMP.66.ACMP-Solutions.Client Commands.Client Command freigeben.WebHome]] and [[Execute>>doc:ACMP.66.ACMP-Solutions.Client Commands.Client Command ausführen.WebHome]] phases before it can be used. Only when the Client Command has been released can it be deployed in Containers or directly to Clients. |