![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Modding Registry Problems Hi, I'm trying to develop a startup PS script that will automatically spawn IE and navigate to a certain web site. So far so easy. It turns out that for the clients to then log in and use all the functionality of that web site I they need to use a proxy server in IE. I thought it would be trivial to adapt the PS script to add the proxy settings into the registry - and it probably is, but being a PS newbie I'm getting a bit lost. The reg keys I need to change are at:- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings and are ProxyEnable = 1 ProxyServer = "proxy.com:8080" In PS I can manually navigate as far as HKEY_CURRENT_USER\Software \Microsoft\Windows\CurrentVersion and when I dir I can see:- SKC VC Name Property --- -- ---- -------- 1 1 App Management {ShowUpdates} 6 0 Applets {} 0 2 Controls Folder {Presentation LCID, Presentation Cache} 37 19 Explorer {WebFindBandHook, FileFindBandHook, Logon 2 0 Ext {} 0 4 Extensions {doc, dot, rtf, xls} 3 0 Group Policy {} 2 0 Group Policy Objects {} 1 1 GrpConv {Log} 0 0 Internet {} 12 32 Internet Settings {User Agent, IE5_UA_Backup_Flag, NoNetAut 1 0 Multimedia {} 8 1 Policies {MemCheckBoxInRunDlg} 0 3 Run {ctfmon.exe, RocketDock, DrvMon.exe} 0 0 RunOnce {} 1 0 Settings {} 2 0 Shell Extensions {} 1 0 Syncmgr {} 3 0 Telephony {} 0 2 ThemeManager {WCreatedUser, ThemeActive} 3 5 Themes {InstallTheme, InstallVisualStyle, Instal 0 0 Uninstall {} 1 2 Webcheck {NoChannelLogging, NoScheduledUpdates} 0 0 WindowsUpdate {} 1 0 WinTrust {} So I know that I'm in the right place, but I cannot seem to cd into Internet Settings or get "at" the contents, where I need to read/write the required values. Any help appreciated! Thank, Stuart |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Modding Registry Problems Try: set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyEnable -value 1 set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyServer -value "proxy.com:8080" Shay http://scriptolog.blogspot.com Quote: > Hi, > I'm trying to develop a startup PS script that will automatically > spawn IE and navigate to a certain web site. So far so easy. It turns > out that for the clients to then log in and use all the functionality > of that web site I they need to use a proxy server in IE. > I thought it would be trivial to adapt the PS script to add the proxy > settings into the registry - and it probably is, but being a PS newbie > I'm getting a bit lost. > > The reg keys I need to change are at:- > > HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet > Settings > > and are > ProxyEnable = 1 > ProxyServer = "proxy.com:8080" > In PS I can manually navigate as far as HKEY_CURRENT_USER\Software > \Microsoft\Windows\CurrentVersion > > and when I dir I can see:- > SKC VC Name Property > --- -- ---- -------- > 1 1 App Management {ShowUpdates} > 6 0 Applets {} > 0 2 Controls Folder {Presentation LCID, > Presentation Cache} > 37 19 Explorer {WebFindBandHook, > FileFindBandHook, Logon > 2 0 Ext {} > 0 4 Extensions {doc, dot, rtf, xls} > 3 0 Group Policy {} > 2 0 Group Policy Objects {} > 1 1 GrpConv {Log} > 0 0 Internet {} > 12 32 Internet Settings {User Agent, > IE5_UA_Backup_Flag, NoNetAut > 1 0 Multimedia {} > 8 1 Policies {MemCheckBoxInRunDlg} > 0 3 Run {ctfmon.exe, RocketDock, > DrvMon.exe} > 0 0 RunOnce {} > 1 0 Settings {} > 2 0 Shell Extensions {} > 1 0 Syncmgr {} > 3 0 Telephony {} > 0 2 ThemeManager {WCreatedUser, ThemeActive} > 3 5 Themes {InstallTheme, > InstallVisualStyle, Instal > 0 0 Uninstall {} > 1 2 Webcheck {NoChannelLogging, > NoScheduledUpdates} > 0 0 WindowsUpdate {} > 1 0 WinTrust {} > So I know that I'm in the right place, but I cannot seem to cd into > Internet Settings or get "at" the contents, where I need to read/write > the required values. > > Any help appreciated! > > Thank, > Stuart |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Modding Registry Problems On Oct 25, 6:26 pm, Kryten <Kryte...@xxxxxx> wrote: Quote: > Hi, > I'm trying to develop a startup PS script that will automatically > spawn IE and navigate to a certain web site. So far so easy. It turns > out that for the clients to then log in and use all the functionality > of that web site I they need to use a proxy server in IE. > > I thought it would be trivial to adapt the PS script to add the proxy > settings into the registry - and it probably is, but being a PS newbie > I'm getting a bit lost. > > The reg keys I need to change are at:- > > HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet > Settings > > and are > ProxyEnable = 1 > ProxyServer = "proxy.com:8080" > > In PS I can manually navigate as far as HKEY_CURRENT_USER\Software > \Microsoft\Windows\CurrentVersion > > and when I dir I can see:- > SKC VC Name Property > --- -- ---- -------- > 1 1 App Management {ShowUpdates} > 6 0 Applets {} > 0 2 Controls Folder {Presentation LCID, > Presentation Cache} > 37 19 Explorer {WebFindBandHook, > FileFindBandHook, Logon > 2 0 Ext {} > 0 4 Extensions {doc, dot, rtf, xls} > 3 0 Group Policy {} > 2 0 Group Policy Objects {} > 1 1 GrpConv {Log} > 0 0 Internet {} > 12 32 Internet Settings {User Agent, > IE5_UA_Backup_Flag, NoNetAut > 1 0 Multimedia {} > 8 1 Policies {MemCheckBoxInRunDlg} > 0 3 Run {ctfmon.exe, RocketDock, > DrvMon.exe} > 0 0 RunOnce {} > 1 0 Settings {} > 2 0 Shell Extensions {} > 1 0 Syncmgr {} > 3 0 Telephony {} > 0 2 ThemeManager {WCreatedUser, ThemeActive} > 3 5 Themes {InstallTheme, > InstallVisualStyle, Instal > 0 0 Uninstall {} > 1 2 Webcheck {NoChannelLogging, > NoScheduledUpdates} > 0 0 WindowsUpdate {} > 1 0 WinTrust {} > > So I know that I'm in the right place, but I cannot seem to cd into > Internet Settings or get "at" the contents, where I need to read/write > the required values. > > Any help appreciated! > > Thank, > Stuart # example # Push-Location Set-Location 'HKCU:\Software\Microsoft\Windows' Set-Location 'CurrentVersion\Internet Settings' Set-ItemProperty -Path . ` -Name ProxyEnable ` -Value 1 Set-ItemProperty -Path . ` -Name ProxyServer ` -Value "proxy.com:8080" Pop-Location # example # Jeff |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Modding Registry Problems Jeff and Shay, Thanks for the responses. Both suggestions work just fine with next to no modification needed to fit either one into my startup script. Thing is, I was under the impression that PS treated the reg like a drive and was able to cd into each successive layer all the way down from HKCU .. cd Software .. cd Microsoft etc etc all the way down to CurrentVersion but could not cd into INTERNET SETTINGS. So I began trying to $ie = get-itemproperty -Path . -item Internet Settings but all to no avail. I guess what I am asking is how, from PS, do you even see the contents of the Internet Settings Sub Key? Thanks, Stuart |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Modding Registry Problems Here is what I mean:- PS HKCU:\Software\Microsoft\Windows\CurrentVersion> dir Hive: Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\Software \Microsoft\Windows\C SKC VC Name Property --- -- ---- -------- 1 1 App Management {ShowUpdates} 6 0 Applets {} 0 2 Controls Folder {Presentation LCID, Presentation Cache} 37 19 Explorer {WebFindBandHook, FileFindBandHook, Logon User Name, 2 0 Ext {} 0 4 Extensions {doc, dot, rtf, xls} 3 0 Group Policy {} 2 0 Group Policy Objects {} 1 1 GrpConv {Log} 0 0 Internet {} 12 32 Internet Settings {User Agent, IE5_UA_Backup_Flag, NoNetAutodial, Migr 1 0 Multimedia {} 8 1 Policies {MemCheckBoxInRunDlg} 0 3 Run {ctfmon.exe, RocketDock, DrvMon.exe} 0 0 RunOnce {} 1 0 Settings {} 2 0 Shell Extensions {} 1 0 Syncmgr {} 3 0 Telephony {} 0 2 ThemeManager {WCreatedUser, ThemeActive} 3 5 Themes {InstallTheme, InstallVisualStyle, InstallVisualStyl 0 0 Uninstall {} 1 2 Webcheck {NoChannelLogging, NoScheduledUpdates} 0 0 WindowsUpdate {} 1 0 WinTrust {} PS HKCU:\Software\Microsoft\Windows\CurrentVersion> Set-Location Internet Settings Set-Location : A parameter cannot be found that matches parameter name 'Settings'. At line:1 char:13 + Set-Location <<<< Internet Settings Any thoughts? Stuart |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Modding Registry Problems Hi Kryten, You need to put "Internet Settings" in quotation marks. Otherwise the PowerShell interpreter treats the words Internet and Settings as separate parameters and since it cannot find a match for the Settings parameter, it raises an error. - Kirk Munro Poshoholic http://poshoholic.com "Kryten" <Kryten68@xxxxxx> wrote in message news:1193329795.231864.170440@xxxxxx Quote: > Here is what I mean:- > PS HKCU:\Software\Microsoft\Windows\CurrentVersion> dir > > > Hive: Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\Software > \Microsoft\Windows\C > > SKC VC Name Property > --- -- ---- -------- > 1 1 App Management {ShowUpdates} > 6 0 Applets {} > 0 2 Controls Folder {Presentation LCID, > Presentation Cache} > 37 19 Explorer {WebFindBandHook,> FileFindBandHook, > Logon User Name, > 2 0 Ext {} > 0 4 Extensions {doc, dot, rtf, xls} > 3 0 Group Policy {} > 2 0 Group Policy Objects {} > 1 1 GrpConv {Log} > 0 0 Internet {} > 12 32 Internet Settings {User Agent, > IE5_UA_Backup_Flag, NoNetAutodial, Migr > 1 0 Multimedia {} > 8 1 Policies {MemCheckBoxInRunDlg} > 0 3 Run {ctfmon.exe, RocketDock, > DrvMon.exe} > 0 0 RunOnce {} > 1 0 Settings {} > 2 0 Shell Extensions {} > 1 0 Syncmgr {} > 3 0 Telephony {} > 0 2 ThemeManager {WCreatedUser, ThemeActive} > 3 5 Themes {InstallTheme, > InstallVisualStyle, InstallVisualStyl > 0 0 Uninstall {} > 1 2 Webcheck {NoChannelLogging, > NoScheduledUpdates} > 0 0 WindowsUpdate {} > 1 0 WinTrust {} > > > PS HKCU:\Software\Microsoft\Windows\CurrentVersion> Set-Location > Internet Settings > Set-Location : A parameter cannot be found that matches parameter name > 'Settings'. > At line:1 char:13 > + Set-Location <<<< Internet Settings > > Any thoughts? > > Stuart > > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Modding Registry Problems One more thing Stuart. Just to close the loop on your other question about how to get the values associated with a given key, you can do this: Set-Location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" $currentRegKey = Get-Item . Write-Host "Values for" $currentRegKey.Name $currentRegKey.GetValueNames() | ForEach-Object { $value = $currentRegKey.GetValue($_) Write-Host $_ "=" $value } This will output something similar to the following: Values for HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings User Agent = Mozilla/4.0 (compatible; MSIE 6.0; Win32) IE5_UA_Backup_Flag = 5.0 NoNetAutodial = 0 MigrateProxy = 1 EnableNegotiate = 1 ProxyEnable = 0 WarnOnZoneCrossing = 0 PrivacyAdvanced = 0 EmailName = IEUser@ AutoConfigProxy = wininet.dll MimeExclusionListForCache = multipart/mixed multipart/x-mixed-replace multipart/x-byteranges WarnOnPost = 1 0 0 0 UseSchannelDirectly = 1 0 0 0 EnableHttp1_1 = 1 - Kirk Munro Poshoholic http://poshoholic.com "Kirk Munro" <sorry@xxxxxx> wrote in message news:eNu5Fe0FIHA.1204@xxxxxx Quote: > Hi Kryten, > > You need to put "Internet Settings" in quotation marks. Otherwise the > PowerShell interpreter treats the words Internet and Settings as separate > parameters and since it cannot find a match for the Settings parameter, it > raises an error. > > - > Kirk Munro > Poshoholic > http://poshoholic.com > > "Kryten" <Kryten68@xxxxxx> wrote in message > news:1193329795.231864.170440@xxxxxx Quote: >> Here is what I mean:- >> PS HKCU:\Software\Microsoft\Windows\CurrentVersion> dir >> >> >> Hive: Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\Software >> \Microsoft\Windows\C >> >> SKC VC Name Property >> --- -- ---- -------- >> 1 1 App Management {ShowUpdates} >> 6 0 Applets {} >> 0 2 Controls Folder {Presentation LCID, >> Presentation Cache} >> 37 19 Explorer {WebFindBandHook,> >> FileFindBandHook, Logon User Name, >> 2 0 Ext {} >> 0 4 Extensions {doc, dot, rtf, xls} >> 3 0 Group Policy {} >> 2 0 Group Policy Objects {} >> 1 1 GrpConv {Log} >> 0 0 Internet {} >> 12 32 Internet Settings {User Agent, >> IE5_UA_Backup_Flag, NoNetAutodial, Migr >> 1 0 Multimedia {} >> 8 1 Policies {MemCheckBoxInRunDlg} >> 0 3 Run {ctfmon.exe, RocketDock, >> DrvMon.exe} >> 0 0 RunOnce {} >> 1 0 Settings {} >> 2 0 Shell Extensions {} >> 1 0 Syncmgr {} >> 3 0 Telephony {} >> 0 2 ThemeManager {WCreatedUser, ThemeActive} >> 3 5 Themes {InstallTheme, >> InstallVisualStyle, InstallVisualStyl >> 0 0 Uninstall {} >> 1 2 Webcheck {NoChannelLogging, >> NoScheduledUpdates} >> 0 0 WindowsUpdate {} >> 1 0 WinTrust {} >> >> >> PS HKCU:\Software\Microsoft\Windows\CurrentVersion> Set-Location >> Internet Settings >> Set-Location : A parameter cannot be found that matches parameter name >> 'Settings'. >> At line:1 char:13 >> + Set-Location <<<< Internet Settings >> >> Any thoughts? >> >> Stuart >> >> > |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Modding Registry Problems You'll need to use quotes when there is a space in any parameter. e.g.: PS HKCU:\Software\Microsoft\Windows\CurrentVersion> Set-Location "Internet Settings" "Kryten" <Kryten68@xxxxxx> wrote in message news:1193329795.231864.170440@xxxxxx Quote: > PS HKCU:\Software\Microsoft\Windows\CurrentVersion> Set-Location > Internet Settings > Set-Location : A parameter cannot be found that matches parameter name > 'Settings'. > At line:1 char:13 > + Set-Location <<<< Internet Settings |
My System Specs![]() |
| | #9 (permalink) |
| | Re: Modding Registry Problems Superb! Thank You, Stuart |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
[Solution] Modding boot screen with Vista SP1 (32 & 64 bit) | General Discussion | |||
| CD ROM / Registry problems | Vista performance & maintenance | |||
| Modding TCPIP.sys | Network & Sharing | |||
| Registry Problems | Vista General | |||
| registry problems in RC2.... | Vista installation & setup | |||