This doesnt seem possible but I would like to see if I can get it to work. I wrote my original scriptA.vbs and it creates an uninstall file, uninstall.vbs. I am trying to add it into add/remove programs, but it gives me an error. Does it not like vbs files? When I navigate to the registry location everything looks correct. It has my UninstallString does point to the right location. I can put the string out of the registry and run it in the run box and it works fine but I get a general error from add/remove programs when I try to execute.
Set addremShell = CreateObject("WScript.Shell")
userprofile = addremshell.ExpandEnvironmentStrings("%userprofile%")
addremRoot = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
addremWrite = addremRoot & "\My Script"
scriptver = "2.0"
savepath = userprofile & "\Desktop"
addremShell.RegWrite addremWrite "\DisplayName", "Script" & chr(13) & " Script version: " & scriptver, "REG_SZ"
addremShell.RegWrite addremWrite "\Uninstallstring", "" & Chr(34) & savepath & "\Uninstall.vbs" & chr(34), "REG_SZ"
Set addremShell = Nothing
Set addremShell = CreateObject("WScript.Shell")
userprofile = addremshell.ExpandEnvironmentStrings("%userprofile%")
addremRoot = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
addremWrite = addremRoot & "\My Script"
scriptver = "2.0"
savepath = userprofile & "\Desktop"
addremShell.RegWrite addremWrite "\DisplayName", "Script" & chr(13) & " Script version: " & scriptver, "REG_SZ"
addremShell.RegWrite addremWrite "\Uninstallstring", "" & Chr(34) & savepath & "\Uninstall.vbs" & chr(34), "REG_SZ"
Set addremShell = Nothing