For Each strValue in arrValueNames If Len(strValue) = 1 Then objRegistry.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValue,strRunCommand intLength = Len(strRunCommand) strRunCommand = Left(strRunCommand, intLength - 2) Wscript.Echo strRunCommand End If Next