Hi,

I guess the only valid type is REG_SZ : 
https://cfengine.com/inside/manuals/cfnova#Creating-a-value_002ddata-pair

Regards
Nicolas

Nicolas CHARLES
Normation SAS - http://www.normation.com
44 rue Cauchy – 94110 ARCUEIL
+33 (0)1 83 62 26 96  - +33 (0)6 14 63 25 18


On 04/11/2010 10:06, no-re...@cfengine.com wrote:
> Forum: Cfengine Help
> Subject: Nova and MS Registry
> Author: TronDiz
> Link to topic: https://cfengine.com/forum/read.php?3,19055,19055#msg-19055
>
> Hi, im having som problems to modify a key in the Windows registry.
>
> Here is my bundle:
>
> bundle agent win_event_log_application
> {
>   databases:
>    windows::
>       
> "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application"
>          database_operation =>  "create",
>          database_rows =>  { "RestrictGuestAccess,REG_DWORD,0" },
>          database_type =>  "ms_registry";
> }
>
> When i run cf-agent -v i get this error:
>
> nova>   ->  Registry key exists
> nova>   ->  Registry key 
> "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application" 
> opened...
> nova>   ->  value (RestrictGuestAccess,0) incorrect for 
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application
> nova>  Unknown data type for registry value for "RestrictGuestAccess" - 
> ignored
> nova>  I: Report relates to a promise with handle "promise_winregwmi_cf_39"
> nova>  I: Made in version '0.0.1' of 'C:\Program 
> Files\Cfengine\inputs\winregwmi.cf' near line 39
>
> This is where i believe the problem is. The registry had the type REG_DWORD, 
> which i have specified in my bundle.
> "Unknown data type for registry value for "RestrictGuestAccess"
>
> I have tried changing the data format on the value to 0x00000000 and 
> 0b00000000 in this line:  { "RestrictGuestAccess,REG_DWORD,0" }. but it 
> doesn't affect the output in verbose mode.
>
> Does anyone have any experience with this and can tell me what i am doing 
> wrong?
>
> Thanks. :)
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
>    
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to