File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed
Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public partial class Form1 : Form
2525 private Int16 ModeSlow = 5000 ;
2626 private Int16 ModeNormarl = 3000 ;
2727 private Int16 ModeFast = 1000 ;
28- private string VERSION = "v0.10.2 " ;
28+ private string VERSION = "v0.10.3 " ;
2929 private string GITHUB = "https://github.com/Fhwang0926/CoreTracker" ;
3030
3131 private bool mouseDown ;
@@ -697,5 +697,6 @@ private bool toggleTraySetting()
697697
698698
699699
700+
700701
701702
Original file line number Diff line number Diff line change @@ -390,22 +390,23 @@ public void hardwareInfo()
390390 public bool RestartExplorer ( )
391391 {
392392 try {
393- exeCmd ( "taskkill / f / im explorer.exe" ) ;
394- exeCmd ( "start explorer.exe" ) ;
393+ exeCmd ( "taskkill /F /IM explorer.exe" , true ) ;
394+ exeCmd ( "start /B explorer.exe" ) ;
395395 return true ;
396396 } catch ( Exception e ) { Console . WriteLine ( e . ToString ( ) ) ; return false ; }
397397
398398 }
399399
400- public bool exeCmd ( string cmd )
400+ public bool exeCmd ( string cmd , bool isAdmin = false )
401401 {
402402 try
403403 {
404404 Process p = new Process ( ) ;
405405 p . StartInfo . FileName = "cmd.exe" ;
406- p . StartInfo . Arguments = @ "/C " + cmd ;
406+ p . StartInfo . Arguments = "/C " + cmd ;
407407 p . StartInfo . RedirectStandardOutput = false ;
408408 p . StartInfo . UseShellExecute = false ;
409+ if ( isAdmin ) { p . StartInfo . Verb = "runas" ; }
409410 p . Start ( ) ;
410411 p . WaitForExit ( ) ;
411412 return true ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -88,7 +88,6 @@ Section "MainSection" SEC01
8888 File " installer\_uninstall.bat"
8989 File " installer\CoreTrackerHelper.x32.exe"
9090 File " installer\CoreTrackerHelper.x64.exe"
91- File " installer\restart_explorer.bat"
9291 File " README.md"
9392 CreateDirectory " $SMPROGRAMS\CoreTracker"
9493 CreateShortCut " $SMPROGRAMS\CoreTracker\CoreTracker.lnk" " $INSTDIR\CoreTracker.exe"
@@ -144,7 +143,6 @@ Section Uninstall
144143 Delete " $INSTDIR\NULL"
145144 Delete " $INSTDIR\CoreTrackerHelper.x32.exe"
146145 Delete " $INSTDIR\CoreTrackerHelper.x64.exe"
147- Delete " $INSTDIR\restart_explorer.bat"
148146
149147 Delete " $SMPROGRAMS\CoreTracker\Uninstall.lnk"
150148 Delete " $SMPROGRAMS\CoreTracker\Website.lnk"
You can’t perform that action at this time.
0 commit comments