taskkill /im firefox.exe /f
taskkill /im explore.exe /f
cd\
set "users=Documents and Settings"
For /F "tokens=*" %%z in ('Dir /B /A:D "%users%"') Do ( call :part2 %%z)
:part2
set username=%1
set key=Software\Microsoft\Windows\CurrentVersion\Internet Settings
set val=ProxyEnable
set type=REG_DWORD
set data=0
reg load "HKU\%username%" "%profdir%\NTUSER.DAT"
reg add "HKU\%username%\%key%" /v "%val%" /t %type% /d %data% /f
reg unload "HKU\%username%"
cd "%users%\Local Settings\Application Data\Mozilla\Firefox\Profiles"
cd *.default
echo user_pref("network.proxy.type", 0); >>"prefs.js" (in this line when run is show 1 after ; why i don't know)
when i run this command it run show successful but nothing is happen please guide me...
OR any better way to do this task i have to remove proxy settings form both browser.
i am running this command with psexec with administrator profile & need to change in every user profile..
change user profile proxy settings
Moderator: DosItHelp
Re: change user profile proxy settings
Dipesh wrote:taskkill /im firefox.exe /f
taskkill /im explore.exe /f
cd\
set "users=Documents and Settings"
For /F "tokens=*" %%z in ('Dir /B /A:D "%users%"') Do ( call :part2 %%z)
GOTO :EOF
:part2
set username=%1
set key=Software\Microsoft\Windows\CurrentVersion\Internet Settings
set val=ProxyEnable
set type=REG_DWORD
set data=0
reg load "HKU\%username%" "%profdir%\NTUSER.DAT"
reg add "HKU\%username%\%key%" /v "%val%" /t %type% /d %data% /f
reg unload "HKU\%username%"
cd "%users%\Local Settings\Application Data\Mozilla\Firefox\Profiles"
cd *.default
>>"prefs.js" echo user_pref("network.proxy.type", 0);
The two changes above will help, but I didn't study your code.