zenpoy
zenpoy

Reputation: 20126

How to restart chrome browser without getting it crashed

I'm killing the process in order to close chrome.exe but when I re-open, it says that chrome has crashed.

I also tried:

FindWindow $0 "Chrome_WidgetWin_0"
${If} $0 <> 0 
    SendMessage $0 0x0112 0xF060 0
${EndIf}

But it doesn't seems to work

The code is NSIS but it uses WIN32 calls (findwindow, sendmessage).

Thanks

Upvotes: 1

Views: 2055

Answers (1)

zenpoy
zenpoy

Reputation: 20126

To get the correct window that can be closed with WM_SYSCOMMAND you can use:

FindWindow $0 "Chrome_WidgetWin_0" "" "" "Chrome_RenderWidgetHostHWND"
System::Call 'user32::GetParent(i r0)i.s'
pop $0

${If} $0 <> 0 
    SendMessage $0 0x0112 0xF060 0
${EndIf}

But as CodyGray commented, to install a Chrome extension you don't need to restart the browser at all. The documentation is located in Google Chrome Documentation

Upvotes: 4

Related Questions