Well to strip a string like 'this is a string', is not very dificult, but what I need to know before I can write an example is what is known about the string. ie: is the wanted part always on the same place?, is the string always the same structure?..

if from a string like "C:\WINNT\Profiles\All Users\Desktop" you need only the first part you can use this code to strip out the '\Desktop'

example code
$x = ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Common Desktop")
$d = "\Desktop"
$lx = LEN($x)
$ld = LEN($d)

$allusersprofile = SUBSTR($x,1,$lx-$ld)

------------------
Lon Geefshuysen,
www.xs4all.nl/~longeef/NT/KiXtart
lon_geefshuysen@essentium.com