AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Delphi "WinSat.exe formal" mit Delphi
Thema durchsuchen
Ansicht
Themen-Optionen

"WinSat.exe formal" mit Delphi

Ein Thema von Mattze · begonnen am 17. Sep 2018 · letzter Beitrag vom 19. Sep 2018
Antwort Antwort
Seite 2 von 2     12   
THY4243

Registriert seit: 15. Dez 2012
Ort: München - Untermenzing
40 Beiträge
 
Delphi 11 Alexandria
 
#11

AW: "WinSat.exe formal" mit Delphi

  Alt 18. Sep 2018, 18:52
Ergänzend zu Dalai als Hintergrund zur 32-/64-Bit Thematik (WOW64-Redirection):

https://www.delphipraxis.net/155861-...direction.html

https://docs.microsoft.com/de-de/win...tem-redirector


Winsat.exe hat so einige Parameter:

https://www.ghacks.net/2017/10/16/th...insat-command/
  Mit Zitat antworten Zitat
Benutzerbild von KodeZwerg
KodeZwerg

Registriert seit: 1. Feb 2018
3.685 Beiträge
 
Delphi 11 Alexandria
 
#12

AW: "WinSat.exe formal" mit Delphi

  Alt 18. Sep 2018, 19:08
Danke Euch beiden dafür, da werden ich mal lesen und schauen wie ich den Konflikt bzw Knoten den ich gerade im Kopf habe löse

Offtopic
Hier noch eine WMI Batch Datei für Interessierte, die einem WinSAT Ergebnisse liefert, habs getestet und zeigt alles 0 an da ich das WinSAT Tool selbst noch nie Indexsen lies.
Delphi-Quellcode:
@ECHO OFF
IF NOT "%OS%"=="Windows_NT" GOTO Syntax
IF NOT "%~3"=="" GOTO Syntax
ECHO.%* | FIND "?" >NUL && GOTO Syntax

SETLOCAL ENABLEDELAYEDEXPANSION

SET Valid=0
FOR %%A IN ("" CPU D3D Disk Graphics Mem Memory Level Total Vid Video) DO (
   IF /I "%~1"=="%%~A" SET Valid=1
)
IF NOT "%Valid%"=="1" (
   ENDLOCAL
   GOTO Syntax
)

IF "%~2"=="" (
   SET Node=%ComputerName%
) ELSE (
   SET Node=%~2
)

SET RC=

SET WinSATAssessmentState.0=StateUnknown
SET WinSATAssessmentState.1=Valid
SET WinSATAssessmentState.2=IncoherentWithHardware
SET WinSATAssessmentState.3=NoAssessmentAvailable
SET WinSATAssessmentState.4=Invalid

FOR /F "tokens=1* delims==" %%A IN ('WMIC /Node:"%Node%" Path Win32_WinSAT Where TimeTaken^="MostRecentAssessment" Get WinSATAssessmentState /Format:LIST') DO (
   IF NOT "%%~B"=="" (
      FOR %%C IN (%%~B) DO (
         SET Win32_WinSAT.WinSATAssessmentState=!WinSATAssessmentState.%%C!
      )
   )
)
FOR /F "tokens=1* delims==" %%A IN ('WMIC /Node:"%Node%" Path Win32_WinSAT Where TimeTaken^="MostRecentAssessment" Get WinSPRLevel /Format:LIST') DO (
   IF NOT "%%~B"=="" (
      SET Result=%%~B
      FOR %%C IN ("!Result:,=.!") DO (
         SET Win32_WinSAT.WinSPRLevel=%%~C
      )
   )
)
FOR /F "tokens=1* delims==" %%A IN ('WMIC /Node:"%Node%" Path Win32_WinSAT Where TimeTaken^="MostRecentAssessment" Get * /Format:LIST ^| FINDSTR /R /B /I /C:"%~1[^=]*Score="') DO (
   IF NOT "%%~B"=="" (
      FOR %%C IN (%%~B) DO IF "!RC!"=="" SET /A RC = %%~C
      SET Result=%%~B
      FOR %%C IN ("!Result:,=.!") DO (
         SET Win32_WinSAT.%%A=%%~C
      )
   )
)
IF "%~1"=="" SET RC=%Win32_WinSAT.WinSPRLevel%
SET Win32_WinSAT.
ENDLOCAL & EXIT /B %RC%


:Syntax
ECHO.
ECHO WinSAT.bat, Version 1.00
ECHO Return Windows System Assessment Tools's scores for the specified computer
ECHO.
ECHO Usage: WINSAT [ component [ computer ] ]
ECHO.
ECHO Where: "component" can have one of the following values:
ECHO "CPU" to return the WinSAT CPU Score
ECHO "D3D" to return the WinSAT CPU Score
ECHO "Disk" to return the WinSAT Disk Score
ECHO "Graphics", "Vid" or "Video" to return the WinSAT Graphics Score
ECHO "Mem" or "Memory" to return the WinSAT Disk Score
ECHO "Level" or "Total" to return the WinSAT Total Score (WinSPRLevel)
ECHO "computer" is an optional remote computer (default: local computer)
ECHO.
ECHO Notes: If a component is specified, only the score for that component will
ECHO be displayed on screen.
ECHO The integer value for the specified score will be returned as
ECHO "errorlevel".
ECHO If no component is specified, ALL scores will be displayed on screen,
ECHO and the "errorlevel" will be the integer value of the total score.
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com

IF "%OS%"=="Windows_NT" EXIT /B 1
Gruß vom KodeZwerg
  Mit Zitat antworten Zitat
devidespe

Registriert seit: 7. Sep 2006
Ort: Berlin
434 Beiträge
 
Delphi 10.4 Sydney
 
#13

AW: "WinSat.exe formal" mit Delphi

  Alt 19. Sep 2018, 09:34
Hmm bzgl. der Ergebnisse habe ich die XML-Dateien ausgewertet - diese liegen an fest definierter Stelle und haben ein bestimmtes Format. Damit hast du auch Zugriff auf frühere Bewertungen.

Mag aber auch damit zusammenhängen, dass ich WMI nicht gerne verwende.
Devid
57 65 72 20 6C 65 73 65 6E 20 6B 61 6E 6E 2C 20 69 73 74 20 6B 6C 61 72 20 69 6D 20 56 6F 72 74 65 69 6C 21
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:32 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz