On a home built PC and some small OEM machines you may see something like:
To be filled by OEM
Default String
Capture Comman Prompt without Console Window
Moderator: Rathinagiri
-
- Posts: 44
- Joined: Fri Jun 20, 2014 8:41 pm
Re: Capture Comman Prompt without Console Window
Aqui más completo...
+------------------------------------
Here more complete ...
Al parecer, las computadoras "patito"
(así les llamamos aca a las computadoras que no son de marca IBM, DELL, HP, etc.), no traen esos datos.
*--------------------------------------------------------------------------------------------------------------------------------
Apparently, computers "duckling"
(So we call here computers that are not IBM brand, DELL, HP, etc.), do not bring that data.
+------------------------------------
Here more complete ...
Code: Select all
FUNCTION GetBiosSerialNumber()
LOCAL obj, oLocator, oWmi, oCollection
LOCAL cInfo := ""
oLocator := win_oleCreateObject( "wbemScripting.SwbemLocator" )
oWmi := oLocator:ConnectServer()
oCollection:= oWMI:ExecQuery("Select * from Win32_BIOS")
For Each obj In oCollection
cInfo += "SerialNumber:" + obj:SerialNumber + HB_OsNewLine()
cInfo += "BiosCharacteristics:" + hb_ValToStr( obj:BiosCharacteristics ) + HB_OsNewLine()
cInfo += "BuildNumber:" + hb_ValToStr( obj:BuildNumber ) + HB_OsNewLine()
cInfo += "CodeSet:" + hb_ValToStr( obj:CodeSet ) + HB_OsNewLine()
cInfo += "CurrentLanguage:" + obj:CurrentLanguage + HB_OsNewLine()
cInfo += "Description:" + obj:Description + HB_OsNewLine()
cInfo += "IdentificationCode:" + hb_ValToStr( obj:IdentificationCode ) + HB_OsNewLine()
cInfo += "InstallDate:" + hb_ValToStr( obj:InstallDate ) + HB_OsNewLine()
cInfo += "InstallableLanguages:" + hb_ValToStr( obj:InstallableLanguages ) + HB_OsNewLine()
cInfo += "LanguageEdition:" + hb_ValToStr( obj:LanguageEdition ) + HB_OsNewLine()
cInfo += "ListOfLanguages:" + hb_ValToStr(obj:ListOfLanguages ) + HB_OsNewLine()
cInfo += "Manufacturer:" + obj:Manufacturer + HB_OsNewLine()
cInfo += "Name:" + obj:Name + HB_OsNewLine()
cInfo += "OtherTargetOS:" + hb_ValToStr( obj:OtherTargetOS ) + HB_OsNewLine()
cInfo += "PrimaryBIOS:" + hb_ValToStr( obj:PrimaryBIOS ) + HB_OsNewLine()
cInfo += "ReleaseDate:" + hb_ValToStr( obj:ReleaseDate ) + HB_OsNewLine()
cInfo += "SMBIOSBIOSVersion:" + obj:SMBIOSBIOSVersion + HB_OsNewLine()
cInfo += "SMBIOSMajorVersion:" + hb_ValToStr( obj:SMBIOSMajorVersion ) + HB_OsNewLine()
cInfo += "SMBIOSMinorVersion:" + hb_ValToStr( obj:SMBIOSMinorVersion ) + HB_OsNewLine()
cInfo += "SMBIOSPresent:" + hb_ValToStr( obj:SMBIOSPresent ) + HB_OsNewLine()
cInfo += "SerialNumber:" + obj:SerialNumber + HB_OsNewLine()
cInfo += "SoftwareElementID:" + obj:SoftwareElementID + HB_OsNewLine()
cInfo += "SoftwareElementState:" + hb_ValToStr( obj:SoftwareElementState ) + HB_OsNewLine()
cInfo += "Status:" + obj:Status + HB_OsNewLine()
cInfo += "TargetOperatingSystem:" + hb_ValToStr( obj:TargetOperatingSystem ) + HB_OsNewLine()
cInfo += "Version:" + obj:Version + HB_OsNewLine()
Next
RETURN cInfo
Al parecer, las computadoras "patito"
(así les llamamos aca a las computadoras que no son de marca IBM, DELL, HP, etc.), no traen esos datos.
*--------------------------------------------------------------------------------------------------------------------------------
Apparently, computers "duckling"
(So we call here computers that are not IBM brand, DELL, HP, etc.), do not bring that data.
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: Capture Comman Prompt without Console Window
bpd2000 wrote: ↑Sun Nov 18, 2018 12:00 pmThere may be other solution:trmpluym wrote: ↑Sun Nov 18, 2018 11:10 am Somebody knows a way to do the same for PowerShell ?
So launch a PowerShell script and capture the resulting output ?
Maybe a C Guru knows how, here a starting point:
https://blogs.msdn.microsoft.com/kebab/ ... ts-from-c/Code: Select all
// demo using power shell Function main() local cStdOut, oplist hb_processRun( "powershell.exe -WindowStyle Hidden Get-WmiObject -Class Win32_BIOS ",, @cStdOut ) Msginfo( "result:" + cStdOut) HB_MEMOWRIT("PS_Result.txt", cStdOut) Return nil
*********************************************
How to call these API commands from HMG ?
////////////
Login
////////////
$params = @{
Method = 'Post'
Uri = "https://rcrf.trezor.gov.rs/api/login"
ContentType = 'application/json'
Body = @{ login = 'foo'; password = 'bar' } | ConvertTo-Json
}
Invoke-RestMethod @params
////////////
Output
////////////
{
"creationTime": "2018-02-23T21:00:30.5262037+01:00",
"accessToken": "eyJ1ba1A3jdeC0....",
"refreshToken": "eyJ1bmlxdWVfbm...."
}
$invoices = @(
@{
DebtorCompanyNumber = '10523'
InvoiceNumber = 'Racun 18/01'
Amount = 1001
IssueDate = '2018-02-28'
Comments = 'Komentar 1'
}
@{
DebtorCompanyNumber = '10523'
InvoiceNumber = 'Racun 18/02'
Amount = 1002.33
IssueDate = '2018-02-28'
Comments = 'Komentar 2'
Lifetime = 88
}
) | ConvertTo-Json
irm "https://rcrf.trezor.gov.rs/api/invoice/register" @params -Body $invoices