Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Launch Chrome with the full path to the executable instead of 'start chrome' #243

Merged
merged 2 commits into from

3 participants

@gruehle
Owner

A couple people have reported a "security error" when starting live development (adobe/brackets#3795). This should resolve that problem.

@bchintx
Collaborator

This change fixes the "Windows Security" - "These files can't be opened" error that I was receiving. I am now able to use Live Preview and Show Developer Tools on my Win7 machine. Yay!

Also, the shell code change looks great.

@redmunds redmunds was assigned
@redmunds redmunds commented on the diff
appshell/appshell_extensions_win.cpp
@@ -353,7 +353,7 @@ int32 OpenLiveBrowser(ExtensionString argURL, bool enableRemoteDebugging)
PROCESS_INFORMATION pi = {0};
// Launch cmd.exe and pass in the arguments
- if (!CreateProcess(_wgetenv(L"COMSPEC"), argsBuf.get(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
+ if (!CreateProcess(NULL, argsBuf.get(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
@redmunds Collaborator

Weren't these lines also added for starting from the command line?

    si.dwFlags = STARTF_USESHOWWINDOW;
    si.wShowWindow = SW_HIDE;

If so, do you still want them?

@gruehle Owner
gruehle added a note

Ah, yes. Good catch. Those lines don't seem to be doing any harm, but they are not needed any more. Removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@redmunds
Collaborator

Done with review.

@gruehle
Owner

Changes pushed. Ready for re-review.

@redmunds
Collaborator

Merging.

@redmunds redmunds merged commit 2e39c27 into from
@redmunds redmunds deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 10, 2013
  1. @gruehle
Commits on May 13, 2013
  1. @gruehle
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 4 deletions.
  1. +2 −4 appshell/appshell_extensions_win.cpp
View
6 appshell/appshell_extensions_win.cpp
@@ -327,7 +327,7 @@ static bool ConvertToShortPathName(std::wstring & path)
int32 OpenLiveBrowser(ExtensionString argURL, bool enableRemoteDebugging)
{
- std::wstring appPath = L"/c start chrome ";
+ std::wstring appPath = GetPathToLiveBrowser();
std::wstring args = appPath;
if (enableRemoteDebugging) {
@@ -348,12 +348,10 @@ int32 OpenLiveBrowser(ExtensionString argURL, bool enableRemoteDebugging)
STARTUPINFO si = {0};
si.cb = sizeof(si);
- si.dwFlags = STARTF_USESHOWWINDOW;
- si.wShowWindow = SW_HIDE;
PROCESS_INFORMATION pi = {0};
// Launch cmd.exe and pass in the arguments
- if (!CreateProcess(_wgetenv(L"COMSPEC"), argsBuf.get(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
+ if (!CreateProcess(NULL, argsBuf.get(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
@redmunds Collaborator

Weren't these lines also added for starting from the command line?

    si.dwFlags = STARTF_USESHOWWINDOW;
    si.wShowWindow = SW_HIDE;

If so, do you still want them?

@gruehle Owner
gruehle added a note

Ah, yes. Good catch. Those lines don't seem to be doing any harm, but they are not needed any more. Removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
return ConvertWinErrorCode(GetLastError());
}
Something went wrong with that request. Please try again.