edit value in gpedit

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

edit value in gpedit

#1 Post by r2du-soft » 10 Jul 2014 13:58

hi
i must edit a value in gpedit.exe
i most edit this:

gpedit.msc >> Computer Configuration >> Administrative Templates >> System >> Internet Communication Management >> Internet Communication settings >> Turn off access to all windows update features
Change Setting to Enabled.

How Can Do This With Command Line?
Thanks

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: edit value in gpedit

#2 Post by r2du-soft » 13 Jul 2014 14:24

sorry for span
no body not help me?

Compo
Posts: 599
Joined: 21 Mar 2014 08:50

Re: edit value in gpedit

#3 Post by Compo » 13 Jul 2014 16:25

You could use the registry, (Ref: http://technet.microsoft.com/en-us/library/dd939844(v=ws.10).aspx).
Example:

Code: Select all

@Echo Off & SetLocal
(Set _PWU=HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate)
Reg Add %_PWU% /V DisableWindowsUpdateAccess /T REG_DWORD /D 0 /F >Nul

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: edit value in gpedit

#4 Post by r2du-soft » 14 Jul 2014 00:26

Thanks Compo
i understand i can use this work with change registry value,but i need change (Control) value in gpedit.exe
there is no way to control value in gpedit.exe

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: edit value in gpedit

#5 Post by foxidrive » 14 Jul 2014 02:27

SENDKEYS or an AutoIt script can control the GUI. Autohotkey can do it from a hotkey.

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: edit value in gpedit

#6 Post by r2du-soft » 14 Jul 2014 03:17

foxidrive wrote:SENDKEYS or an AutoIt script can control the GUI. Autohotkey can do it from a hotkey.


Thanks foxidrive
if is possible give me a example with Autohotkey for change value in gpedit.exe
Thanks

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: edit value in gpedit

#7 Post by foxidrive » 14 Jul 2014 08:46

r2du-soft wrote:Thanks foxidrive
if is possible give me a example with Autohotkey for change value in gpedit.exe
Thanks


I tried to make gpedit.msc accept keyboard input but it seems that Windows recognises the scripted keyboard input and stops it working.

Compo
Posts: 599
Joined: 21 Mar 2014 08:50

Re: edit value in gpedit

#8 Post by Compo » 14 Jul 2014 10:04

r2du-soft wrote:Thanks Compo
i understand i can use this work with change registry value,but i need change (Control) value in gpedit.exe
there is no way to control value in gpedit.exe


Please try and explain to me the reason why using the registry to toggle a group policy value is not acceptable. Other than that you'll need to look at Administrative Templates wuau.adm/wuau.admx.

This forum is based around the command line, and not really for controlling GUI's, (especially those which only edit the same values found in the registry).

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: edit value in gpedit

#9 Post by foxidrive » 14 Jul 2014 10:55

r2du-soft wrote:Thanks Compo
i understand i can use this work with change registry value,but i need change (Control) value in gpedit.exe
there is no way to control value in gpedit.exe


If you modify the appropriate items in the registry and then open gpedit, you should see the changes. Don't you see the items changed?

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: edit value in gpedit

#10 Post by r2du-soft » 15 Jul 2014 04:06

when i change manualy value gpedit.msc:

gpedit.msc >> Computer Configuration >> Administrative Templates >> System >> Internet Communication Management >> Internet Communication settings >> Turn off access to all windows update features
Change Setting to Enabled.

i see change value in registry in
key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{81494A34-87BF-4CBC-8687-AF501E2A6590}Machine\Software\Policies\Microsoft\Windows\WindowsUpdate
name : DisableWindowsUpdateAccess
type : Dword
value : 1

but this have a big problem for change value to 1 with reg add. It is that {81494A34-87BF-4CBC-8687-AF501E2A6590} in address some times change! In principle {81494A34-87BF-4CBC-8687-AF501E2A6590} Is variable!

Post Reply