Running script with Chrome
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I'd like to run the script below whenever I run Chrome. The script clears various Chrome settings, and I'd like the setting to be cleared whenever I run Chrome. Is this possible?
Thanks,
Ryan
Edit: If there is a better place to post this question please let me know, I'm new here.
Script:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
New Script:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
timeout 1 /nobreak
start Chrome
google-chrome script
add a comment |
I'd like to run the script below whenever I run Chrome. The script clears various Chrome settings, and I'd like the setting to be cleared whenever I run Chrome. Is this possible?
Thanks,
Ryan
Edit: If there is a better place to post this question please let me know, I'm new here.
Script:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
New Script:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
timeout 1 /nobreak
start Chrome
google-chrome script
1
Why not save as a bat which then starts chrome
– Dave
Jan 29 at 21:48
What about something like this?
– Ryan R
Jan 30 at 1:31
Don't ask me 😊 I suggested something, only you know if it will suffice. Remember this is a Q and A site so if that is right is suggest you post it as an answer
– Dave
Jan 30 at 6:02
add a comment |
I'd like to run the script below whenever I run Chrome. The script clears various Chrome settings, and I'd like the setting to be cleared whenever I run Chrome. Is this possible?
Thanks,
Ryan
Edit: If there is a better place to post this question please let me know, I'm new here.
Script:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
New Script:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
timeout 1 /nobreak
start Chrome
google-chrome script
I'd like to run the script below whenever I run Chrome. The script clears various Chrome settings, and I'd like the setting to be cleared whenever I run Chrome. Is this possible?
Thanks,
Ryan
Edit: If there is a better place to post this question please let me know, I'm new here.
Script:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
New Script:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
timeout 1 /nobreak
start Chrome
google-chrome script
google-chrome script
edited Jan 30 at 1:30
Ryan R
asked Jan 29 at 21:03
Ryan RRyan R
186
186
1
Why not save as a bat which then starts chrome
– Dave
Jan 29 at 21:48
What about something like this?
– Ryan R
Jan 30 at 1:31
Don't ask me 😊 I suggested something, only you know if it will suffice. Remember this is a Q and A site so if that is right is suggest you post it as an answer
– Dave
Jan 30 at 6:02
add a comment |
1
Why not save as a bat which then starts chrome
– Dave
Jan 29 at 21:48
What about something like this?
– Ryan R
Jan 30 at 1:31
Don't ask me 😊 I suggested something, only you know if it will suffice. Remember this is a Q and A site so if that is right is suggest you post it as an answer
– Dave
Jan 30 at 6:02
1
1
Why not save as a bat which then starts chrome
– Dave
Jan 29 at 21:48
Why not save as a bat which then starts chrome
– Dave
Jan 29 at 21:48
What about something like this?
– Ryan R
Jan 30 at 1:31
What about something like this?
– Ryan R
Jan 30 at 1:31
Don't ask me 😊 I suggested something, only you know if it will suffice. Remember this is a Q and A site so if that is right is suggest you post it as an answer
– Dave
Jan 30 at 6:02
Don't ask me 😊 I suggested something, only you know if it will suffice. Remember this is a Q and A site so if that is right is suggest you post it as an answer
– Dave
Jan 30 at 6:02
add a comment |
1 Answer
1
active
oldest
votes
My suggestion is to run your sequence of commands before the Chrome browser launches and after it exits, so you can be assured your systems cleaned if Chrome crashes.
Right click on an empty spot on your Desktop, and choose New then Text Document which will take you to Notepad (unless you changed your default text editor). Then, type in these commands:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
chrome
timeout 10 /nobreak
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
Why the TIMEOUT after Chrome exits? Well, Chrome's doing a lot when it closes, so giving it 10 seconds to finish everything helps make sure it's really closed before the cache, cookies, and history is cleared.
Save and close the file, then right-click it, and rename it to CLEANCHROME.BAT (or anything ending in .BAT).
Changed the script with a timeout and to start Chrome at the end with the start command. Any ideas why the script wouldn't be deleting my history? I Google searched the string "blah blah blah", closed Chrome, ran the script to start it again. This should have earased my history/cookies/cache, but when I typed "b" into the search my blah blah blah string came up. Any ideas there?
– Ryan R
Jan 30 at 1:28
Sorry, don't know why %ChromeDataDir% isn't where your cache is.
– K7AAY
Jan 30 at 2:35
That is where my cache is, it deletes the cache fine. But there must be some other history or cache file somewhere that keeps a record. I don't even use Chrome so I'm not sure why I'm doing all this, lol. Thanks for the help anyway.
– Ryan R
Jan 30 at 18:26
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1399818%2frunning-script-with-chrome%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
My suggestion is to run your sequence of commands before the Chrome browser launches and after it exits, so you can be assured your systems cleaned if Chrome crashes.
Right click on an empty spot on your Desktop, and choose New then Text Document which will take you to Notepad (unless you changed your default text editor). Then, type in these commands:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
chrome
timeout 10 /nobreak
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
Why the TIMEOUT after Chrome exits? Well, Chrome's doing a lot when it closes, so giving it 10 seconds to finish everything helps make sure it's really closed before the cache, cookies, and history is cleared.
Save and close the file, then right-click it, and rename it to CLEANCHROME.BAT (or anything ending in .BAT).
Changed the script with a timeout and to start Chrome at the end with the start command. Any ideas why the script wouldn't be deleting my history? I Google searched the string "blah blah blah", closed Chrome, ran the script to start it again. This should have earased my history/cookies/cache, but when I typed "b" into the search my blah blah blah string came up. Any ideas there?
– Ryan R
Jan 30 at 1:28
Sorry, don't know why %ChromeDataDir% isn't where your cache is.
– K7AAY
Jan 30 at 2:35
That is where my cache is, it deletes the cache fine. But there must be some other history or cache file somewhere that keeps a record. I don't even use Chrome so I'm not sure why I'm doing all this, lol. Thanks for the help anyway.
– Ryan R
Jan 30 at 18:26
add a comment |
My suggestion is to run your sequence of commands before the Chrome browser launches and after it exits, so you can be assured your systems cleaned if Chrome crashes.
Right click on an empty spot on your Desktop, and choose New then Text Document which will take you to Notepad (unless you changed your default text editor). Then, type in these commands:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
chrome
timeout 10 /nobreak
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
Why the TIMEOUT after Chrome exits? Well, Chrome's doing a lot when it closes, so giving it 10 seconds to finish everything helps make sure it's really closed before the cache, cookies, and history is cleared.
Save and close the file, then right-click it, and rename it to CLEANCHROME.BAT (or anything ending in .BAT).
Changed the script with a timeout and to start Chrome at the end with the start command. Any ideas why the script wouldn't be deleting my history? I Google searched the string "blah blah blah", closed Chrome, ran the script to start it again. This should have earased my history/cookies/cache, but when I typed "b" into the search my blah blah blah string came up. Any ideas there?
– Ryan R
Jan 30 at 1:28
Sorry, don't know why %ChromeDataDir% isn't where your cache is.
– K7AAY
Jan 30 at 2:35
That is where my cache is, it deletes the cache fine. But there must be some other history or cache file somewhere that keeps a record. I don't even use Chrome so I'm not sure why I'm doing all this, lol. Thanks for the help anyway.
– Ryan R
Jan 30 at 18:26
add a comment |
My suggestion is to run your sequence of commands before the Chrome browser launches and after it exits, so you can be assured your systems cleaned if Chrome crashes.
Right click on an empty spot on your Desktop, and choose New then Text Document which will take you to Notepad (unless you changed your default text editor). Then, type in these commands:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
chrome
timeout 10 /nobreak
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
Why the TIMEOUT after Chrome exits? Well, Chrome's doing a lot when it closes, so giving it 10 seconds to finish everything helps make sure it's really closed before the cache, cookies, and history is cleared.
Save and close the file, then right-click it, and rename it to CLEANCHROME.BAT (or anything ending in .BAT).
My suggestion is to run your sequence of commands before the Chrome browser launches and after it exits, so you can be assured your systems cleaned if Chrome crashes.
Right click on an empty spot on your Desktop, and choose New then Text Document which will take you to Notepad (unless you changed your default text editor). Then, type in these commands:
set ChromeDataDir=C:UsersRyanAppDataLocalGoogleChromeUser DataDefault
set ChromeCache=%ChromeDataDir%Cache
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
chrome
timeout 10 /nobreak
del /q /s /f "%ChromeCache%*.*"
del /q /f "%ChromeDataDir%*Cookies*.*"
del /q /f "%ChromeDataDir%*History*.*"
Why the TIMEOUT after Chrome exits? Well, Chrome's doing a lot when it closes, so giving it 10 seconds to finish everything helps make sure it's really closed before the cache, cookies, and history is cleared.
Save and close the file, then right-click it, and rename it to CLEANCHROME.BAT (or anything ending in .BAT).
answered Jan 29 at 23:38
K7AAYK7AAY
3,90921638
3,90921638
Changed the script with a timeout and to start Chrome at the end with the start command. Any ideas why the script wouldn't be deleting my history? I Google searched the string "blah blah blah", closed Chrome, ran the script to start it again. This should have earased my history/cookies/cache, but when I typed "b" into the search my blah blah blah string came up. Any ideas there?
– Ryan R
Jan 30 at 1:28
Sorry, don't know why %ChromeDataDir% isn't where your cache is.
– K7AAY
Jan 30 at 2:35
That is where my cache is, it deletes the cache fine. But there must be some other history or cache file somewhere that keeps a record. I don't even use Chrome so I'm not sure why I'm doing all this, lol. Thanks for the help anyway.
– Ryan R
Jan 30 at 18:26
add a comment |
Changed the script with a timeout and to start Chrome at the end with the start command. Any ideas why the script wouldn't be deleting my history? I Google searched the string "blah blah blah", closed Chrome, ran the script to start it again. This should have earased my history/cookies/cache, but when I typed "b" into the search my blah blah blah string came up. Any ideas there?
– Ryan R
Jan 30 at 1:28
Sorry, don't know why %ChromeDataDir% isn't where your cache is.
– K7AAY
Jan 30 at 2:35
That is where my cache is, it deletes the cache fine. But there must be some other history or cache file somewhere that keeps a record. I don't even use Chrome so I'm not sure why I'm doing all this, lol. Thanks for the help anyway.
– Ryan R
Jan 30 at 18:26
Changed the script with a timeout and to start Chrome at the end with the start command. Any ideas why the script wouldn't be deleting my history? I Google searched the string "blah blah blah", closed Chrome, ran the script to start it again. This should have earased my history/cookies/cache, but when I typed "b" into the search my blah blah blah string came up. Any ideas there?
– Ryan R
Jan 30 at 1:28
Changed the script with a timeout and to start Chrome at the end with the start command. Any ideas why the script wouldn't be deleting my history? I Google searched the string "blah blah blah", closed Chrome, ran the script to start it again. This should have earased my history/cookies/cache, but when I typed "b" into the search my blah blah blah string came up. Any ideas there?
– Ryan R
Jan 30 at 1:28
Sorry, don't know why %ChromeDataDir% isn't where your cache is.
– K7AAY
Jan 30 at 2:35
Sorry, don't know why %ChromeDataDir% isn't where your cache is.
– K7AAY
Jan 30 at 2:35
That is where my cache is, it deletes the cache fine. But there must be some other history or cache file somewhere that keeps a record. I don't even use Chrome so I'm not sure why I'm doing all this, lol. Thanks for the help anyway.
– Ryan R
Jan 30 at 18:26
That is where my cache is, it deletes the cache fine. But there must be some other history or cache file somewhere that keeps a record. I don't even use Chrome so I'm not sure why I'm doing all this, lol. Thanks for the help anyway.
– Ryan R
Jan 30 at 18:26
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1399818%2frunning-script-with-chrome%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Why not save as a bat which then starts chrome
– Dave
Jan 29 at 21:48
What about something like this?
– Ryan R
Jan 30 at 1:31
Don't ask me 😊 I suggested something, only you know if it will suffice. Remember this is a Q and A site so if that is right is suggest you post it as an answer
– Dave
Jan 30 at 6:02