Verzeichnis aus Windows-PATH entfernen

Antworten
holgerv
Beiträge: 288
Registriert: 20 Aug 2012, 09:35

Verzeichnis aus Windows-PATH entfernen

Beitrag von holgerv »

Hallo,

man kann mit opsi-Bordmitteln relativ leicht der Windows-Umgebungsvariablen "Path" ein weiteres Verzeichnis hinzufügen (http://download.uib.de/opsi4.0/doc/html ... y-commands).

Aber wie kann man bei der Deinstallation dieses Verzeichnis wieder entfernen?

Ich habe versucht, die einzelnen Einträge von "Path" in einer Stringliste abzulegen, aus dieser Stringliste den neuen Wert für "Path" zusammenzusetzen und dann in die Registry zu schreiben:

Code: Alles auswählen

[Actions]
setloglevel=7

DefVar $dir_to_remove$
DefVar $path$
DefVar $path_before$

DefStringList $dirs_in_path$

set $dir_to_remove$="C:\Test"

set $path$ = GetRegistryStringValue("[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] Path")
set $path_before$ = $path$
set $dirs_in_path$ = splitString($path$, ";")

set $path$ = ""
for %s% in $dirs_in_path$ do sub_handle_one_dir
registry_write_path
comment "old Path: >" + $path_before$ + "<"
comment "new Path: >" + $path$ + "<"

; only reboot if "Path" was changed
if not (lower($path$) = lower($path_before$))
	ExitWindows /Reboot
endif

[sub_handle_one_dir]
if not (lower("%s%") = lower($dir_to_remove$))
	if ($path$ = "")
		set $path$ = "%s%"
	else
		set $path$ = $path$ + ";" + "%s%"
	endif
endif

[registry_write_path]
openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
set "Path"=REG_EXPAND_SZ:"$path$"
Path sieht vorher so aus:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Test;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

Nachdem ich mein Skript habe laufen lassen, sieht "Path" so aus:
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;

"C:\Test" wurde korrekt entfernt, aber:
Jedes "%SystemRoot%" wurde vom opsi-Winst ersetzt durch "C:\Windows". Das will ich vermeiden. Wie kann ich das tun?

Oder gibt es vielleicht sowieso eine viel einfachere Möglichkeit, nicht mehr benötigte Verzeichnisse aus "Path" zu entfernen?

Vielen Dank!


Holger

P. S.: Hier noch das zugehörige Log:

Code: Alles auswählen

[5] [Apr 10 12:01:24:545] --
[5] [Apr 10 12:01:24:546] --
[1] [Apr 10 12:01:24:547] opsi-winst 4.11.3.6 started at 10.04.2013 10:48:37
[1] [Apr 10 12:01:24:549] 
[1] [Apr 10 12:01:24:550] ============ Version 4.11.3.6 WIN32 script "C:\Users\[...]\Desktop\opsi-python27\CLIENT_DATA\reduce_path.ins"
[1] [Apr 10 12:01:24:552]              start: 2013-04-10  12:01:24 
[1] [Apr 10 12:01:24:553]              on client named    "[...]"
[1] [Apr 10 12:01:24:555]              loggedin user    "[...]"
[1] [Apr 10 12:01:24:557]              winst running as    "[...]"
[1] [Apr 10 12:01:24:558]              winst running with admin privileges
[1] [Apr 10 12:01:24:559]              winst running in standard script mode
[1] [Apr 10 12:01:24:559] executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"
[1] [Apr 10 12:01:24:560] system infos:
[1] [Apr 10 12:01:24:561] [...]  -  PC hardware address
[1] [Apr 10 12:01:24:562] [...].[...].DE  -  IP name 
[1] [Apr 10 12:01:24:563] [...]  -  IP address
[1] [Apr 10 12:01:24:564] DEU  -  System default locale 
[1] [Apr 10 12:01:24:565] MS Windowds 6.1 64 Bit
[1] [Apr 10 12:01:24:566] 
[6] [Apr 10 12:01:24:567] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion]  opened
[6] [Apr 10 12:01:24:568] Key closed
[1] [Apr 10 12:01:24:624] LogLevel was 6
[1] [Apr 10 12:01:24:625] LogLevel set to 7
[7] [Apr 10 12:01:24:626] 
[7] [Apr 10 12:01:24:627] (created string list $dirs_in_path$)
[5] [Apr 10 12:01:24:627] 
[5] [Apr 10 12:01:24:628] Set  $dir_to_remove$="C:\Test"
[6] [Apr 10 12:01:24:629]   The value of the variable "$dir_to_remove$" is now: "C:\Test"
[5] [Apr 10 12:01:24:631] 
[5] [Apr 10 12:01:24:633] Set  $path$ = GetRegistryStringValue("[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] Path")
[7] [Apr 10 12:01:24:636] Registry started with redirection (32 Bit)
[6] [Apr 10 12:01:24:637]   Registry key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]  opened
[6] [Apr 10 12:01:24:639]   Key closed
[6] [Apr 10 12:01:24:641]   The value of the variable "$path$" is now: "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Test;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\"
[5] [Apr 10 12:01:24:644] 
[5] [Apr 10 12:01:24:646] Set  $path_before$ = $path$
[6] [Apr 10 12:01:24:648]   The value of the variable "$path_before$" is now: "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Test;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\"
[5] [Apr 10 12:01:24:650] 
[5] [Apr 10 12:01:24:653] Set  $dirs_in_path$ = splitString($path$, ";")
[6] [Apr 10 12:01:24:655]     retrieving strings from splitString [switch to loglevel 7 for debugging]
[7] [Apr 10 12:01:24:657]         (string   0)%SystemRoot%\system32
[7] [Apr 10 12:01:24:659]         (string   1)%SystemRoot%
[7] [Apr 10 12:01:24:661]         (string   2)%SystemRoot%\System32\Wbem
[7] [Apr 10 12:01:24:663]         (string   3)C:\Test
[7] [Apr 10 12:01:24:665]         (string   4)%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
[7] [Apr 10 12:01:24:667]         
[5] [Apr 10 12:01:24:669] 
[5] [Apr 10 12:01:24:671] Set  $path$ = ""
[6] [Apr 10 12:01:24:673]   The value of the variable "$path$" is now: ""
[6] [Apr 10 12:01:24:675]     retrieving strings from $dirs_in_path$ [switch to loglevel 7 for debugging]
[7] [Apr 10 12:01:24:677]         (string   0)%SystemRoot%\system32
[7] [Apr 10 12:01:24:679]         (string   1)%SystemRoot%
[7] [Apr 10 12:01:24:681]         (string   2)%SystemRoot%\System32\Wbem
[7] [Apr 10 12:01:24:683]         (string   3)C:\Test
[7] [Apr 10 12:01:24:685]         (string   4)%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
[7] [Apr 10 12:01:24:687]         
[6] [Apr 10 12:01:24:689] 
[6] [Apr 10 12:01:24:690] ~~~~~~ Looping through:  '%SystemRoot%\system32', '%SystemRoot%', '%SystemRoot%\System32\Wbem', 'C:\Test', '%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
[6] [Apr 10 12:01:24:692]   
[6] [Apr 10 12:01:24:694]   ~~~~~~~ Start Sub ~~~~~~~  sub_handle_one_dir
[5] [Apr 10 12:01:24:696]   
[5] [Apr 10 12:01:24:698]   If
[5] [Apr 10 12:01:24:700]   lower("C:\Windows\system32") = lower($dir_to_remove$)   <<< result false
[5] [Apr 10 12:01:24:702]   not (lower("C:\Windows\system32") = lower($dir_to_remove$))   <<< result true
[5] [Apr 10 12:01:24:704] Then
[5] [Apr 10 12:01:24:706]   
[5] [Apr 10 12:01:24:708]   If
[5] [Apr 10 12:01:24:710]     $path$ = ""   <<< result true
[5] [Apr 10 12:01:24:712]     ($path$ = "")   <<< result true
[5] [Apr 10 12:01:24:714]   Then
[5] [Apr 10 12:01:24:716]     
[5] [Apr 10 12:01:24:718]     Set  $path$ = "C:\Windows\system32"
[6] [Apr 10 12:01:24:720]       The value of the variable "$path$" is now: "C:\Windows\system32"
[5] [Apr 10 12:01:24:722]   
[5] [Apr 10 12:01:24:724]   Else
[5] [Apr 10 12:01:24:726]   EndIf
[5] [Apr 10 12:01:24:728] EndIf
[6] [Apr 10 12:01:24:730]   
[6] [Apr 10 12:01:24:731]   ~~~~~~~ End Sub   ~~~~~~~  sub_handle_one_dir
[6] [Apr 10 12:01:24:733]   
[6] [Apr 10 12:01:24:735]   
[6] [Apr 10 12:01:24:737]   ~~~~~~~ Start Sub ~~~~~~~  sub_handle_one_dir
[5] [Apr 10 12:01:24:739]   
[5] [Apr 10 12:01:24:741]   If
[5] [Apr 10 12:01:24:743]   lower("C:\Windows") = lower($dir_to_remove$)   <<< result false
[5] [Apr 10 12:01:24:745]   not (lower("C:\Windows") = lower($dir_to_remove$))   <<< result true
[5] [Apr 10 12:01:24:746] Then
[5] [Apr 10 12:01:24:748]   
[5] [Apr 10 12:01:24:750]   If
[5] [Apr 10 12:01:24:753]     $path$ = ""   <<< result false
[5] [Apr 10 12:01:24:754]     ($path$ = "")   <<< result false
[5] [Apr 10 12:01:24:756]   Then
[5] [Apr 10 12:01:24:758]   
[5] [Apr 10 12:01:24:759]   Else
[5] [Apr 10 12:01:24:761]     
[5] [Apr 10 12:01:24:763]     Set  $path$ = $path$ + ";" + "C:\Windows"
[6] [Apr 10 12:01:24:765]       The value of the variable "$path$" is now: "C:\Windows\system32;C:\Windows"
[5] [Apr 10 12:01:24:767]   EndIf
[5] [Apr 10 12:01:24:769] EndIf
[6] [Apr 10 12:01:24:771]   
[6] [Apr 10 12:01:24:772]   ~~~~~~~ End Sub   ~~~~~~~  sub_handle_one_dir
[6] [Apr 10 12:01:24:774]   
[6] [Apr 10 12:01:24:776]   
[6] [Apr 10 12:01:24:777]   ~~~~~~~ Start Sub ~~~~~~~  sub_handle_one_dir
[5] [Apr 10 12:01:24:779]   
[5] [Apr 10 12:01:24:781]   If
[5] [Apr 10 12:01:24:783]   lower("C:\Windows\System32\Wbem") = lower($dir_to_remove$)   <<< result false
[5] [Apr 10 12:01:24:784]   not (lower("C:\Windows\System32\Wbem") = lower($dir_to_remove$))   <<< result true
[5] [Apr 10 12:01:24:786] Then
[5] [Apr 10 12:01:24:788]   
[5] [Apr 10 12:01:24:790]   If
[5] [Apr 10 12:01:24:792]     $path$ = ""   <<< result false
[5] [Apr 10 12:01:24:793]     ($path$ = "")   <<< result false
[5] [Apr 10 12:01:24:795]   Then
[5] [Apr 10 12:01:24:797]   
[5] [Apr 10 12:01:24:798]   Else
[5] [Apr 10 12:01:24:800]     
[5] [Apr 10 12:01:24:802]     Set  $path$ = $path$ + ";" + "C:\Windows\System32\Wbem"
[6] [Apr 10 12:01:24:804]       The value of the variable "$path$" is now: "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
[5] [Apr 10 12:01:24:806]   EndIf
[5] [Apr 10 12:01:24:808] EndIf
[6] [Apr 10 12:01:24:810]   
[6] [Apr 10 12:01:24:811]   ~~~~~~~ End Sub   ~~~~~~~  sub_handle_one_dir
[6] [Apr 10 12:01:24:813]   
[6] [Apr 10 12:01:24:815]   
[6] [Apr 10 12:01:24:817]   ~~~~~~~ Start Sub ~~~~~~~  sub_handle_one_dir
[5] [Apr 10 12:01:24:819]   
[5] [Apr 10 12:01:24:820]   If
[5] [Apr 10 12:01:24:823]   lower("C:\Test") = lower($dir_to_remove$)   <<< result true
[5] [Apr 10 12:01:24:824]   not (lower("C:\Test") = lower($dir_to_remove$))   <<< result false
[5] [Apr 10 12:01:24:826] Then
[5] [Apr 10 12:01:24:828]   
[5] [Apr 10 12:01:24:830]   If
[5] [Apr 10 12:01:24:832]   Then
[5] [Apr 10 12:01:24:834]   
[5] [Apr 10 12:01:24:836]   Else
[5] [Apr 10 12:01:24:838]   EndIf
[5] [Apr 10 12:01:24:840] EndIf
[6] [Apr 10 12:01:24:841]   
[6] [Apr 10 12:01:24:843]   ~~~~~~~ End Sub   ~~~~~~~  sub_handle_one_dir
[6] [Apr 10 12:01:24:845]   
[6] [Apr 10 12:01:24:847]   
[6] [Apr 10 12:01:24:848]   ~~~~~~~ Start Sub ~~~~~~~  sub_handle_one_dir
[5] [Apr 10 12:01:24:850]   
[5] [Apr 10 12:01:24:852]   If
[5] [Apr 10 12:01:24:854]   lower("C:\Windows\System32\WindowsPowerShell\v1.0\") = lower($dir_to_remove$)   <<< result false
[5] [Apr 10 12:01:24:856]   not (lower("C:\Windows\System32\WindowsPowerShell\v1.0\") = lower($dir_to_remove$))   <<< result true
[5] [Apr 10 12:01:24:858] Then
[5] [Apr 10 12:01:24:860]   
[5] [Apr 10 12:01:24:862]   If
[5] [Apr 10 12:01:24:864]     $path$ = ""   <<< result false
[5] [Apr 10 12:01:24:865]     ($path$ = "")   <<< result false
[5] [Apr 10 12:01:24:867]   Then
[5] [Apr 10 12:01:24:869]   
[5] [Apr 10 12:01:24:871]   Else
[5] [Apr 10 12:01:24:873]     
[5] [Apr 10 12:01:24:875]     Set  $path$ = $path$ + ";" + "C:\Windows\System32\WindowsPowerShell\v1.0\"
[6] [Apr 10 12:01:24:877]       The value of the variable "$path$" is now: "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\"
[5] [Apr 10 12:01:24:879]   EndIf
[5] [Apr 10 12:01:24:881] EndIf
[6] [Apr 10 12:01:24:883]   
[6] [Apr 10 12:01:24:885]   ~~~~~~~ End Sub   ~~~~~~~  sub_handle_one_dir
[6] [Apr 10 12:01:24:887]   
[6] [Apr 10 12:01:24:889] 
[6] [Apr 10 12:01:24:890] ~~~~~~ End Loop
[5] [Apr 10 12:01:24:892] 
[5] [Apr 10 12:01:24:894] Execution of registry_write_path
[7] [Apr 10 12:01:24:896]   Registry started with redirection (32 Bit)
[7] [Apr 10 12:01:24:898]   Key is: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
[7] [Apr 10 12:01:24:900]   Key0 is: HKEY_LOCAL_MACHINE
[6] [Apr 10 12:01:24:902]   Registry key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]  opened
[6] [Apr 10 12:01:24:904]           Variable "Path"  had value  "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Test;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\"
[6] [Apr 10 12:01:24:906]           Info:    "Path"  changed to "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\"
[6] [Apr 10 12:01:24:908]           Key closed
[5] [Apr 10 12:01:24:911] comment: old Path: >%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Test;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\<
[5] [Apr 10 12:01:24:913] comment: new Path: >C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\<
[5] [Apr 10 12:01:24:915] 
[5] [Apr 10 12:01:24:917] If
[5] [Apr 10 12:01:24:919]   lower($path$) = lower($path_before$)   <<< result false
[5] [Apr 10 12:01:24:921]   not (lower($path$) = lower($path_before$))   <<< result true
[5] [Apr 10 12:01:24:923] Then
[5] [Apr 10 12:01:24:926]   
[5] [Apr 10 12:01:24:932]   ExitWindows set to Reboot
[5] [Apr 10 12:01:24:934] EndIf
[1] [Apr 10 12:01:24:941] ___________________
[1] [Apr 10 12:01:24:943] script finished
[1] [Apr 10 12:01:24:945] 0 errors
[1] [Apr 10 12:01:24:947] 0 warnings
[1] [Apr 10 12:01:24:949] 
[1] [Apr 10 12:01:24:950] 
[6] [Apr 10 12:01:24:952] Delete "c:\opsi.org\tmp\_winstbat_*"
[6] [Apr 10 12:01:24:955]   Search "c:\opsi.org\tmp\"
Zuletzt geändert von holgerv am 10 Apr 2013, 13:11, insgesamt 1-mal geändert.
mhaegele
Beiträge: 293
Registriert: 18 Aug 2010, 13:55

Re: Verzeichnis aus Windows-PATH entfernen

Beitrag von mhaegele »

holgerv hat geschrieben:Hallo,

man kann mit opsi-Bormitteln relativ leicht der Windows-Umgebungsvariablen "Path" ein weiteres Verzeichnis hinzufügen (http://download.uib.de/opsi4.0/doc/html ... y-commands).

Aber wie kann man bei der Deinstallation dieses Verzeichnis wieder entfernen?

Ich habe versucht, die einzelnen Einträge von "Path" in einer Stringliste abzulegen, aus dieser Stringliste den neuen Wert für "Path" zusammenzusetzen und dann in die Registry zu schreiben:
...
[6] [Apr 10 12:01:24:955] Search "c:\opsi.org\tmp\"[/code]
Ich hatte es afair in ein perl script ausgelagert. Für "Text Operationen" ist imho OPSI nicht unbedingt optimal ...
holgerv
Beiträge: 288
Registriert: 20 Aug 2012, 09:35

Re: VerzeichniAnsatz 1:s aus Windows-PATH entfernen

Beitrag von holgerv »

Hm, ich will aber nicht wirklich überall Perl installieren, nur um bei einer Deinstallation "Path" aufzuräumen. Aber mit winst-Bordmitteln komme ich doch nicht wirklich zum Ziel.

Drei Ansätze habe ich verfolgt, jeweils ausgehend von einer Stringliste, die alle Verzeichnisse enthält, die in "Path" angegeben sind.

Ansatz 1:
Ich iteriere über die Stringliste und setze nach und nach einen String zusammen, der alle weiterhin gewünschten Verzeichnisse enthält.
Problem: Bei der Iteration wird "%SystemRoot%" nach "C:\Windows" aufgelöst. "%SystemRoot%" soll aber "%SystemRoot%" bleiben.
Folgendes kleines Skript demonstriert das Problem, es gibt "comment: C:\Windows" statt "comment: %SystemRoot%" zurück:

Code: Alles auswählen

[Actions]
setloglevel = 7
DefStringList $StringListe$

; String-Liste mit nur einem String "%SystemRoot%" erzeugen:
set $StringListe$ = createStringList ('%' + 'SystemRoot' + '%')

; Fuer jeden String in "$StringListe$" etwas tun:
for %s% in $StringListe$ do Sub_Handle_one_string

[Sub_Handle_one_string]
comment "%s%"
Ansatz 2:
Mit "getListContaining" kann ich eine Stringliste bilden, die alle Strings einer anderen Stringliste enthält, in denen ein bestimmter String vorkommt.
Vielleicht lässt sich auch das Gegenteil abbilden, sozusagen "getListNotContaining", um eine Stringliste zu bilden, die alle Strings einer anderen Stringliste enthält, in denen ein bestimmter String nicht vorkommt.
Sowas habe ich aber leider nicht gefunden.

Ansatz 3:
Ich bilde nach und nach (Iteration) eine neue Stringliste, die per "getSubList(<Startindex>, <Endindex>, <Ausgangsliste>)" die gewünschten Strings übernimmt. Zumindest bei "set $neueStringliste$ = getSubList(:, $alteStringliste$)" werden auch alle "%SystemRoot%" korrekt übernommen. - Aber da opsi-winst keine Integer-Variablen kennt, gibt es auch keinen Zähler, mit dem ich <Startindex> und <Endindex> angeben kann.
Gibt es irgendeinen Trick, mit dem ich doch einen Zähler in opsi-Winst bauen kann?

Vielleicht hat ja jemand doch noch eine Idee, wie sich einzelne Verzeichnisse aus dem Windows-"Path" entfernen lassen, ohne dass man VBScript oder Powershell bemühen muss. (Perl, Python usw. würde ich ungern benutzen, weil ich nicht auf allen Zielsystemen voraussetzen kann, dass sie installiert sind.)

Danke!


Holger
holgerv
Beiträge: 288
Registriert: 20 Aug 2012, 09:35

Lösung: pathman.exe aus den Windows Resource Kit Tools

Beitrag von holgerv »

Hallo,

jetzt habe ich eine - wie ich meine: saubere - Lösung für mein Problem gefunden:
In den Windows Resource Kit Tools von Microsoft findet sich eine pathman.exe, die genau das macht, was ich brauche: Verzeichnisse aus der Umgebungsvariable "Path" entfernen oder hinzufügen. http://www.microsoft.com/en-us/download ... x?id=17657

Mit der Pathman.exe im ScriptPath funktioniert dann folgendes opsi-winst-Skript:

Code: Alles auswählen

[Actions]

DefVar $dir_to_remove_from_path$

set $dir_to_remove_from_path$ = "C:\Test"

DosInAnIcon_Pathman

[DosInAnIcon_Pathman]
"%ScriptPath%\pathman.exe" /rs "$dir_to_remove_from_path$"
Etwas schöner wird es noch, wenn ich überprüfe, ob sich der "Path" tatsächlich geändert hat und dann ggf. einen Reboot veranlasse, damit die Änderung auch wirksam wird:

Code: Alles auswählen

; remove one directory from Windows environment variable "Path"

[Actions]

DefVar $dir_to_remove_from_path$
DefVar $path_before$
DefVar $path_after$

set $dir_to_remove_from_path$ = "C:\Test"

set $path_before$ = GetRegistryStringValue("[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] Path")
DosInAnIcon_Pathman
set $path_after$ = GetRegistryStringValue("[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] Path")

; only reboot if "Path" was changed
if not (lower($path_before$) = lower($path_after$))
   ExitWindows /Reboot
endif

[DosInAnIcon_Pathman]
; pathman.exe from Windows Resource Kit Tools:
; http://www.microsoft.com/en-us/download/details.aspx?id=17657
"%ScriptPath%\pathman.exe" /rs "$dir_to_remove_from_path$"
Gruß


Holger
Antworten