Documentation ¶
Index ¶
- func CmdWithoutWindow(name string, args ...string) *exec.Cmd
- func GetLocalLangLoc(defaultLang, defaultLoc string) (string, string)
- func IsSingleInstance(curExeName string) bool
- func IsTaskRunning(exeName string) bool
- func ListenToDelete(ch chan string, cbFunc func(string, error))
- func TaskKill(exeName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLocalLangLoc ¶
GetLocalLangLoc Get-Culture List: http://www.codedigest.com/CodeDigest/207-Get-All-Language-Country-Code-List-for-all-Culture-in-C---ASP-Net.aspx Chinese (Singapore) zh-SG Chinese (People's Republic of China) zh-CN Chinese (Hong Kong S.A.R.) zh-HK Chinese (Macao S.A.R.) zh-MO English (United States) en-US Japanese (Japan) ja-JP
func IsSingleInstance ¶
func IsTaskRunning ¶
func ListenToDelete ¶
ListenToDelete Send the file path which you want to delete to the channel, and then it will start another process by Powershell to delete the file. If you want to delete the executable (self), you can send os.Args[0] "ch" 正常而言您不需要透過此函數來刪除檔案,僅需要`os.Remove()`即可。 此函數的特色:能刪除掉自身執行檔 如果您選擇的是刪除自身執行檔,那麼callbackFunc,不應該寫得太複雜,因為結束動作是直接打開powershell運行, 因此當您的callback要花很多時間,有可能還沒跑完就刪除了
Types ¶
This section is empty.