• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2141
  • Last Modified:

Edit group policies through batch file

I am at a school that does not use active directory.  I need to go to individual computers and run a batch file to enable/disable a proxy filter.  Some computers have up to six (6) users log on per day.  How can I do this for all users without having to log on each user and make the change?  How do I make the group policy edit in XP part of the batch file and what about Vista Home Premium?
0
outlaw45
Asked:
outlaw45
  • 3
  • 3
  • 2
  • +1
1 Solution
 
Smart_ManCommented:
work around

try using remote desktop
0
 
and235100Commented:
>> "a proxy filter"

Do you mean a proxy server?

If so - the registry information is at:
User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\
Internet Settings]
Value Name: ProxyServer, ProxyEnable, ProxyOverride
Data Type: REG_SZ (String Value)
Value Data: Server:Port
(from http://www.pctools.com/guides/registry/detail/292/)
If so - you can use reg add /f to change the proxy settings - and create a batch file - and run it as a logon script.


.
0
 
and235100Commented:
I.e. as you cannot use group policy - you could run the script from the local policies...
So - do some of them need access through the proxy - and others don't?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
modcon_mvarisCommented:
You can put the batch file in the All Users Startup folder so it will run each time a user logs in.  

Windows XP location:
C:\Documents and Settings\All Users\Start Menu\Programs\Startup

Vista Home Premium doesn't have the All Users profile, but you can place the batch file in each individual user's folder located:
C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

If you want to get fancy, you can have the batch file check if the registy key exists:

http://www.petri.co.il/reg_command_in_windows_xp.htm
0
 
outlaw45Author Commented:
I'm sorry, yes I mean proxy server.  XP allows me to edit the registry through a batch file and change the current user.  I need to affect the whole machine without logging on to every user and setting the LAN settings and proxy settings by hand.  I have too many many machines and too many users.  Sitting at the computer, running a batch file and making the change for all users is what I need to do.
0
 
and235100Commented:
You can configure proxy settings for all users - using HKLM, rather than HKCU:
http://technet2.microsoft.com/WindowsVista/en/library/16f13690-3ad2-4d03-92fd-6ca93806cfaa1033.mspx?mfr=true
0
 
outlaw45Author Commented:
For some reason, HKLM does not work on Vista Home Premium
0
 
Smart_ManCommented:
have you tried the registery ? thought about using remote desktop ? do you have the same settings for all users on the same machine ?

waiting for your reply
0
 
outlaw45Author Commented:
The solution was partly answered.  Not much response.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now