EasyBB
EasyBB

Reputation: 6554

bat file start open chrome chrome://downloads/

I am trying to open an instance of chrome to the download manager chrome flag. But it's not liking me whatsoever. URL's will work perfectly fine so I know that the chrome flag is not a url so how would we open this part of chrome chrome://downloads/

start /D "C:\Program Files (x86)\Google\Chrome\Application" chrome.exe --new-window "chrome://downloads/"

Upvotes: 3

Views: 3387

Answers (2)

AirElektra
AirElektra

Reputation: 1

Here is the code you can use:

Batch File:

start https://www.google.com/
timeout /t 10
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{TAB}"
%SendKeys% "{c}{h}{r}{o}{m}{e}{:}{/}{/}{d}{o}{w}{n}{l}{o}{a}{d}{s}{/}"
%SendKeys% "{ENTER}"

Upvotes: -1

woxxom
woxxom

Reputation: 73616

Not possible.

Look at StartupBrowserCreator::GetURLsFromCommandLine in the Chromium source code:

      if (policy->IsWebSafeScheme(url.scheme()) ||
          url.SchemeIs(url::kFileScheme) ||
#if defined(OS_CHROMEOS)
          // In ChromeOS, allow any settings page to be specified on the command
          // line. See ExistingUserController::OnLoginSuccess.
          (url.spec().find(chrome::kChromeUISettingsURL) == 0) ||
#else
          ((url.spec().find(std::string(chrome::kChromeUISettingsURL) +
                            chrome::kResetProfileSettingsSubPage) == 0)) ||
#endif
          (url.spec().compare(url::kAboutBlankURL) == 0)) {
        urls.push_back(url);
      }
  • In ChromeOS, any chrome://settings page may be specified on the command line
  • On other platforms only chrome://settings/resetProfileSettings is allowed.
  • Always allowed are all web-safe schemes http://, https://, ftp://, data:, feed, blob:,
    real file paths like c:\something.html and about:blank.

So all chrome:// urls are ignored on the command line with the exception mentioned above.

Upvotes: 4

Related Questions