1.

Solve : make map based on bios date?

Answer»

does someone knows how to make a batch file that creates a map on the c:/ drive, based on the PRODUCTION date of the bios. example if you made your bios on the 14/09/'05 (for amerika it is first the month than the day so it is the same if it is 09/14/'05) than there must be an folder like this: c:/140905 of four in amerika 091405, can sombody help me pleas???

sorry for my bad english, i'm from holland

greetz,

blackberry I don't know of any command that you could use. A script could pull out the info from the depths of the machine. Are you running a Windows machine? and if so which version.

Let us know.
Quote

I don't know of any command that you could use. A script could pull out the info from the depths of the machine. Are you running a Windows machine? and if so which version.

Let us know.


i have windows xp professional
The only date I could find in the BIOS was release date. Hope that works for you.

Code: [Select]
On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

Set fso = CreateObject("Scripting.FileSystemObject")

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each objItem In colItems
fso.CreateFolder("c:\" & WMIDateString(objItem.ReleaseDate))
Next


Function WMIDateString(dtmDate)
WMIDateString = Mid(dtmDate, 7, 2) & Mid(dtmDate, 5, 2) & Left(dtmDate, 4)
End Function


Save script with a vbs extension and run from the command line as: cscript scriptname.vbs

Note: the date conversion resolves to ddmmyyyy.

Hope this HELPS. that worked, but i think there is a way to do it in a batch file:

Code: [Select]
@echo off
>>bios.vbs ECHO On Error Resume Next
>>bios.vbs ECHO Const wbemFlagReturnImmediately = &h10
>>bios.vbs ECHO Const wbemFlagForwardOnly = &h20
>>bios.vbs ECHO Set fso = CreateObject("Scripting.FileSystemObject")
>>bios.vbs ECHO strComputer = "."
>>bios.vbs ECHO Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
>>bios.vbs ECHO Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", _
>>bios.vbs ECHO wbemFlagReturnImmediately + wbemFlagForwardOnly)
>>bios.vbs ECHO For Each objItem In colItems
>>bios.vbs ECHO fso.CreateFolder("c:\" & WMIDateString(objItem.ReleaseDate))
>>bios.vbs ECHO Next
>>bios.vbs ECHO Function WMIDateString(dtmDate)
>>bios.vbs ECHO WMIDateString = Mid(dtmDate, 7, 2) & Mid(dtmDate, 5, 2) & Left(dtmDate, 4)
>>bios.vbs ECHO End Function

NORMALY this should work, but my dos have a PROBLEM with the "&", it gives errors, is there any way to make it work, or is it just impossible
You can mask & with ^.
I think it doesn´t make sense to write the vbs script with a batch file.
To write it in a text editor and call it from a batch file is easier.

uliQuote
To write it in a text editor and call it from a batch file is easier.
uli


i don't know how to do that, can you post me the script please?call scriptname.vbs


Discussion

No Comment Found