Change chrome homepage using batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
penpen
Expert
Posts: 1712
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Change chrome homepage using batch

#16 Post by penpen » 29 Mar 2019 07:25

ShadowThief wrote:
28 Mar 2019 21:25
the relevant part of the JSON looks like

"homepage":"http://www.google.com/"
Maybe that location is outdated because here on work (where i won't test changing that and where i won't try to develope that), is:

Code: Select all

"homepage"="F48D3D60A2CB04D9DA09E30EB6E80736359385D1914AECCF128234DEA3C9EDCD"
I doubt that's an encoded, else they probably would also have encoded other (more secure) details.
ShadowThief wrote:
28 Mar 2019 21:25
Also, mine is over 100,000 characters long, so editing it in batch would prove... tricky.
The idea is to edit that in the jScript part, so that problem shouldn't arise (this time).


penpen

ShadowThief
Expert
Posts: 901
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Change chrome homepage using batch

#17 Post by ShadowThief » 29 Mar 2019 19:16

I see two "homepage" fields in mine; one in the JSON root and one under protection/macs.

The layout looks like this:

Code: Select all

{
	"browser":{
		"show_home_button":true
	},
	"extensions":{
		[AND THEN A BUNCH OF EXTENSION SETTINGS]
	},
	"google":{
		"services":{
			"account_id":"[21-DIGIT NUMBER]",
			"last_account_id":"[21-DIGIT NUMBER]",
			"last_username":"[MY EMAIL]"
		}
	},
	"homepage":"http://www.google.com/",
	"homepage_is_newtabpage":false,
	"media":{
		"storage_id_salt":"[SOME LONG HEXADECIMAL STRING]"
	},
	"pinned_tabs":[],
	"protection":{
		"macs":{
			"browser":{
				"show_home_button":"[SOME LONG HEXADECIMAL STRING]"
			},
			"default_search_provider_data":{
				"template_url_data":"[SOME LONG HEXADECIMAL STRING]"
			},
			"extensions":{
				"settings":{
					[SHORT EXTENSION NAMES AND LONG HEXADECIMAL STRINGS]
				}
			},
			"google":{
				"services":{
					"account_id":"[SOME LONG HEXADECIMAL STRING]",
					"last_account_id":"[SOME LONG HEXADECIMAL STRING]",
					"last_username":"[SOME LONG HEXADECIMAL STRING]",
					"username":"[SOME LONG HEXADECIMAL STRING]"
				}
			},
			"homepage":"[SOME LONG HEXADECIMAL STRING]",
			"homepage_is_newtabpage":"[SOME LONG HEXADECIMAL STRING]",
			"media":{
				"storage_id_salt":"[SOME LONG HEXADECIMAL STRING]"
			},
			"module_blacklist_cache_md5_digest":"[SOME LONG HEXADECIMAL STRING]",
			"pinned_tabs":"[SOME LONG HEXADECIMAL STRING]",
			"prefs":{
				"preference_reset_time":"[SOME LONG HEXADECIMAL STRING]"
			},
			"safebrowsing":{
				"incidents_sent":"[SOME LONG HEXADECIMAL STRING]"
			},
			"search_provider_overrides":"[SOME LONG HEXADECIMAL STRING]",
			"session":{
				"restore_on_startup":"[SOME LONG HEXADECIMAL STRING]",
				"startup_urls":"[SOME LONG HEXADECIMAL STRING]"
			},
			"settings_reset_prompt":{
				"last_triggered_for_default_search":"[SOME LONG HEXADECIMAL STRING]",
				"last_triggered_for_homepage":"[SOME LONG HEXADECIMAL STRING]",
				"last_triggered_for_startup_urls":"[SOME LONG HEXADECIMAL STRING]",
				"prompt_wave":"[SOME LONG HEXADECIMAL STRING]"
			},
			"software_reporter":{
				"prompt_seed":"[SOME LONG HEXADECIMAL STRING]",
				"prompt_version":"[SOME LONG HEXADECIMAL STRING]",
				"reporting":"[SOME LONG HEXADECIMAL STRING]"
			}
		},
		"super_mac":"[SOME LONG HEXADECIMAL STRING]"
	},
	"session":{
		"restore_on_startup":5,
		"startup_urls":["http://www.google.com/"]
	},
	"settings_reset_prompt":{
		"prompt_wave":20190301
	}
}

aGerman
Expert
Posts: 3669
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Change chrome homepage using batch

#18 Post by aGerman » 30 Mar 2019 05:55

If you want to help out then make a backup and try if it would even work if you change the readable values by hand. If that doesn't work because the hex strings are some kind of hash keys then we rather shouldn't waste our time any longer :wink:

Steffen

ShadowThief
Expert
Posts: 901
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Change chrome homepage using batch

#19 Post by ShadowThief » 31 Mar 2019 17:55

It seems that the contents of the file change based on whether or not Chrome is open, and manually editing the file just ends up corrupting the Chrome settings. Not worth pursuing this line any further, I think.

Post Reply