Jump to content

RegWrite containing variables in Key


Recommended Posts

Guest alexheim
Posted

Im trying to change a value in the Registry where the Registry Key itself should contain a variable. Here an example:

RegWrite ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters\Interfaces\$InterfaceID", "DisableDynamicUpdate", "REG_DWORD", "0")

$InterfaceID is th variable which I previously read from the registry. In older versions of Autoit it was possible to use variables in the Registry Key Path, but in the new version 3.02 it seems not. I already tried to use "%" before and after the variable to identify it properly, but everything failed. Has anybody an idea?

Thanks

Alex

Posted (edited)

RegWrite ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters\Interfaces\" & $InterfaceID, "DisableDynamicUpdate", "REG_DWORD", "0")

im guessing that your problem is that the variable was inside quotes

EDIT: i put tags

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Guest alexheim
Posted

RegWrite ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters\Interfaces\" & $InterfaceID, "DisableDynamicUpdate", "REG_DWORD", "0")

im guessing that your problem is that the variable was inside quotes

EDIT: i put tags

<{POST_SNAPBACK}>

Thank you so much for this hint. It works fine now.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...