|
|
@@ -10,9 +10,6 @@ import (
|
|
|
)
|
|
|
|
|
|
func CreateShortCut(softPath, shortcutName string) (err error) {
|
|
|
- _, name1 := filepath.Split(softPath)
|
|
|
- ext := filepath.Ext(name1)
|
|
|
- filename := name1[:len(name1)-len(ext)]
|
|
|
startUpFlag := false
|
|
|
userHomeDir, _ := os.UserConfigDir()
|
|
|
startUpList := []string{
|
|
|
@@ -25,7 +22,7 @@ func CreateShortCut(softPath, shortcutName string) (err error) {
|
|
|
if handle.IsDir() {
|
|
|
continue
|
|
|
}
|
|
|
- if strings.Contains(handle.Name(), filename) == true && strings.Contains(handle.Name(), ".lnk") == true {
|
|
|
+ if strings.Contains(handle.Name(), shortcutName) == true && strings.Contains(handle.Name(), ".lnk") == true {
|
|
|
startUpFlag = true
|
|
|
}
|
|
|
}
|