Vista power plan integration

Vista allows drivers to integrate to power plan settings. I mean AddPowerSetting INF directive. Is anybody already using it? Seems tempting to me but we’re concerned about string localization. If I understand it correctly, there are two options. Having English strings in the INF and forget about other languages. The best for me but probably unacceptable for our Asian customers. The second is to reference a resource in an external DLL which contains localized strings. Seems usable but I have a few doubts about it:

  • the DLL with string resources can be installed with the driver by INF. What about driver signature? Is the DLL also hashed i.e. any strings change (adding new language) would lead to new driver signature?
  • what if DLL doesn’t exist? Is there a way how to have a default English value in the INF (have to address existing users if DLL isn’t installed by INF)

Next problem are defaults. Our customers are OEMs who have different requirements and they’d like to have different defaults. Having different INF i.e. signed driver for every customer is unacceptable for us. Instead, we could give them a tool which’d change defaults to desired state (there are APIs for this purpose). The problem is we give them a package which preinstalls driver so it is automatically installed when our device is plugged it. The tool could be run on the end of setup but in this moment the INF isn’t “executed”, yet, and our power plan settings wouldn’t exist. Any idea how to handle it?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

I asked some of the power folks, I will let you know when I get an answer.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Thursday, October 11, 2007 2:57 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Vista power plan integration

Vista allows drivers to integrate to power plan settings. I mean AddPowerSetting INF directive. Is anybody already using it? Seems tempting to me but we’re concerned about string localization. If I understand it correctly, there are two options. Having English strings in the INF and forget about other languages. The best for me but probably unacceptable for our Asian customers. The second is to reference a resource in an external DLL which contains localized strings. Seems usable but I have a few doubts about it:

  • the DLL with string resources can be installed with the driver by INF. What about driver signature? Is the DLL also hashed i.e. any strings change (adding new language) would lead to new driver signature?
  • what if DLL doesn’t exist? Is there a way how to have a default English value in the INF (have to address existing users if DLL isn’t installed by INF)

Next problem are defaults. Our customers are OEMs who have different requirements and they’d like to have different defaults. Having different INF i.e. signed driver for every customer is unacceptable for us. Instead, we could give them a tool which’d change defaults to desired state (there are APIs for this purpose). The problem is we give them a package which preinstalls driver so it is automatically installed when our device is plugged it. The tool could be run on the end of setup but in this moment the INF isn’t “executed”, yet, and our power plan settings wouldn’t exist. Any idea how to handle it?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


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

Thanks!

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Friday, October 12, 2007 12:08 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Vista power plan integration

I asked some of the power folks, I will let you know when I get an answer.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Thursday, October 11, 2007 2:57 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Vista power plan integration

Vista allows drivers to integrate to power plan settings. I mean AddPowerSetting INF directive. Is anybody already using it? Seems tempting to me but we’re concerned about string localization. If I understand it correctly, there are two options. Having English strings in the INF and forget about other languages. The best for me but probably unacceptable for our Asian customers. The second is to reference a resource in an external DLL which contains localized strings. Seems usable but I have a few doubts about it:

  • the DLL with string resources can be installed with the driver by INF. What about driver signature? Is the DLL also hashed i.e. any strings change (adding new language) would lead to new driver signature?
  • what if DLL doesn’t exist? Is there a way how to have a default English value in the INF (have to address existing users if DLL isn’t installed by INF)

Next problem are defaults. Our customers are OEMs who have different requirements and they’d like to have different defaults. Having different INF i.e. signed driver for every customer is unacceptable for us. Instead, we could give them a tool which’d change defaults to desired state (there are APIs for this purpose). The problem is we give them a package which preinstalls driver so it is automatically installed when our device is plugged it. The tool could be run on the end of setup but in this moment the INF isn’t “executed”, yet, and our power plan settings wouldn’t exist. Any idea how to handle it?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


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

> Is the DLL also hashed i.e. any strings change (adding new language) would lead to new driver signature?

Yes, the DLL is also hashed as it is part of the package (e.g. it needs to be listed in the files section. Modifying this DLL (e.g. adding new language strings or changing existing strings) will invalidate the hashes and require resigning of the package.

what if DLL doesn’t exist? Is there a way how to have a default English value in the INF (have to address existing users if DLL isn’t installed by INF)

No, it’s an either/or thing.

Next problem are defaults. Our customers are OEMs who have different requirements and they’d like to have different defaults. Having different INF i.e. signed driver for every customer is unacceptable for us. Instead, we could give them a tool which’d change defaults to desired state (there are APIs for this purpose). The problem is we give them a package which preinstalls driver so it is automatically installed when our device is plugged it. The tool could be run on the end of setup but in this moment the INF isn’t “executed”, yet, and our power plan settings wouldn’t exist. Any idea how to handle it?

You can change power settings via the command line using powercfg.exe. See http://technet2.microsoft.com/WindowsVista/en/library/1d58b934-f56a-4796-b2df-7be2eb9c03bc1033.mspx for details. Note that you will need to call ‘powercfg -setactive ’ in order to activate any setting changes made via powercfg.exe before they will take effect.

There is a process to resign your driver package if no actual driver changes occur:
Driver Update Acceptable Defined:
The Driver Update Acceptable process allows users to perform acceptable updates logo’d/signed device driver without DTM retesting.
Driver Update Acceptable Steps Overview:
1. Go to Winqual submission center
2. Choose a specific submission to perform a DUA
3. Download submissions WST File
4. Open WST and load WST File for DUA
5. Load Updated Drivers Package
6. Create Package
7. Go back to Winqual submission center
8. Find the specific submission to perform a DUA (from step 2 above)
9. Upload Driver Update and follow the DUA wizard

To perform a Driver Update Acceptable submission, download a WST file from Winqual in Submission Center by choosing the specific submission to perform a DUA on.

If you have further questions contact: xxxxx@microsoft.com

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Thursday, October 11, 2007 2:57 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Vista power plan integration

Vista allows drivers to integrate to power plan settings. I mean AddPowerSetting INF directive. Is anybody already using it? Seems tempting to me but we’re concerned about string localization. If I understand it correctly, there are two options. Having English strings in the INF and forget about other languages. The best for me but probably unacceptable for our Asian customers. The second is to reference a resource in an external DLL which contains localized strings. Seems usable but I have a few doubts about it:

- the DLL with string resources can be installed with the driver by INF. What about driver signature? Is the DLL also hashed i.e. any strings change (adding new language) would lead to new driver signature?
- what if DLL doesn’t exist? Is there a way how to have a default English value in the INF (have to address existing users if DLL isn’t installed by INF)

Next problem are defaults. Our customers are OEMs who have different requirements and they’d like to have different defaults. Having different INF i.e. signed driver for every customer is unacceptable for us. Instead, we could give them a tool which’d change defaults to desired state (there are APIs for this purpose). The problem is we give them a package which preinstalls driver so it is automatically installed when our device is plugged it. The tool could be run on the end of setup but in this moment the INF isn’t “executed”, yet, and our power plan settings wouldn’t exist. Any idea how to handle it?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


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

Thanks, Doron. This is what I was affraid about :slight_smile: If any change related to localization would lead to new signature, it is probably unacceptable for us. The problem with signing itself can be solved by DUA (good to know) but the main problem is at customers’ site. They run acceptance tests (much stronger and longer than DTM does) with any new driver package version and they need a very good reason (at least BSOD) to do it again.

May I ask you to convey to right people that current scheme is too unflexible? Basically, there should be a way how to change or add new language strings to the existing driver/INF pair. Like an ideal solution seems if INF can contain default string (in English) and still address a resource in the external DLL. If there is no definition for current language in the DLL, default strings would be used. It’d allow to update driver and DLL with definitions separately.

As for the 3rd answer, I’m not sure if I understand correctly. I know how to update power settings via powercfg or APIs. The problem is with the order. If we preinstall driver and configure power defaults on the end of setup, driver’s INF will be processed later when an users plugs our device in. It means a) our power settings won’t be there on the end of initial setup b) defaults would be replaced by INF later. Do I miss something?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Monday, October 15, 2007 5:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Vista power plan integration

> Is the DLL also hashed i.e. any strings change (adding new language) would lead to new driver signature?

Yes, the DLL is also hashed as it is part of the package (e.g. it needs to be listed in the files section. Modifying this DLL (e.g. adding new language strings or changing existing strings) will invalidate the hashes and require resigning of the package.

> what if DLL doesn’t exist? Is there a way how to have a default English value in the INF (have to address existing users if DLL isn’t installed by INF)

No, it’s an either/or thing.

> Next problem are defaults. Our customers are OEMs who have different requirements and they’d like to have different defaults. Having different INF i.e. signed driver for every customer is unacceptable for us. Instead, we could give them a tool which’d change defaults to desired state (there are APIs for this purpose). The problem is we give them a package which preinstalls driver so it is automatically installed when our device is plugged it. The tool could be run on the end of setup but in this moment the INF isn’t “executed”, yet, and our power plan settings wouldn’t exist. Any idea how to handle it?

You can change power settings via the command line using powercfg.exe. See http://technet2.microsoft.com/WindowsVista/en/library/1d58b934-f56a-4796-b2df-7be2eb9c03bc1033.mspx for details. Note that you will need to call ‘powercfg -setactive ’ in order to activate any setting changes made via powercfg.exe before they will take effect.
>
> There is a process to resign your driver package if no actual driver changes occur:
> Driver Update Acceptable Defined:
> The Driver Update Acceptable process allows users to perform acceptable updates logo’d/signed device driver without DTM retesting.
> Driver Update Acceptable Steps Overview:
> 1. Go to Winqual submission center
> 2. Choose a specific submission to perform a DUA
> 3. Download submissions WST File
> 4. Open WST and load WST File for DUA
> 5. Load Updated Drivers Package
> 6. Create Package
> 7. Go back to Winqual submission center>
> 8. Find the specific submission to perform a DUA (from step 2 above)
> 9. Upload Driver Update and follow the DUA wizard
>
> To perform a Driver Update Acceptable submission, download a WST file from Winqual in Submission Center by choosing the specific submission to perform a DUA on.
>
> If you have further questions contact: xxxxx@microsoft.com
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Thursday, October 11, 2007 2:57 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Vista power plan integration
>
> Vista allows drivers to integrate to power plan settings. I mean AddPowerSetting INF directive. Is anybody already using it? Seems tempting to me but we’re concerned about string localization. If I understand it correctly, there are two options. Having English strings in the INF and forget about other languages. The best for me but probably unacceptable for our Asian customers. The second is to reference a resource in an external DLL which contains localized strings. Seems usable but I have a few doubts about it:
>
> - the DLL with string resources can be installed with the driver by INF. What about driver signature? Is the DLL also hashed i.e. any strings change (adding new language) would lead to new driver signature?
> - what if DLL doesn’t exist? Is there a way how to have a default English value in the INF (have to address existing users if DLL isn’t installed by INF)
>
> Next problem are defaults. Our customers are OEMs who have different requirements and they’d like to have different defaults. Having different INF i.e. signed driver for every customer is unacceptable for us. Instead, we could give them a tool which’d change defaults to desired state (there are APIs for this purpose). The problem is we give them a package which preinstalls driver so it is automatically installed when our device is plugged it. The tool could be run on the end of setup but in this moment the INF isn’t “executed”, yet, and our power plan settings wouldn’t exist. Any idea how to handle it?
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> —
> 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
>