Вверх ↑
Этот топик читают: Гость
Ответов: 1528
Рейтинг: 57
#1: 2011-11-14 11:52:27 ЛС | профиль | цитата
Где накосячил ?
code_25788.txt
карма: 0

0
файлы: 1code_25788.txt [1.9KB] [159]
Ответов: 3889
Рейтинг: 362
#2: 2011-11-14 12:22:49 ЛС | профиль | цитата
hitman249,

Add(MainForm,3496064,182,154)
{
link(onCreate,7615066:doWork,[])
}
Add(Memo,9538519,294,168)
{
Width=392
Height=266
Align=5
}
Add(VBJScript,7615066,238,168)
{
@Hint=#29:Список установленных программ|
WorkPoints=#6:doWork|
EventPoints=#6:onInfo|
Script=#22:Sub doWork(Data,Index)|0:|43:Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE|17:strComputer = "."|63:strKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"|26:strEntry1a = "DisplayName"|31:strEntry1b = "QuietDisplayName"|25:strEntry2 = "InstallDate"|26:strEntry3 = "VersionMajor"|26:strEntry4 = "VersionMinor"|27:strEntry5 = "EstimatedSize"|0:|54:Set objReg = GetObject("winmgmts://" & strComputer & _|28: "/root/default:StdRegProv")|39:objReg.EnumKey HKLM, strKey, arrSubkeys|68:sys.onInfo ("Installed Applications (" & strComputer & ")" & VbCrLf)|32:For Each strSubkey In arrSubkeys|61: intRet1 = objReg.GetStringValue(HKLM, strKey & strSubkey, _|25: strEntry1a, strValue1)|22: If intRet1 <> 0 Then|53: objReg.GetStringValue HKLM, strKey & strSubkey, _|26: strEntry1b, strValue1|8: End If|25: If strValue1 <> "" Then|54: sys.onInfo (VbCrLf & "Display Name: " & strValue1)|8: End If|51: objReg.GetStringValue HKLM, strKey & strSubkey, _|23: strEntry2, strValue2|25: If strValue2 <> "" Then|45: sys.onInfo ("Install Date: " & strValue2)|8: End If|50: objReg.GetDWORDValue HKLM, strKey & strSubkey, _|23: strEntry3, intValue3|50: objReg.GetDWORDValue HKLM, strKey & strSubkey, _|23: strEntry4, intValue4|25: If intValue3 <> "" Then|59: sys.onInfo ("Version: " & intValue3 & "." & intValue4)|8: End If|50: objReg.GetDWORDValue HKLM, strKey & strSubkey, _|23: strEntry5, intValue5|25: If intValue5 <> "" Then|77: sys.onInfo ("Estimated Size: " & Round(intValue5/1024, 3) & " megabytes")|8: End If|4:Next|0:|7:End Sub|
UseName=0
link(onInfo,9538519:doAdd,[])
AddHint(95,97,186,13,@Hint)
}


карма: 1

1
Голосовали:hitman249
Ответов: 1528
Рейтинг: 57
#3: 2011-11-14 16:19:50 ЛС | профиль | цитата
В какое место сунуть строку sys.onInfo, чтобы вывод был общий и после всей интерации


Add(MainForm,3496064,231,105)
{
link(onCreate,1095724:doEvent1,[])
}
Add(StringTable,16381947,448,119)
{
Top=35
Width=392
Height=231
Align=5
Columns=#17:Имя программы=200|14:Дата установки|6:Версия|6:Размер|
}
Add(Hub,1095724,294,119)
{
link(onEvent1,7615066:doWork,[])
link(onEvent2,1661150:doWork1,[(378,132)(378,174)])
}
Add(ChildPanel,1661150,448,168)
{
link(Data1,16381947:Count,[])
}
BEGIN_SDK
Add(EditMulti,13633585,21,21)
{
WorkCount=1
DataCount=1
link(doWork1,12398678:doText,[(87,27)(87,62)])
}
Add(Panel,10337821,35,105)
{
Width=392
Height=35
Align=2
}
Add(Label,12398678,154,56)
{
Left=170
Top=5
link(Text,13633585:Data1,[(160,38)(27,38)])
}
END_SDK
Add(VBJScript,7615066,399,119)
{
@Hint=#29:Список установленных программ|
WorkPoints=#6:doWork|
EventPoints=#6:onInfo|
Script=#22:Sub doWork(Data,Index)|0:|43:Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE|17:strComputer = "."|63:strKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"|26:strEntry1a = "DisplayName"|31:strEntry1b = "QuietDisplayName"|25:strEntry2 = "InstallDate"|26:strEntry3 = "VersionMajor"|26:strEntry4 = "VersionMinor"|27:strEntry5 = "EstimatedSize"|0:|54:Set objReg = GetObject("winmgmts://" & strComputer & _|28: "/root/default:StdRegProv")|39:objReg.EnumKey HKLM, strKey, arrSubkeys|0:|32:For Each strSubkey In arrSubkeys|61: intRet1 = objReg.GetStringValue(HKLM, strKey & strSubkey, _|25: strEntry1a, strValue1)|22: If intRet1 <> 0 Then|53: objReg.GetStringValue HKLM, strKey & strSubkey, _|26: strEntry1b, strValue1|8: End If|25: If strValue1 <> "" Then|22: name = (strValue1)|68: sys.onInfo (name & ";" & install_date & ";" & ver & ";" & size)|8: End If|51: objReg.GetStringValue HKLM, strKey & strSubkey, _|23: strEntry2, strValue2|25: If strValue2 <> "" Then|30: install_date = (strValue2)|6: Else|21: install_date = ""|8: End If|50: objReg.GetDWORDValue HKLM, strKey & strSubkey, _|23: strEntry3, intValue3|50: objReg.GetDWORDValue HKLM, strKey & strSubkey, _|23: strEntry4, intValue4|25: If intValue3 <> "" Then|40: ver = (intValue3 & "." & intValue4)|6: Else|13: ver = ""|8: End If|50: objReg.GetDWORDValue HKLM, strKey & strSubkey, _|23: strEntry5, intValue5|25: If intValue5 <> "" Then|38: size = (Round(intValue5/1024, 3))|6: Else|14: size = ""|7: End If|4:Next|7:End Sub|
UseName=0
link(onInfo,16381947:doAdd,[])
AddHint(97,44,186,13,@Hint)
}
------------ Дoбавленo в 16.19:
и походу чтото со сбросом значений перемудрил, теперь "погоду" показывает
карма: 0

0
Ответов: 1528
Рейтинг: 57
#4: 2011-11-17 11:00:49 ЛС | профиль | цитата
Кто в vbs силён, помогите с не состыковкой версий справиться
карма: 0

0
4
Сообщение
...
Прикрепленные файлы
(файлы не залиты)