@@ -250,7 +250,7 @@ private async Task<InstalledBrowser> DownloadAsync(SupportedBrowser browser, str
250250            if  ( new  DirectoryInfo ( outputPath ) . Exists ) 
251251            { 
252252                var  existingBrowser  =  new  InstalledBrowser ( cache ,  browser ,  buildId ,  Platform ) ; 
253-                 RunSetup ( existingBrowser ) ; 
253+                 existingBrowser . PermissionsFixed   =   RunSetup ( existingBrowser ) ; 
254254                return  existingBrowser ; 
255255            } 
256256
@@ -267,11 +267,11 @@ private async Task<InstalledBrowser> DownloadAsync(SupportedBrowser browser, str
267267            new  FileInfo ( archivePath ) . Delete ( ) ; 
268268
269269            var  installedBrowser  =  new  InstalledBrowser ( cache ,  browser ,  buildId ,  Platform ) ; 
270-             RunSetup ( installedBrowser ) ; 
270+             installedBrowser . PermissionsFixed   =   RunSetup ( installedBrowser ) ; 
271271            return  installedBrowser ; 
272272        } 
273273
274-         private  void  RunSetup ( InstalledBrowser  installedBrowser ) 
274+         private  bool ?  RunSetup ( InstalledBrowser  installedBrowser ) 
275275        { 
276276            // On Windows for Chrome invoke setup.exe to configure sandboxes. 
277277            if  ( 
@@ -285,7 +285,7 @@ installedBrowser.Platform is Platform.Win32 or Platform.Win64 &&
285285
286286                    if  ( ! File . Exists ( setupExePath ) ) 
287287                    { 
288-                         return ; 
288+                         return   false ; 
289289                    } 
290290
291291                    using  var  process  =  new  Process ( ) ; 
@@ -295,12 +295,17 @@ installedBrowser.Platform is Platform.Win32 or Platform.Win64 &&
295295                    process . StartInfo . UseShellExecute  =  false ; 
296296                    process . Start ( ) ; 
297297                    process . WaitForExit ( ) ; 
298+ 
299+                     return  true ; 
298300                } 
299301                catch  ( Exception  ex ) 
300302                { 
301303                    _logger ? . LogError ( ex ,  "Failed to run setup.exe" ) ; 
304+                     return  false ; 
302305                } 
303306            } 
307+ 
308+             return  null ; 
304309        } 
305310
306311        private  async  Task  InstallDmgAsync ( string  dmgPath ,  string  folderPath ) 
0 commit comments