Added:
trunk/NiftyPerforceSetup/InstallNiftyPerforce.vbs
trunk/NiftyPerforceSetup/UninstallNiftyPerforce.vbs
trunk/NiftySolutionSetup/InstallNiftySolution.vbs
trunk/NiftySolutionSetup/UninstallNiftySolution.vbs
Modified:
trunk/Build/Experimental_NiftyPerforce.msi
trunk/Build/Experimental_NiftySolution.msi
trunk/NiftyPerforceSetup/NiftyPerforceSetup.vdproj
trunk/NiftySolutionSetup/NiftySolutionSetup.vdproj
Log:
- Added custom actions when installing and uninstalling to call visual
studio and ask it to reset the addin.
Modified: trunk/Build/Experimental_NiftyPerforce.msi
==============================================================================
Binary files. No diff available.
Modified: trunk/Build/Experimental_NiftySolution.msi
==============================================================================
Binary files. No diff available.
Added: trunk/NiftyPerforceSetup/InstallNiftyPerforce.vbs
==============================================================================
--- (empty file)
+++ trunk/NiftyPerforceSetup/InstallNiftyPerforce.vbs Tue Jul 7 22:51:01
2009
@@ -0,0 +1,24 @@
+' Some references:
+' http://www.herongyang.com/VBScript/
+' http://www.edgewordstraining.co.uk/downloads/howto.pdf
+'
+
+'
+' Given a visual studio version and a full path to a plugin (C# class
name) we can unregister the plugin properly.
+'
+Sub ResetPlugin(ByVal vsVersion, ByVal pluginName)
+ Set shell = CreateObject("WScript.Shell")
+
+ On Error Resume Next
+ installDir8 = shell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\" &
vsVersion & "\InstallDir")
+ On Error Goto 0
+
+ If installDir8 <> "" Then
+ commandline = Chr(34) & installDir8 & "devenv.exe" & Chr(34) & "
/ResetAddIn " & pluginName & " /command File.Exit"
+ shell.Run commandline, 2, true
+ End If
+ Set shell = Nothing
+End Sub
+
+Call ResetPlugin("8.0", "Aurora.NiftyPerforce.Connect")
+Call ResetPlugin("9.0", "Aurora.NiftyPerforce.Connect")
Modified: trunk/NiftyPerforceSetup/NiftyPerforceSetup.vdproj
==============================================================================
--- trunk/NiftyPerforceSetup/NiftyPerforceSetup.vdproj (original)
+++ trunk/NiftyPerforceSetup/NiftyPerforceSetup.vdproj Tue Jul 7 22:51:01
2009
@@ -57,6 +57,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_1B91E47F8ADD4BD990932C4F5B6D057A"
+ "OwnerKey" = "8:_UNDEFINED"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_2FE5992D458D4843922DEC559C9CB206"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -93,6 +99,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_B921CCE9B34A42ED9A13E2CC28B38235"
+ "OwnerKey" = "8:_UNDEFINED"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_C0D52B307C844587A87729FF9183DE13"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -212,6 +224,34 @@
{
"CustomAction"
{
+ "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_6C1B518D78404EDB87D7F859D321EECF"
+ {
+ "Name" = "8:InstallNiftyPerforce.vbs"
+ "Condition" = "8:"
+ "Object" = "8:_1B91E47F8ADD4BD990932C4F5B6D057A"
+ "FileType" = "3:4"
+ "InstallAction" = "3:1"
+ "Arguments" = "8:"
+ "EntryPoint" = "8:"
+ "Sequence" = "3:1"
+ "Identifier" = "8:_CD0EAFB3_2ACC_4313_B624_6AC30E81FC3C"
+ "InstallerClass" = "11:FALSE"
+ "CustomActionData" = "8:"
+ }
+ "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_D1F46F13AB93478DA9B2F2EDF104C66B"
+ {
+ "Name" = "8:UninstallNiftyPerforce.vbs"
+ "Condition" = "8:"
+ "Object" = "8:_B921CCE9B34A42ED9A13E2CC28B38235"
+ "FileType" = "3:4"
+ "InstallAction" = "3:4"
+ "Arguments" = "8:"
+ "EntryPoint" = "8:"
+ "Sequence" = "3:1"
+ "Identifier" = "8:_FD170665_1517_4921_A541_EF2E30F1F6A2"
+ "InstallerClass" = "11:FALSE"
+ "CustomActionData" = "8:"
+ }
}
"DefaultFeature"
{
@@ -317,6 +357,26 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1B91E47F8ADD4BD990932C4F5B6D057A"
+ {
+ "SourcePath" = "8:InstallNiftyPerforce.vbs"
+ "TargetName" = "8:InstallNiftyPerforce.vbs"
+ "Tag" = "8:"
+ "Folder" = "8:_E691877D460E426F9157CFEA6798ADAA"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:FALSE"
+ "IsDependency" = "11:FALSE"
+ "IsolateTo" = "8:"
+ }
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2FE5992D458D4843922DEC559C9CB206"
{
"SourcePath" = "8:..\\NiftyPerforce\\NiftyPerforce.AddIn"
@@ -428,6 +488,26 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B921CCE9B34A42ED9A13E2CC28B38235"
+ {
+ "SourcePath" = "8:UninstallNiftyPerforce.vbs"
+ "TargetName" = "8:UninstallNiftyPerforce.vbs"
+ "Tag" = "8:"
+ "Folder" = "8:_E691877D460E426F9157CFEA6798ADAA"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:FALSE"
+ "IsDependency" = "11:FALSE"
+ "IsolateTo" = "8:"
+ }
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C0D52B307C844587A87729FF9183DE13"
{
"AssemblyRegister" = "3:1"
@@ -587,7 +667,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:NiftyPerforce"
"ProductCode" = "8:{89542DA5-925D-4DA8-AACC-B24D0116ABC6}"
- "PackageCode" = "8:{A4D3C2D0-F26A-492C-A34D-1E96331BF6EE}"
+ "PackageCode" = "8:{BF692B61-EF70-40ED-AEB7-5D9487E27FFC}"
"UpgradeCode" = "8:{27EC1857-F66F-4B1B-BBE5-1FC273BE51FB}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
Added: trunk/NiftyPerforceSetup/UninstallNiftyPerforce.vbs
==============================================================================
--- (empty file)
+++ trunk/NiftyPerforceSetup/UninstallNiftyPerforce.vbs Tue Jul 7 22:51:01
2009
@@ -0,0 +1,51 @@
+' Some references:
+' http://www.herongyang.com/VBScript/
+' http://www.edgewordstraining.co.uk/downloads/howto.pdf
+'
+
+'
+' Given a visual studio version and a full path to a plugin (C# class
name) we can unregister the plugin properly.
+'
+Sub UnInstallPlugin(ByVal vsVersion, ByVal pluginName)
+ Set shell = CreateObject("WScript.Shell")
+
+ On Error Resume Next
+ installDir8 = shell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\" &
vsVersion & "\InstallDir")
+ On Error Goto 0
+
+ If installDir8 <> "" Then
+ commandline = Chr(34) & installDir8 & "devenv.exe" & Chr(34) & "
/ResetAddIn " & pluginName & " /command File.Exit"
+ 'WScript.StdOut.Writeline commandline
+ shell.Run commandline, 2, true
+ End If
+ Set shell = Nothing
+End Sub
+
+Sub RemoveAddIn(ByVal pluginName)
+ Set shell = CreateObject("WScript.Shell")
+
+ On Error Resume Next
+ appData =
shell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders\AppData")
+ On Error Goto 0
+
+ If appData <> "" Then
+ addinpath = appData & "\Microsoft\MSEnvShared\Addins\" & pluginName
& ".Addin"
+ 'WScript.StdOut.Writeline "About to delete " & addinpath
+
+ Set fso = CreateObject("Scripting.FileSystemObject")
+
+ On Error Resume Next
+ Set file = fso.GetFile(addinpath)
+ file.Delete
+ On Error Goto 0
+
+ End If
+ Set shell = Nothing
+End Sub
+
+'
+' First we need to delete the actual addin file (so that when we call
visual studio the plugin can not be loaded, even found, anymore)
+'
+call RemoveAddIn("NiftyPerforce")
+Call UnInstallPlugin("8.0", "Aurora.NiftyPerforce.Connect")
+Call UnInstallPlugin("9.0", "Aurora.NiftyPerforce.Connect")
Added: trunk/NiftySolutionSetup/InstallNiftySolution.vbs
==============================================================================
--- (empty file)
+++ trunk/NiftySolutionSetup/InstallNiftySolution.vbs Tue Jul 7 22:51:01
2009
@@ -0,0 +1,24 @@
+' Some references:
+' http://www.herongyang.com/VBScript/
+' http://www.edgewordstraining.co.uk/downloads/howto.pdf
+'
+
+'
+' Given a visual studio version and a full path to a plugin (C# class
name) we can unregister the plugin properly.
+'
+Sub ResetPlugin(ByVal vsVersion, ByVal pluginName)
+ Set shell = CreateObject("WScript.Shell")
+
+ On Error Resume Next
+ installDir8 = shell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\" &
vsVersion & "\InstallDir")
+ On Error Goto 0
+
+ If installDir8 <> "" Then
+ commandline = Chr(34) & installDir8 & "devenv.exe" & Chr(34) & "
/ResetAddIn " & pluginName & " /command File.Exit"
+ shell.Run commandline, 2, true
+ End If
+ Set shell = Nothing
+End Sub
+
+Call ResetPlugin("8.0", "Aurora.NiftyPerforce.Connect")
+Call ResetPlugin("9.0", "Aurora.NiftyPerforce.Connect")
Modified: trunk/NiftySolutionSetup/NiftySolutionSetup.vdproj
==============================================================================
--- trunk/NiftySolutionSetup/NiftySolutionSetup.vdproj (original)
+++ trunk/NiftySolutionSetup/NiftySolutionSetup.vdproj Tue Jul 7 22:51:01
2009
@@ -57,12 +57,24 @@
}
"Entry"
{
+ "MsmKey" = "8:_7203C30BFC9848B6B301731A84EF0D15"
+ "OwnerKey" = "8:_UNDEFINED"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_7424DD118E50CD8803642EC6FF6293E1"
"OwnerKey" = "8:_1CECD4FA1A23475A939BEF71746825E4"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
+ "MsmKey" = "8:_776CEEFF2C4048F98CCA86E39A9B35CF"
+ "OwnerKey" = "8:_UNDEFINED"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_7B7DC78AE2E54FEA8B063DC3B5988A53"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -207,6 +219,34 @@
{
"CustomAction"
{
+ "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_31E2BB9252BC4B1DB20C5EDFB2A2BD37"
+ {
+ "Name" = "8:InstallNiftySolution.vbs"
+ "Condition" = "8:"
+ "Object" = "8:_7203C30BFC9848B6B301731A84EF0D15"
+ "FileType" = "3:4"
+ "InstallAction" = "3:1"
+ "Arguments" = "8:"
+ "EntryPoint" = "8:"
+ "Sequence" = "3:1"
+ "Identifier" = "8:_756FD49B_00E1_4F67_BA7B_9E0F44B843F7"
+ "InstallerClass" = "11:FALSE"
+ "CustomActionData" = "8:"
+ }
+ "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_445DDF7BA36447998A9D33E90385AE41"
+ {
+ "Name" = "8:UninstallNiftySolution.vbs"
+ "Condition" = "8:"
+ "Object" = "8:_776CEEFF2C4048F98CCA86E39A9B35CF"
+ "FileType" = "3:4"
+ "InstallAction" = "3:4"
+ "Arguments" = "8:"
+ "EntryPoint" = "8:"
+ "Sequence" = "3:1"
+ "Identifier" = "8:_A38CD717_F27B_4B5A_8794_25FAEA26A8B0"
+ "InstallerClass" = "11:FALSE"
+ "CustomActionData" = "8:"
+ }
}
"DefaultFeature"
{
@@ -321,6 +361,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7203C30BFC9848B6B301731A84EF0D15"
+ {
+ "SourcePath" = "8:InstallNiftySolution.vbs"
+ "TargetName" = "8:InstallNiftySolution.vbs"
+ "Tag" = "8:"
+ "Folder" = "8:_968800FC892341F6AF787DFA7B8D0710"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:FALSE"
+ "IsDependency" = "11:FALSE"
+ "IsolateTo" = "8:"
+ }
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7424DD118E50CD8803642EC6FF6293E1"
{
"AssemblyRegister" = "3:1"
@@ -352,6 +412,26 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_776CEEFF2C4048F98CCA86E39A9B35CF"
+ {
+ "SourcePath" = "8:UninstallNiftySolution.vbs"
+ "TargetName" = "8:UninstallNiftySolution.vbs"
+ "Tag" = "8:"
+ "Folder" = "8:_968800FC892341F6AF787DFA7B8D0710"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:FALSE"
+ "IsDependency" = "11:FALSE"
+ "IsolateTo" = "8:"
+ }
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7B7DC78AE2E54FEA8B063DC3B5988A53"
{
"SourcePath" = "8:..\\AUTHORS"
@@ -582,7 +662,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:NiftySolution"
"ProductCode" = "8:{EC84E866-6A22-4F0A-82C1-EE5BED8913C1}"
- "PackageCode" = "8:{E261A332-1EA3-46ED-9B99-84DB4A9F11E9}"
+ "PackageCode" = "8:{C86DDA7C-50EF-4A3E-AEFF-FAAE45D9A701}"
"UpgradeCode" = "8:{F24AA19A-57F0-4280-9EA2-9C246A97640D}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:FALSE"
Added: trunk/NiftySolutionSetup/UninstallNiftySolution.vbs
==============================================================================
--- (empty file)
+++ trunk/NiftySolutionSetup/UninstallNiftySolution.vbs Tue Jul 7 22:51:01
2009
@@ -0,0 +1,52 @@
+' Some references:
+' http://www.herongyang.com/VBScript/
+' http://www.edgewordstraining.co.uk/downloads/howto.pdf
+'
+
+'
+' Given a visual studio version and a full path to a plugin (C# class
name) we can unregister the plugin properly.
+'
+Sub UnInstallPlugin(ByVal vsVersion, ByVal pluginName)
+ Set shell = CreateObject("WScript.Shell")
+
+ On Error Resume Next
+ installDir8 = shell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\" &
vsVersion & "\InstallDir")
+ On Error Goto 0
+
+ If installDir8 <> "" Then
+ commandline = Chr(34) & installDir8 & "devenv.exe" & Chr(34) & "
/ResetAddIn " & pluginName & " /command File.Exit"
+ 'WScript.StdOut.Writeline commandline
+ shell.Run commandline, 2, true
+ End If
+ Set shell = Nothing
+End Sub
+
+Sub RemoveAddIn(ByVal pluginName)
+ Set shell = CreateObject("WScript.Shell")
+
+ On Error Resume Next
+ appData =
shell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders\AppData")
+ On Error Goto 0
+
+ If appData <> "" Then
+ addinpath = appData & "\Microsoft\MSEnvShared\Addins\" & pluginName
& ".Addin"
+ 'WScript.StdOut.Writeline "About to delete " & addinpath
+
+ Set fso = CreateObject("Scripting.FileSystemObject")
+
+ On Error Resume Next
+ Set file = fso.GetFile(addinpath)
+ file.Delete
+ On Error Goto 0
+
+ End If
+ Set shell = Nothing
+End Sub
+
+'
+' First we need to delete the actual addin file (so that when we call
visual studio the plugin can not be loaded, even found, anymore)
+'
+call RemoveAddIn("NiftySolution")
+
+Call UnInstallPlugin("8.0", "Aurora.NiftySolution.Connect")
+Call UnInstallPlugin("9.0", "Aurora.NiftySolution.Connect")