This repository was archived by the owner on Jul 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,13 +58,7 @@ public List<Result> Query(Query query)
5858 Action = _ =>
5959 {
6060 if ( _settings . EverythingInstalledPath . FileExists ( ) )
61- {
62- Process . Start ( new ProcessStartInfo
63- {
64- FileName = _settings . EverythingInstalledPath ,
65- Arguments = $ "{ ( _settings . LaunchHidden ? "-startup" : "" ) } "
66- } ) ? . Dispose ( ) ;
67- }
61+ _context . API . OpenDirectory ( _settings . EverythingInstalledPath ) ;
6862
6963 return true ;
7064 }
@@ -113,7 +107,27 @@ private Result CreateResult(string keyword, SearchResult searchResult)
113107 switch ( searchResult . Type )
114108 {
115109 case ResultType . Folder :
116- _context . API . OpenDirectory ( path ) ;
110+ if ( ! _settings . LaunchHidden )
111+ {
112+ _context . API . OpenDirectory ( path ) ;
113+ }
114+ else
115+ {
116+ // Launch hidden is no longer supported due to API change.
117+ // This the default behaviour kept
118+ ProcessStartInfo startInfo = new ProcessStartInfo ( ) ;
119+ //Hide the process
120+ startInfo . UseShellExecute = false ;
121+ startInfo . RedirectStandardOutput = true ;
122+ startInfo . WindowStyle = ProcessWindowStyle . Hidden ;
123+ startInfo . CreateNoWindow = true ;
124+ //Set file and args
125+ startInfo . FileName = "explorer" ;
126+ startInfo . Arguments = $ "\" { path } \" ";
127+ //Start the process
128+ Process proc = Process . Start ( startInfo ) ;
129+ }
130+
117131 break ;
118132 case ResultType . Volume :
119133 case ResultType . File :
You can’t perform that action at this time.
0 commit comments