func (ns *NsightTegra) Uninstall(args ...string) {

	ns.ComponentId = args[0]
	ns.Version = args[1]
	path := `Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall`
	//uninstall the bundle exe
	//uninstall_exe_string := myutils.QueryRegister("Nsight", "QuietUninstallString")
	uninstall_exe_string := myutils.RegQuery(path, "Nsight Tegra", "QuietUninstallString")
	sysroot := os.Getenv("SystemRoot")
	uninstall_exe_string = strings.Replace(strings.Replace(uninstall_exe_string, "\"", "", -1), "/uninstall /quiet", "", 1)
	//fmt.Println("uninstall_exe_string is :", strings.Replace(uninstall_exe_string, "/uninstall /quiet", "", 1))

	if uninstall_exe_string != "" {

		_, e := exec.Command("cmd", "/c", uninstall_exe_string, "/uninstall", "/quiet").Output()
		myutils.CheckError(e)
	}

	//uninstall the msi if still exist

	//uninstall_msi_string := myutils.QueryRegister("NVIDIA*nsight*Tegra", "UninstallString")
	uninstall_msi_string := myutils.RegQuery(path, "Nsight Tegra", "UninstallString")

	if uninstall_msi_string != "" {

		uninstall_msi_string = strings.Replace(uninstall_msi_string, "MsiExec.exe ", "", 1)
		//fmt.Println(sysroot+"/System32/msiexec.exe", "/passive", uninstall_msi_string)
		_, e1 := exec.Command(sysroot+"/System32/msiexec.exe", "/passive", uninstall_msi_string).Output()
		if e1 != nil {
			fmt.Println(e1)
		}

		//fmt.Println("end")
	}
}
Example #2
0
func (b *Battle) Uninstall(args ...string) {

	b.ComponentId = args[0]
	b.Version = args[1]
	b.InstallLocation = filepath.Join(args[2], "Tegra_Graphics_Debugger")
	if myutils.Global_OS == "windows" {
		uninstall_string := myutils.RegQuery(`Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall`, "NVIDIA Tegra Graphics Debugger", "UninstallString")
		//uninstall_string := myutils.QueryRegister("graphics*debugger", "UninstallString")
		//fmt.Println(uninstall_string)
		uninstall_string = strings.Replace(uninstall_string, "MsiExec.exe ", "", 1)
		sysroot := os.Getenv("SystemRoot")
		_, e := exec.Command(sysroot+"/System32/msiexec.exe", "/passive", uninstall_string).Output()
		if e != nil {
			fmt.Println(e)
			os.Exit(2)
		}
		b.InstallLocation = filepath.Join(os.Getenv("ProgramFiles(x86)"), "NVIDIA Corporation")

	} else {
		if myutils.Global_OS == "linux" {
			os.Remove(os.Getenv("HOME") + "/.local/share/applications/tegragraphicsdebugger.desktop")
		}
		os.RemoveAll(b.InstallLocation)
	}
	fmt.Println(b.InstallLocation)
}
Example #3
0
func (b *Battle) Query(args ...string) string {
	b.ComponentId = args[0]
	b.InstallLocation = args[1]
	//revision := myutils.QueryRegister("graphics*debugger", "DisplayVersion")
	revision := myutils.RegQuery(`Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall`, "NVIDIA Tegra Graphics Debugger", "DisplayVersion")
	return revision
}
func (ns *NsightTegra) Query(args ...string) string {
	ns.ComponentId = args[0]
	ns.InstallLocation = args[1]
	//revision := myutils.QRVersion("NsightTegra")
	//revision := myutils.QueryRegister("Nsight Tegra", "DisplayVersion")
	rev := myutils.RegQuery(`Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall`, "Nsight Tegra", "DisplayVersion")
	return rev
}
func (ib *IncrediBuild) Query(args ...string) string {
	ib.ComponentId = args[0]
	ib.InstallLocation = args[1]

	revision := myutils.RegQuery(`Software\Wow6432Node\Xoreax\IncrediBuild`, "Builder", "VersionText")

	return revision
}
func (q *Quadd) Query(args ...string) string {
	q.ComponentId = args[0]
	q.InstallLocation = args[1]
	//revision := myutils.QueryRegister("tegra*system", "DisplayVersion")
	revision := myutils.RegQuery(`Software\Microsoft\Windows\CurrentVersion\Uninstall`, "Tegra System Profiler", "DisplayVersion")

	return revision
}
func (q *Quadd) Uninstall(args ...string) {

	q.ComponentId = args[0]
	q.Version = args[1]
	q.InstallLocation = filepath.Join(args[2], "Tegra_System_Profiler")

	if myutils.Global_OS == "windows" {
		q.InstallLocation = filepath.Join(os.Getenv("ProgramFiles"), "NVIDIA Corporation")
		//uninstall_string := myutils.QueryRegister("tegra*system", "UninstallString")
		uninstall_string := myutils.RegQuery(`Software\Microsoft\Windows\CurrentVersion\Uninstall`, "Tegra System Profiler", "UninstallString")

		uninstall_string = strings.Replace(uninstall_string, "MsiExec.exe ", "", 1)
		sysroot := os.Getenv("SystemRoot")
		_, e := exec.Command(sysroot+"/System32/msiexec.exe", "/passive", uninstall_string).Output()
		myutils.CheckError(e)
	} else {
		if myutils.Global_OS == "linux" {
			os.Remove(os.Getenv("HOME") + "/.local/share/applications/tegrasystemprofiler.desktop")
		}
		os.RemoveAll(q.InstallLocation)
	}
	fmt.Println(q.InstallLocation)
}