Forum | | | | Gary12345 |
cls
declare IEStartPage$, IESecurityRiskPage$, IEExtensionsOffPage$, IELocalPage$, IEStartPage2$
declare IESearchPage$, IEDefault_Secondary_Page_URL$, IEProxyEnable$, IEProxyOverride$
declare IEProxyServer$, IEAutoConfigURL$, Driveletter$, IEVers$, Skype$, FireFox$, FlashPlayer$, Opera$, OperaVersion$, Chrome$, ChromeVersion$
declare Textdatei$
Driveletter$ = GetEnv$("SYSTEMDRIVE")
set("decimals", 2)
Set("Errorlevel", -1)
IEStartPage$ = ReadIni$("HKEY_1", "Software\Microsoft\Internet Explorer\Main", "Start Page")
IESecurityRiskPage$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Security Risk Page")
IEExtensionsOffPage$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Extensions Off Page")
IELocalPage$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Local Page")
IEStartPage2$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Start Page")
IESearchPage$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Search Page")
IEDefault_Secondary_Page_URL$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Default_Secondary_Page_URL")
IEProxyEnable$ = ReadIni$("HKEY_1", "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable")
IEProxyOverride$ = ReadIni$("HKEY_1", "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyOverride")
IEProxyServer$ = ReadIni$("HKEY_1", "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer")
IEAutoConfigURL$ = ReadIni$("HKEY_1", "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", "AutoConfigURL")
IEVers$ = ReadINI$("HKEY_2","SOFTWARE\Microsoft\Internet Explorer","Version")
Skype$ = ReadINI$("HKEY_1","Software\Skype\Phone\UI","StatsSentVersion")
FireFox$ = ReadINI$("HKEY_2","Software\Mozilla\Mozilla Firefox", "CurrentVersion")
FlashPlayer$ = ReadIni$("HKEY_2","SOFTWARE\Macromedia\FlashPlayer","CurrentVersion")
Opera$ = ReadINI$("HKEY_1","Software\Opera Software","Last Install Path") + "opera.exe"
OperaVersion$ = Resource.HoleResourceInfo(Opera$, "ProductVersion")
Chrome$ = ReadIni$("HKEY_1","SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome","InstallLocation") + "\Chrome.exe"
ChromeVersion$ = Resource.HoleResourceInfo(Chrome$, "ProductVersion")
Set("Errorlevel", 0)
Textdatei$ = "files.txt"
Struct MEMORYSTATUSEX = \
dwLength&,\
dwMemoryLoad&,\
ullTotalPhysLow&,\
ullTotalPhysHi&,\
ullAvailPhysLow&,\
ullAvailPhysHi&,\
ullTotalPageFileLow&,\
ullTotalPageFileHi&,\
ullAvailPageFileLow&,\
ullAvailPageFileHi&,\
ullTotalVirtualLow&,\
ullTotalVirtualHi&,\
ullAvailVirtualLow&,\
ullAvailVirtualHi&,\
ullAvailExtendedVirtualLow&,\
ullAvailExtendedVirtualHi&
Var Memory# = New(MEMORYSTATUSEX)
Memory#.dwLength& = SizeOf(Memory#)
External("Kernel32.dll","GlobalMemoryStatusEx",Memory#)
Var TotalMem! = 0
Var AvailMem! = 0
Var PagefileMem! = 0
Var APagefileMem! = 0
cls
Totalmem! = Memory#.ullTotalPhysLow&
case Memory#.ullTotalPhysLow& < 0: TotalMem! = Memory#.ullTotalPhysLow& + (2^32)
TotalMem! = (Memory#.ullTotalPhysHi& * (2^32)) + TotalMem!
Availmem! = Memory#.ullAvailPhysLow&
case Memory#.ullAvailPhysLow& < 0: AvailMem! = Memory#.ullAvailPhysLow& + (2^32)
AvailMem! = (Memory#.ullAvailPhysHi& * (2^32)) + AvailMem!
PagefileMem! = Memory#.ullTotalPageFileLow&
case Memory#.ullTotalPageFileLow& < 0: PageFileMem! = Memory#.ullTotalPageFileLow& + (2^32)
PageFileMem! = (Memory#.ullTotalPageFileHi& * (2^32)) + PageFileMem!
APagefileMem! = Memory#.ullAvailPageFileLow&
case Memory#.ullAvailPageFileLow& < 0: APageFileMem! = Memory#.ullAvailPageFileLow& + (2^32)
APageFileMem! = (Memory#.ullAvailPageFileHi& * (2^32)) + APageFileMem!
Assign #1,Textdatei$
Rewrite #1
print #1, "DiskSize => " + str$(Round(DiskSize(Driveletter$)/1024/1024/1024, 2)) + "GB"
Print #1, Format$("#####.00 MB TotalMemory",(TotalMem!) / 1024^2)
Print #1, Format$("#####.00 MB currently available memory",(AvailMem!) / 1024^2)
Print #1, Format$("#####.00 MB used memory",(TotalMem!-AvailMem!) / 1024^2)
Print #1, Format$("#####.00 MB Pagefile total",PageFileMem! / 1024^2)
Print #1, Format$("#####.00 MB Pagefile free",APageFileMem! / 1024^2)
Print #1, Format$("#####.00 MB Pagefile used",(PageFileMem!-APageFileMem!) / 1024^2)
Print #1, Format$("##### % used memory",(Memory#.dwMemoryLoad&))
print #1, ""
print #1, "=======================IE SETTINGS======================="
print #1, ""
print #1, "IE - [HKCU\Software\Microsoft\Internet Explorer\Main, StartPage] = "+ IEStartPage$
print #1, "IE - [HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings, ProxyEnable] = " + IEProxyEnable$
print #1, "IE - [HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings, ProxyOverride] = " + IEProxyOverride$
print #1, "IE - [HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings, ProxyServer] = " + IEProxyServer$
print #1, "IE - [HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings, AutoConfigURL] = " + IEAutoConfigURL$
print #1, "IE - [HKLM\Software\Microsoft\Internet Explorer\Main, Security Risk Page] = " + IESecurityRiskPage$
print #1, "IE - [HKLM\Software\Microsoft\Internet Explorer\Main, Extensions Off Page] = " + IEExtensionsOffPage$
print #1, "IE - [HKLM\Software\Microsoft\Internet Explorer\Main, Local Page] = " + IELocalPage$
print #1, "IE - [HKLM\Software\Microsoft\Internet Explorer\Main, Start Page] = " + IEStartPage2$
print #1, "IE - [HKLM\Software\Microsoft\Internet Explorer\Main, Search Page] = " + IESearchPage$
print #1, "IE - [HKLM\Software\Microsoft\Internet Explorer\Main, Default_Secondary_Page_URL] = " + IEDefault_Secondary_Page_URL$
print #1, ""
print #1, "===============UPDATECHECKER================="
print #1, ""
print #1, "InternetExplorer Version => " + IEVers$
print #1, "FireFox Version => " + FireFox$
print #1, "Opera Version => " + OperaVersion$
print #1, "Chrome Version => " + ChromeVersion$
print #1, "FlashPlayer Version => " + FlashPlayer$
print #1, "Skype Version => " + Skype$
close #1
ShellExec(Textdatei$,"open",1)
var ende% = 0
while ende% = 0
waitinput
EndWhile
Wenn ich ihn einfach so ausfürhe mit Xprofan gehts ohne Probleme, als exe Datei gibts aber Probleme. Wo liegt der Fehler? |
| | | | |
| | Andreas Miethe
| Versuch's mal mit
Set("Errorlevel", 0) |
| | | Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 09.06.2013 ▲ |
| |
| | Gary12345 | Ich habe doch
Set("Errorlevel", -1) CODE Set("Errorlevel", 0)
?? |
| | | | |
| | Andreas Miethe
| | | | XProfan X2Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 09.06.2013 ▲ |
| |
| | Gary12345 |
Set("Errorlevel", -1)
IEStartPage$ = ReadIni$("HKEY_1", "Software\Microsoft\Internet Explorer\Main", "Start Page")
IESecurityRiskPage$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Security Risk Page")
IEExtensionsOffPage$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Extensions Off Page")
IELocalPage$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Local Page")
IEStartPage2$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Start Page")
IESearchPage$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Search Page")
IEDefault_Secondary_Page_URL$ = ReadIni$("HKEY_2", "SOFTWARE\Microsoft\Internet Explorer\Main", "Default_Secondary_Page_URL")
IEProxyEnable$ = ReadIni$("HKEY_1", "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable")
IEProxyOverride$ = ReadIni$("HKEY_1", "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyOverride")
IEProxyServer$ = ReadIni$("HKEY_1", "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer")
IEAutoConfigURL$ = ReadIni$("HKEY_1", "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings", "AutoConfigURL")
IEVers$ = ReadINI$("HKEY_2","SOFTWARE\Microsoft\Internet Explorer","Version")
Skype$ = ReadINI$("HKEY_1","Software\Skype\Phone\UI","StatsSentVersion")
FireFox$ = ReadINI$("HKEY_2","Software\Mozilla\Mozilla Firefox", "CurrentVersion")
FlashPlayer$ = ReadIni$("HKEY_2","SOFTWARE\Macromedia\FlashPlayer","CurrentVersion")
Opera$ = ReadINI$("HKEY_1","Software\Opera Software","Last Install Path") + "opera.exe"
OperaVersion$ = Resource.HoleResourceInfo(Opera$, "ProductVersion")
Chrome$ = ReadIni$("HKEY_1","SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome","InstallLocation") + "\Chrome.exe"
ChromeVersion$ = Resource.HoleResourceInfo(Chrome$, "ProductVersion")
Set("Errorlevel", 0)
Oder was meinst Du? |
| | | | |
| | Andreas Miethe
| Da setzt Du ja schon wieder den Errorlevel auf -1. Setz den auf 0. |
| | | XProfan X2Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 09.06.2013 ▲ |
| |
| | Gary12345 | Jetzt gehts! Verstehe nur nicht wieso :/ |
| | | | |
| | Gary12345 | Habt Ihr einen Besipielcode, mit dem man Prozesse auflisten kann? Alle vorhandenen Quellcodes sind älter und gehen bei X2 nicht! |
| | | | |
| | Julian Schmidt | Klar
Def CreateToolhelp32Snapshot(2) !"Kernel32", "CreateToolhelp32Snapshot"
Def Process32First(2) !"Kernel32", "Process32First"
Def Process32Next(2) !"Kernel32", "Process32Next"
Def CloseHandle(1) !"Kernel32", "CloseHandle"
Def GetCurrentProcessID(0) !"Kernel32", "GetCurrentProcessId"
Proc FillProcessList
Parameters grid&
Declare Entry#,err&,handle&,cpid&,text$,text2$,i%
Struct PROCESSENTRY32=dwSize&, cntUsage&, th32ProcessID&, th32DefaultHeapID&, th32ModuleID&, Threads&, th32ParentProcessID&, pcPriClassBase&, dwFlags&, szExeFile$(260)
Dim Entry#,PROCESSENTRY32
Entry#.dwSize& = SizeOf(Entry#)
cpid&=GetCurrentProcessID()
handle& = CreateToolhelp32Snapshot(2,0)
If handle&
err& = Process32First(handle&, Entry#)
If err&
Repeat
err& = Process32Next(handle&, Entry#)
If err&
text$=Str$(Entry#.th32ProcessID&)
text2$=Entry#.szExeFile$
DeleteString(grid&,i%)
InsertString(grid&,i%,text2$+"|"+text$)
i%=i%+1
EndIf
Until err& = 0
CloseHandle(handle&)
EndIf
EndIf
Dispose Entry#
EndProc
cls
var gbox&=Create("GridBox", %hwnd, "Prozessname;0;200;PID;0;100; Prioität; 0; 150", 0, 0, 0, width(%hwnd), height(%hwnd))
MoveListToHandle(gbox&)
FillProcessList(gbox&)
while 1
sleep 1000
casenot getfocus(gbox&) : FillProcessList(gbox&)
Endwhile
|
| | | | |
| | Gary12345 | Fehler in der Struktur- oder Klassendefinition: DWSIZE&,: Zeile 9
Wasn da los? Und ich will die bitte nich in ner liste haben, am Besten in einem Textdokument, Julian! Besten Dank! |
| | | | |
| | Gary12345 | Jetzt gehts! Ich schau jetzt nach ner Möglichkeit diese in ne textdatei zu unterbringen! |
| | | | |
| | Gary12345 |
Def CreateToolhelp32Snapshot(2) !"Kernel32", "CreateToolhelp32Snapshot"
Def Process32First(2) !"Kernel32", "Process32First"
Def Process32Next(2) !"Kernel32", "Process32Next"
Def CloseHandle(1) !"Kernel32", "CloseHandle"
Def GetCurrentProcessID(0) !"Kernel32", "GetCurrentProcessId"
Proc FillProcessList
Parameters grid&
Declare Entry#,err&,handle&,cpid&,text$,text2$,i%
Struct PROCESSENTRY32=dwSize&, cntUsage&, th32ProcessID&, th32DefaultHeapID&, th32ModuleID&, Threads&, th32ParentProcessID&, pcPriClassBase&, dwFlags&, szExeFile$(260)
Dim Entry#,PROCESSENTRY32
Entry#.dwSize& = SizeOf(Entry#)
cpid&=GetCurrentProcessID()
handle& = CreateToolhelp32Snapshot(2,0)
If handle&
err& = Process32First(handle&, Entry#)
If err&
Repeat
err& = Process32Next(handle&, Entry#)
If err&
text$=Str$(Entry#.th32ProcessID&)
text2$=Entry#.szExeFile$
DeleteString(grid&,i%)
InsertString(grid&,i%,text2$+"|"+text$)
i%=i%+1
EndIf
Until err& = 0
CloseHandle(handle&)
EndIf
EndIf
Dispose Entry#
EndProc
cls
var gbox&=Create("GridBox", %hwnd, "Prozessname;0;200;PID;0;100; Prioität; 0; 150", 0, 0, 0, width(%hwnd), height(%hwnd))
MoveListToHandle(gbox&)
FillProcessList(gbox&)
var Datei1$ = "Files2.txt"
var k% = 0
while 1
Assign #1, Datei1$
Rewrite #1
print #1, getString$(gbox&, k%)\
k% = k% + 1
Close #1
ShellExec(Datei1$, "open", 1)
casenot getfocus(gbox&) : FillProcessList(gbox&)
Endwhile
Hab schon Ewigkeiten nich mehr XPROFAN geproggt. Wie geht das richtig? Was sollte ich dazu lesen? |
| | | | |
|
AntwortenThemenoptionen | 29.047 Betrachtungen |
ThemeninformationenDieses Thema hat 4 Teilnehmer: |