inf2cat - postdated DriverVer not allowed

>

On 3/4/2009 4:02 AM, xxxxx@osr.com wrote:
> You can file a bug on the WDK through Windows Connect.
> It goes directly into the bug tracking database that way.

IMHO, you could also tell the problem to your coffee mug – in my
experience the outcome is nearly 100% identical. :slight_smile:

Fair credit to Microsoft though - I got a few requests for further
information from ‘Jennifer’, so they are at least that interested in the
problem, which is more than I’d get out of my coffee mug :slight_smile:

James

James Harper wrote:

Fair credit to Microsoft though - I got a few requests for further
information from ‘Jennifer’, so they are at least that interested
in the problem, which is more than I’d get out of my coffee mug :slight_smile:

Yes, but I suspect that’s a result of this thread, not submitting the bug on Connect.

> James Harper wrote:

> Fair credit to Microsoft though - I got a few requests for further
> information from ‘Jennifer’, so they are at least that interested
> in the problem, which is more than I’d get out of my coffee mug :slight_smile:

Yes, but I suspect that’s a result of this thread, not submitting the
bug
on Connect.

I got a response on Connect which said I could either follow up with the
requested information on Connect or on ntdev. Quite nice of them I
thought - I hate web interfaces!

James

On 3/4/2009 4:02 AM, xxxxx@osr.com wrote:

You can file a bug on the WDK through Windows Connect.
It goes directly into the bug tracking database that way.

On 3/9/2009, Hagen Patzke wrote:

IMHO, you could also tell the problem to your coffee mug – in my
experience the outcome is nearly 100% identical. :slight_smile:

On 3/9/2009 11:37 AM, James Harper wrote:

Fair credit to Microsoft though - I got a few requests for further
information from ‘Jennifer’, so they are at least that interested in the
problem, which is more than I’d get out of my coffee mug :slight_smile:

I was not talking about Jennifer reading this newsgroup - this is great
and I don’t doubt she does her best to resolve issues.

I was solely referring to the frustrating “response experience” I
personally had (many) months ago with MS Connect.

Fair credit to Microsoft, then - in my case(s), talking to my coffee mug
would have been certainly partially soothing and stress-relieving
(therefore it would have had a positive effect) as opposed to using
the Connect feedback system (which in my case resulted in “nothing” or
annoying silence). :slight_smile:

>Any suggestions for how I could set the STAMPINF_DATE to the current UTC date in a bat file?

For /f "tokens=2-4 delims=/ " %%a in (‘date /t’) do (set STAMPINF_DATE=%%a/%%b/%%c)

From http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/

>

>Any suggestions for how I could set the STAMPINF_DATE to the current
UTC date in a bat file?

For /f "tokens=2-4 delims=/ " %%a in (‘date /t’) do (set
STAMPINF_DATE=%%a/%%b/%%c)

From http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-
current-date-in-mmddyyyy-format/

That will only get the local date won’t it?

Eg my current timezone is Australian Eastern Daylight Time, which is
UTC+11. So for the first 11 hours of the day, ‘date /t’ will be UTC date

  • 1

James

Ah yes of course,

the only way I have found to workaround it totally in a batch file is something like this:

::set timezone to UTC
control.exe timedate.cpl,/Z Greenwich Standard Time
::set the STAMPINF_DATE environment variable
For /f "tokens=2-4 delims=/ " %%a in (‘date /t’) do (set STAMPINF_DATE=%%a/%%b/%%c)
::set timezone back to NZ
control.exe timedate.cpl,/Z New Zealand Standard Time

>

Ah yes of course,

the only way I have found to workaround it totally in a batch file is
something like this:

::set timezone to UTC
control.exe timedate.cpl,/Z Greenwich Standard Time
::set the STAMPINF_DATE environment variable
For /f "tokens=2-4 delims=/ " %%a in (‘date /t’) do (set
STAMPINF_DATE=%%a/%%b/%%c)
::set timezone back to NZ
control.exe timedate.cpl,/Z New Zealand Standard Time

Interesting. That may be acceptable for a dedicated build machine, but
could cause problems if I tried it on my laptop…

Does NZ have daylight savings time? Does the above ‘just work’ in that
case?

Thanks

James

James,

How long would it take to write a C program that returns the current time as
UCT printed out as in the string format required for STAMPINF_DATE
environment variable and used in a batch file like below?

How long would it take to write a VBScript that does this or simply invokes
stampinf with the necessary twiddling?

I am sure you could become the new best friend of most every driver-writer
in your hemisphere by posting the ~30 lines or so of code back to the list
:slight_smile:

My favorite trick for doing crazy stuff like this is to write a VBScript
that I invoke ‘inline’ in makefile.inc which generates a file then included
into the makefile.inc.

!if [cscript now.vbs > $(O)\now.inc]
!endif
!if exists( $(O)\now.inc )
!include “$(O)\now.inc”

And of course now.vbs (or now.exe or whatever) ought to emit a text string
to stdout that is of the form:

STAPMINF_DATE=

And viola’ you will have your variable defined in your makefile.inc and if
you really want it in a batch file you can (I am sure) easily do that too.

And now.vbs could be something about as complex as:

Set oShell = CreateObject(“WScript.Shell”)
tzBias = oShell.RegRead(
“HKEY_LOCAL_MACHINE\System\CurrentControlSet”&

“\Control\TimeZoneInformation\ActiveTimeBias”_
)
tmNowUTC = DateAdd(“n”, tzBias, now())
WScript.Echo "# " & tmNowUTC
WScript.Echo “STAMPINF_DATE=” & FormatDateTime(tmNowUTC, 2)

Which run at the time I am posting this message outputs

# 3/30/2009 2:07:32 PM
STAMPINF_DATE=3/30/2009

I quick check against the Admiralty cannon boom tells me that it is indeed
mid afternoon on the 30th at the prime meridian.

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of James Harper
Sent: Sunday, March 29, 2009 10:53 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] inf2cat - postdated DriverVer not allowed

>
> Ah yes of course,
>
> the only way I have found to workaround it totally in a batch file is
> something like this:
>
> ::set timezone to UTC
> control.exe timedate.cpl,/Z Greenwich Standard Time
> ::set the STAMPINF_DATE environment variable
> For /f "tokens=2-4 delims=/ " %%a in (‘date /t’) do (set
> STAMPINF_DATE=%%a/%%b/%%c)
> ::set timezone back to NZ
> control.exe timedate.cpl,/Z New Zealand Standard Time
>

Interesting. That may be acceptable for a dedicated build machine, but
could cause problems if I tried it on my laptop…

Does NZ have daylight savings time? Does the above ‘just work’ in that
case?

Thanks

James


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I should have also noted that the tide is flooding and thus I am not
planning to set sail today but will wait for the ebb tomorrow morning.

-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Monday, March 30, 2009 10:12 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] inf2cat - postdated DriverVer not allowed

James,

How long would it take to write a C program that returns the current time as
UCT printed out as in the string format required for STAMPINF_DATE
environment variable and used in a batch file like below?

How long would it take to write a VBScript that does this or simply invokes
stampinf with the necessary twiddling?

I am sure you could become the new best friend of most every driver-writer
in your hemisphere by posting the ~30 lines or so of code back to the list
:slight_smile:

My favorite trick for doing crazy stuff like this is to write a VBScript
that I invoke ‘inline’ in makefile.inc which generates a file then included
into the makefile.inc.

!if [cscript now.vbs > $(O)\now.inc]
!endif
!if exists( $(O)\now.inc )
!include “$(O)\now.inc”

And of course now.vbs (or now.exe or whatever) ought to emit a text string
to stdout that is of the form:

STAPMINF_DATE=

And viola’ you will have your variable defined in your makefile.inc and if
you really want it in a batch file you can (I am sure) easily do that too.

And now.vbs could be something about as complex as:

Set oShell = CreateObject(“WScript.Shell”)
tzBias = oShell.RegRead(
“HKEY_LOCAL_MACHINE\System\CurrentControlSet”&

“\Control\TimeZoneInformation\ActiveTimeBias”_
)
tmNowUTC = DateAdd(“n”, tzBias, now())
WScript.Echo "# " & tmNowUTC
WScript.Echo “STAMPINF_DATE=” & FormatDateTime(tmNowUTC, 2)

Which run at the time I am posting this message outputs

# 3/30/2009 2:07:32 PM
STAMPINF_DATE=3/30/2009

I quick check against the Admiralty cannon boom tells me that it is indeed
mid afternoon on the 30th at the prime meridian.

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of James Harper
Sent: Sunday, March 29, 2009 10:53 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] inf2cat - postdated DriverVer not allowed

>
> Ah yes of course,
>
> the only way I have found to workaround it totally in a batch file is
> something like this:
>
> ::set timezone to UTC
> control.exe timedate.cpl,/Z Greenwich Standard Time
> ::set the STAMPINF_DATE environment variable
> For /f "tokens=2-4 delims=/ " %%a in (‘date /t’) do (set
> STAMPINF_DATE=%%a/%%b/%%c)
> ::set timezone back to NZ
> control.exe timedate.cpl,/Z New Zealand Standard Time
>

Interesting. That may be acceptable for a dedicated build machine, but
could cause problems if I tried it on my laptop…

Does NZ have daylight savings time? Does the above ‘just work’ in that
case?

Thanks

James


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

>Does NZ have daylight savings time? Does the above ‘just work’ in that

case?

Yes, and yes (I think)