<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>See what I see.</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/krimakey/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/krimakey/feed.xml</link>
    <description>The ramblings of Kristopher Makey.</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:16:09 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Playing with Genetics</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/playing-with-genetics</link>
      <pubDate>Fri, 03 Sep 2010 11:31:14 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2010/09/03/playing-with-genetics/</guid>
      <description><![CDATA[Genetic Algorithms that is:  I've been toying with the ideas related to adaptive...]]></description>
      <content:encoded><![CDATA[<p>Genetic Algorithms that is:</p>  <p>I've been toying with the ideas related to adaptive &quot;AI&quot;.&#160; The basic idea is:&#160; If you could play a game where the content is adaptive, the game would seem &quot;fresh&quot; longer and you would have more incentive to play the game for an extended period of time.&#160; You can use Genetic algorithms to produce “solutions” to problems automatically….can you then apply genetics algorithms to make games that adapt to the players?&#160; (The answer is “yes”, this isn’t actually a new idea and I’ve already seen research in this area).&#160; However I want to play with some of this stuff, because you learn best by doing things and sometimes you discover things new when you make mistakes doing things you’re trying to learn.</p>  <p>One of the basic requirements of this is to have a “game” that we can control the results of (we want to control the environment and see what the “genetic” aspect will do within it).&#160; So lets define a game where the goal is to &quot;predict&quot; the best move.&#160; One such game we play today is &quot;Rock/Paper/Scissors&quot;.&#160; However I want something that can scale to include 5+ players so I've defined the game &quot;Elements&quot;.</p>  <p>Elements:&#160; Goal - Choose the element that is opposite of the most popularly chosen element.</p>  <p>Element Choices:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/95/50/metablogapi/8713.ElementsGraph_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-95-50-metablogapi/8713.ElementsGraph_5F00_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ElementsGraph" border="0" alt="ElementsGraph" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/95/50/metablogapi/3007.ElementsGraph_thumb.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-95-50-metablogapi/3007.ElementsGraph_5F00_thumb.png" width="197" height="141" /></a> </p>  <p><strong>Basic Round Example</strong></p>  <p>5 Players make a choice: E, A, A, F, W </p>  <p>Result:&#160; The players that chose &quot;Air&quot; lose points, the Player that chose &quot;Earth&quot; gains points.&#160; </p>  <p>The goal:&#160; Over a &quot;set&quot; of rounds, maintain a positive score. </p>  <p>So given this kind of game:&#160; If we create a genetic algorithm for making choices, can we make &quot;smart&quot; players (players that are able to react to predictable patterns, and then adapt when changes in those patterns occur).&#160; </p>  <p>So I developed the game and first produced “dumb” players.&#160; Players that that I could dynamically create, but once created would only choose a predetermined choice. </p>  <p>Then I started working on the Smart players:&#160; I wanted a dynamic command set, so I needed to define the command, which then caused a bunch of refactoring because I realized I didn’t just want simple commands like “Choose Fire” but I also wanted complex commands like “Choose the Opposite of the Last Popular Choice”.</p>  <p>So Once I hooked up the command system, I started by creating “random” entities.&#160; And then finally I included the work to do mutation, rewrite an reproduction.&#160; As part of this work I had to write a “fitness evaluation system”.&#160; Basically you need to know when to stop mutating the genetics because you’ve found a solution.&#160; For this particular program, I want something dynamic so I came up with a “generalized” fitness check.&#160; You can be in one of 3 states:&#160; Postiive, Negative, Neutral.&#160; Also we don’t do full evaluation and mutation every round, but rather at the end of a “set” of rounds.&#160; Due to the nature of the game, in most cases any particular player is more likely to have a negative or neutral score rather than a Positive score…so we really only want to make “incremental” mutations if we’re actually keeping neutral.</p>  <p>Mutations and Reproduction:</p>  <p>There’s any number of ways to do this, I chose the “lazy” route, I have a minor and major mutation option:&#160; Minor mutation includes adding (1 or 0) new commands to the (front or back of the) List.&#160; Major mutation involves reducing the size of the list or adding multiple elements.&#160; </p>  <p>Finally we have a “third” case of mutation which is total replacement.&#160; At the point a command set is replaced, in a genetic sense, those genes “died off”.</p>  <p>Hooking up evaluation and mutation:</p>  <p>I decided that I’d track 2 phases of results and during every evaluation phase, I would look at the past results to determine how much to mutate the command set.&#160; If the current and previous results were negative, we have a “dead end” genetic sequence, it dies (replacement).&#160; If either the current or the previous results were negative, we introduce a major mutation.&#160; If we have only neutral and positive results, we introduce a minor mutation and if we only have positive results we don’t change (though we may reproduce if we run a reproduction phase).</p>  <p>And finally, if a command set gets too big, we cause a major mutation (which will reduce the size).&#160; </p>  <p>The final results from initial testing show that given some time, the genetic algorithm can usually stabilize on a solution if there is a stable solution available (simple solutions like “don’t pick Element X or do pick Element X”.&#160; If there are multiple “dynamic” entities involved, it’s possible that they may extend the length of time or make the system unable to stabilize.&#160; </p>  <p>My test app is a bit ugly, but here’s a screen shot of what it looks like:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/95/50/metablogapi/6661.GeneticTestExample_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-95-50-metablogapi/6661.GeneticTestExample_5F00_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="GeneticTestExample" border="0" alt="GeneticTestExample" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/95/50/metablogapi/4527.GeneticTestExample_thumb.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-95-50-metablogapi/4527.GeneticTestExample_5F00_thumb.png" width="956" height="750" /></a> </p>  <p>Possible Future investigation:&#160; Can I get a smart player to predict complex patterns (like all of the “dumb” players play the sequence: Earth, Air, Fire, Water. </p>  <p>I hope you enjoyed my story about delving into genetic algorithms, thanks for reading.</p>  <p>-Kris-</p>]]></content:encoded>
    </item>
    <item>
      <title>The subtle scent of change still wafting in the air.</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/the-subtle-scent-of-change-still-wafting-in-the-air</link>
      <pubDate>Sat, 08 May 2010 02:11:00 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2010/05/08/the-subtle-scent-of-change-still-wafting-in-the-air/</guid>
      <description><![CDATA[So It’s been nearly four years at Microsoft here for me.&#160; I’ve had a great tenure working on...]]></description>
      <content:encoded><![CDATA[<p>So It’s been nearly four years at Microsoft here for me.&#160; I’ve had a great tenure working on VSTO, but as time moves and things change, so must we.&#160; About a month ago a very interesting opportunity arose that I could not pass up, it has caused me to leave the VSTO team to a different team within the greater Visual Studio umbrella.&#160; My job has changed significantly (I no longer have direct impact on the quality of VSTO) and I’m now under a different title.</p>  <p>But what does it mean?&#160; Most likely for for those who read my blog to hear about VSTO deployment for at least a year or two, not much, VSTO is still a very interesting technology to me, and I maintain contacts with members of that team, so as I have time I will still write about interesting VSTO related information.&#160; I may actually have an easier time blogging because I won’t have to try and remember what is “new and secret” and should not be announced yet.</p>  <p>On the other hand, I now also have access to a whole new area of information, and I may occasionally post interesting stuff about what I’m doing there.&#160; So what am I doing now?&#160; I’m not testing products as my main focus today, rather I’m building stuff for those who do test products.&#160; I’m working as part of an internal group that develops and supports the base test automation tools we use for driving Visual Studio.&#160; So while I am no longer a “Tester” I lost the “t” in my title in the transition, in many ways I'm still very much in the test field.&#160; As for what I will write about?&#160; Most likely I’ll start talking about interesting experiments, interesting automation related bugs and stuff about the fundamentals of smarter automation design.</p>]]></content:encoded>
    </item>
    <item>
      <title>Looking to the future, anticipating the next version of VSTO.</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/looking-to-the-future-anticipating-the-next-version-of-vsto</link>
      <pubDate>Fri, 22 Jan 2010 09:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2010/01/22/looking-to-the-future-anticipating-the-next-version-of-vsto/</guid>
      <description><![CDATA[As we start to see that hazy object that is the “next version” of VSTO coalesce into an actual...]]></description>
      <content:encoded><![CDATA[<p>As we start to see that hazy object that is the “next version” of VSTO coalesce into an actual shippable project, my time and topics of interest have had a chance to increase again.&#160; One of the things current on my mind is “servicing”, specifically, what are the “predictive” measures you should take to as reasonably as possible “future-proof” your solution.</p>  <p>Before I get into any interesting code projects, I’m going to share some thoughts about some of the interesting tidbits that have come across my plate:</p>  <p>This section references statements made in the following post:&#160; <a title="https://blogs.msdn.com/krimakey/archive/2008/04/18/click-once-forced-updates-in-vsto-ii-a-fuller-solution.aspx" href="https://blogs.msdn.com/krimakey/archive/2008/04/18/click-once-forced-updates-in-vsto-ii-a-fuller-solution.aspx">https://blogs.msdn.com/krimakey/archive/2008/04/18/click-once-forced-updates-in-vsto-ii-a-fuller-solution.aspx</a></p>  <p>In a previous post I explored what it would take to duplicate some of the functionality that the ClickOnce deployment API provides.&#160; One of the things that was far from my mind at that point was “what happens in the next version”.&#160; Well, one of the really big changes that has occurred is the location of VSTOInstaller.exe.&#160; If you were to write a VSTO 3.0 solution using my example today, and your customer were to install the next version of VSTO Runtime, there is a good chance your background updates would be broken.&#160;&#160; But all is not lost!</p>  <p>One option is to simply extend the solution to also check for the newest version of VSTOInstaller.&#160; This isn’t ideal since you really don’t want to update your solution every time a new version of VSTO is released to the world.&#160; Unfortunately I can’t provide you with a bulletproof option to handle the next version of VSTO.&#160; What I can do though, is provide enough information that you are more likely to be successful in predicting what the next version is going to look like.</p>  <p>If you install a Beta version of the Visual Studio 2010 Tools for Office Runtime you may note the following installation key:</p> <code>   <p>(x86)</p>    <p>[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTO Runtime Setup\v4]      <br />&quot;Install&quot;=dword:00000001       <br />&quot;InstallerPath&quot;=&quot;C:\\Program Files\\Common Files\\Microsoft Shared\\VSTO\\10.0\\VSTOInstaller.exe&quot;</p>    <p>(x64)</p>    <p>[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VSTO Runtime Setup\v4]      <br />&quot;Install&quot;=dword:00000001       <br />&quot;InstallerPath&quot;=&quot;C:\\Program Files\\Common Files\\Microsoft Shared\\VSTO\\10.0\\VSTOInstaller.exe&quot;</p> </code>  <p>This key is the key to figuring out which (copy) of VSTOInstaller you should be using to install/update your solution.</p>  <p><strong>[DISCLAIMER] Anything in the next section is based on a “best guess” approach based on observation only.&#160; I make no guarantees to the future validity of the method against future versions of the VSTO Runtime.</strong></p>  <p><em>It’s very likely the next version of the VSTO runtime is likely to follow as similar pattern.&#160; Based on this assumption, you should be able to write a fairly resilient bit of code that might reduce the need to make updates to your solution based on changes in the VSTO runtime installation.</em></p>  <p><em>The safest method would be to grab all of the sub keys under [STO Runtime Setup] and iterate through looking for sub keys that contain an InstallerPath value.&#160; Take the highest version you find, and you _probably_ will be safe using that path to invoke VSTOInstaller.&#160; </em></p>  <p><strong>[/DISCLAIMER]</strong></p>  <p>The reason you would want to do this is simple:&#160; VSTO 4.0 was designed to replace the functionality provided by VSTO 3.0.&#160; <strike><font color="#ff0000">If you install VSTO 4.0, and then attempt to install VSTO 3.0, VSTO 3.0 will detect that it does not need to be installed. </font></strike> This means you can no longer make the assumption that your customization will be running only against the VSTO 3.0 runtime.&#160; Additionally, even if your customer installed VSTO 3.0 and then installed VSTO 4.0, installing with the older VSTOInstaller may produce unexpected effects (you may incur some extra processing on the first run (post update) of your customization as some new meta-data that VSTO needs won’t be written).</p>  <p><font color="#ff0000">[Correction 2/3/2010]&#160; After a bit of investigation, it turns out I was incorrect in stating VSTO 4.0 prevents VSTO 3.0 from being installed.&#160; You can install VSTO 3.0 on a machine with VSTO 4.0.&#160; This doesn’t change the basic fact that once VSTO 4.0 ships, you should “plan” for your customizations to be installed on VSTO 4.0 only machines also.&#160; While the Bootstrapper will always cover installation of prerequisites (such as VSTO 3.0) there isn’t a guarantee that it will get run on machines that have VSTO 4.0 on them.&#160; VSTO 4.0 does install the mime handler that makes .vsto files “installable”, depending on the situation, it’s reasonable for a customer to skip running setup.exe program and go right to installation of the customization.</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Where did my permission set controls go?</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/where-did-my-permission-set-controls-go</link>
      <pubDate>Wed, 20 May 2009 08:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2009/05/20/where-did-my-permission-set-controls-go/</guid>
      <description><![CDATA[I’m going to diverge a bit off the VSTO path and talk about a more generic ClickOnce story.&nbsp; If...]]></description>
      <content:encoded><![CDATA[<P>I’m going to diverge a bit off the VSTO path and talk about a more generic ClickOnce story.&nbsp; If you have used ClickOnce in VS 2008 or VS 2005 you may be somewhat familiar with partial trust scenarios and the idea of permission sets.&nbsp; If you do not care about partial trust but instead live in the world of using full-trust (such as VSTO requires) then you can skip this post as it may be irrelevant to you.&nbsp; </P>
<H5>The Setup</H5>
<P>If you haven’t heard yet, we are in the midst of shipping the Beta for VS 2010.&nbsp; You can read more about it here:&nbsp; </P>
<P><A title=https://blogs.msdn.com/somasegar/archive/2009/05/18/visual-studio-2010-and-net-fx-4-beta-1-ships.aspx href="https://blogs.msdn.com/somasegar/archive/2009/05/18/visual-studio-2010-and-net-fx-4-beta-1-ships.aspx" mce_href="https://blogs.msdn.com/somasegar/archive/2009/05/18/visual-studio-2010-and-net-fx-4-beta-1-ships.aspx">https://blogs.msdn.com/somasegar/archive/2009/05/18/visual-studio-2010-and-net-fx-4-beta-1-ships.aspx</A></P>
<P>There are many exciting new features and changes occurring in this cycle.&nbsp; As a product of some of these changes I’ve been seeing a lot of questions about some of the changes being made.&nbsp; I’d like to answer at least one of them now.</P>
<H5>The Question</H5>
<P>“I went to customize my zone permissions and noticed that the control that lists the zone permissions is missing!&nbsp; Is this a bug or is this control moved somewhere else?&nbsp; I need to know how to customized the internet zone so my application will work.&nbsp; How do I do this in VS 2010?”</P>
<P>Here is a screenshot of said control in VS 2008 (on Vista):</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/PermissionPage_2.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/PermissionPage_2.jpg" mce_href="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/PermissionPage_2.jpg"><IMG title=PermissionPage style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=491 alt=PermissionPage src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/PermissionPage_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/PermissionPage_thumb.jpg" width=607 border=0 mce_src="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/PermissionPage_thumb.jpg"></A> </P>
<P>Here is a screenshot from VS2010 Beta 1 (on Server 2008):</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/Permissions2010_2.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/Permissions2010_2.jpg" mce_href="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/Permissions2010_2.jpg"><IMG title=Permissions2010 style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=317 alt=Permissions2010 src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/Permissions2010_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/Permissions2010_thumb.jpg" width=605 border=0 mce_src="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/Wheredidmypermissionsetcontrolsgo_E12F/Permissions2010_thumb.jpg"></A> </P>
<H5>The Short Answer</H5>
<P>This is not a bug, we intentionally removed this control within VS 2010.&nbsp; </P>
<H5>The Long Answer</H5>
<P>So the question itself is just one of the reasons that this control was removed.&nbsp; As it turns out there is an implied functionality/design in this control that confuses developers about how the security model works.&nbsp; Conceptually it is easy to look at this control and assume that you can set a “zone” and then customize the permissions that should work within that zone.&nbsp; But this is not the case and this is where the confusion comes into play.</P>
<P>What this control essentially does is create a Custom Permission Set and compare it to the permission set of a “well known” zone.&nbsp; If you change the setting element to anything other than Zone Default, you’ve defined a “custom” permission set and that is what your application will request.&nbsp; In VS 2008 and VS 2010, this same functionality can be achieved by adding the individual permissions to the &lt;TrustInfo&gt; element in the app.manifest file.&nbsp; In VS 2010, this will be the only way to define a “custom” permission set.&nbsp; You can find an older MSDN article on how to do this here: <A title=https://msdn.microsoft.com/en-us/library/6ad1fshk(VS.80).aspx href="https://msdn.microsoft.com/en-us/library/6ad1fshk(VS.80).aspx" mce_href="https://msdn.microsoft.com/en-us/library/6ad1fshk(VS.80).aspx">https://msdn.microsoft.com/en-us/library/6ad1fshk(VS.80).aspx</A>. </P>
<P>Our belief is that most customers that use this control are under the impression they get some benefit from using the custom sets, but in most cases they are not getting the benefit they believe they are getting.&nbsp; The misconception comes about because the impact of changing things in this control are non-obvious.&nbsp; So let’s break this down into 3 scenarios and describe what happens, why, and alternatives that get the same effect. </P>
<P><STRONG>Target Internet Zone:&nbsp; Do not change anything.</STRONG></P>
<P>If your application really does need only the internet permission set, it will work without a trust prompt as long as you run it from the following zones:&nbsp; Internet, Local Intranet, My Computer.&nbsp; You do not see a trust prompt (assuming your application is signed with a “known” certificate that chains to a Trusted Root Authority) because you have provided “evidence” (the permissions you requested,where it is run from, and a “known” certificate signature) saying your application will only execute within the confines of the functionality allowed for applications that execute within that zone.&nbsp; If your application needs any permissions outside of this zone, it will fail with a “trust/security” error.</P>
<P>In VS 2010, we support this scenario with the current UI, the “Zone your application will be install from:” control is what determines the permissions set.&nbsp; </P>
<P><STRONG>Target Internet Zone:&nbsp; Remove a Permission.</STRONG></P>
<P>You are no longer targeting the “Internet” Permission set but rather a custom set.&nbsp; If your application is published on the internet, local intranet, or my computer zones, it will function without a trust prompt exactly like targeting the internet zone.&nbsp; There is a caveat here, but I will come back to it (See Caveat:&nbsp; Least Permissions).</P>
<P>In VS2010, there are 2 options to achieve this:&nbsp; You could have simply targeted the internet zone <STRONG>or</STRONG> you can define the custom set your application needs in the app.manifest file manually.&nbsp; Our general recommendation is to target the well-known-zone that your application runs from rather than defining custom permission sets.</P>
<P><STRONG>Target Internet Zone:&nbsp; Add a Permission.</STRONG></P>
<P>In this scenario, your customers will get the ClickOnce trust prompt.&nbsp; We believe users of the permission set control fall into this bucket.&nbsp; The reality of the security model is that at this point once you have incurred a trust prompt of any kind you might as well be targeting “full trust” since your end user will not see a difference.</P>
<P>In VS2010, if you cannot run under the permission set of the zone you are targeting, we recommend that you switch your application to requesting full trust.&nbsp; Functionally to the end user, this is exactly the same as if you had targeted a custom set that exceeds the permissions of the zone your application is installed or run from.&nbsp; You can manually configure the custom set using the app.manifest xml file within the project.</P>
<P><STRONG>Caveat:&nbsp; Least Permissions</STRONG></P>
<P>Our team is aware there is a segment of our developer customers that prefers to target the “least” number of permissions required in which to run their application.&nbsp; While we do understand this UI made it much easier to do this, we believe that this segment is familiar enough with permission sets that they are capable of achieving the appropriate settings using the app.manifest xml file.&nbsp; Please continue reading if you would like to understand the other justifications for why this UI was removed.</P>
<P><STRONG>How we came to this final decision (or rather “other aspects involved”):</STRONG></P>
<P>Generally we don’t remove UI or features without good reasons.&nbsp; In this case, we discussed at length with the Security Team about this specific piece of UI.&nbsp; They have indicated to us that they believe the general focus of their customers should be to move away from “custom” permission sets and more to targeting only the well-known permission sets or fully trust. </P>
<P>Beyond the general “this is the direction we want to take this feature,” VS 2010 includes some changes that made removing this UI desirable from a technical perspective.&nbsp; If you have not noticed yet, VS 2010 allows you to target/build and debug solutions against both CLR 2.0 (.NET version 2.0, 3.0 and 3.5) and CLR 4.0 (.NET version 4.0).&nbsp; Visual Studio itself runs against CLR 4.0.&nbsp; In previous cycles, the assumption was that VS would only run against the CLR version it targets, but that assumption is no longer true.&nbsp; As a result, many elements of VS have had to change because VS cannot always rely on the CLR it is running against to provide the correct information for the project (if it targets a different CLR).&nbsp; Our permission set control falls under the bucket of things that functioned on this basic assumption.&nbsp; When we looked at what the cost of changing the design was and how it would impact the overall user story, we determined that it was better for our customers that we removed the UI and focused on improving the other aspects of the product.&nbsp; We feel that the loss of improved functionality (how easy it is to setup custom permissions) did not outweigh the gains we could apply elsewhere.</P>
<P>Thank You for reading.</P>
<P>Kris</P>]]></content:encoded>
    </item>
    <item>
      <title>Enterprise Level Deployment of VSTO Solutions: Deployment Design</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/enterprise-level-deployment-of-vsto-solutions-deployment-design</link>
      <pubDate>Wed, 08 Apr 2009 09:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2009/04/08/enterprise-level-deployment-of-vsto-solutions-deployment-design/</guid>
      <description><![CDATA[It's been a while, I'm not really interested in going to the details of why at the moment, lets dig...]]></description>
      <content:encoded><![CDATA[<p>It's been a while, I'm not really interested in going to the details of why at the moment, lets dig right into the topic.</p>  <p>Generally I focus on more of the technical aspects of what you can do without really talking much about some of the other considerations that should go into make your deployment design decisions.&#160; This post is going to be a little different.&#160; I won't have any nuggets of deployment code or advice on how to achieve specific deployment actions, rather I'm going to cover some of the details that you might want to include into your evaluation before you decide &quot;how&quot; you will deploy your solution.&#160; Essentially this post will be about how to go about designing your deployment (what factors you may have to consider and how they will impact your deployment implementation).</p>  <p>First, some terminology:&#160; I have been known to throw around the following terms and haven't really defined them in any consistent way, so I'm going do so now.</p>  <p><strong>Customer</strong> level solution (customer solutions, customer deployments):&#160; Solutions in this class of products that are released to the general public.&#160; Generally as far as deployment goes, Customer solutions are deployed by some kind of opt-in methodology.&#160; Customer solutions have constraints unique to not always having control of the system in which the solution is installed into.</p>  <p><strong>Small Business</strong> level solution (smb solutions, smb&#160; deployments) :&#160; Solutions in this class of products that target user bases encompassing 10 - 200 clients.&#160; Deployment and installation state may be controlled by a central organization or individual.&#160; SMB solutions generally have some moderate to low-level infrastructure such as an intranet and UNC servers. </p>  <p><strong>Enterprise</strong> level solution (enterprise solutions, enterprise deployments):&#160; Solutions in this class of products will target a set user base of 200-100,000 clients.&#160; Heavy infrastructure is available and both deployment and installation state are controlled by a central organization (IT department) with dedicated resources for management and support.&#160; Constraints on this level are often defined by such issues as infrastructure constraints, machine state preservation and maintenance impact.</p>  <p>I'm going to focus on the enterprise solutions and some of the specific details that an IT department may impose on deployment configuration and maintenance decisions.&#160; Enterprise solutions should have 4 specific phases of a solution's lifetime that should be considered before making deployment design decisions.&#160; These phases are initial rollout, solution maintenance (updating), emergency response and uninstall.&#160;&#160; </p>  <h3>Initial Rollout:</h3>  <p>When considering Initial Rollout, there are a number of factors that should be considered.&#160; One of which is the bandwidth-to-client metric (versus solution size) and the window of opportunity for rollout.&#160; Simply put, how long is it going to take to for every client to download the solution the first time.&#160; Here are some numbers and math.</p>  <p>First, assumptions and caveats:</p>  <p>All numbers here are idealized, actual networking is never as nice as this idealized form.&#160; The assumption for the following graphs is that you are hosting all of the data at 1 machine and the network bandwidth is the idealized out-bandwidth of the publish server.&#160; VSTO solutions may range in size from 100KB to 50MB or more depending on any number of factors involved.&#160; As a reasonable medium point I'm choosing 5MB with the assumption that most solutions will sit somewhere within this upper bound.&#160; </p>  <p>Next, the formula:</p>  <p>Rollout Time = Amount of Data / Speed of Data</p>  <p>Rollout Time (minutes)&#160; = ([number of installs] x [Installation Size]) / ([Bandwidth] x 0.125&#160; x 60)</p>  <p>Bandwidth is generally stated in megabits per second (mb/s), but we need to calculated based on megabytes (MB) and minutes thus the multiplication by 1/8 and by 60.</p>  <p>Finally, Data:</p>  <h5>Solution only installation (no prerequisites)</h5>  <h6><strong>100 megabit network</strong> </h6>  <table style="width: 488pt; border-collapse: collapse" border="0" cellspacing="0" cellpadding="0" width="650"><colgroup><col style="width: 99pt; mso-width-source: userset; mso-width-alt: 4827" width="132" /><col style="width: 145pt; mso-width-source: userset; mso-width-alt: 7058" width="193" /><col style="width: 118pt; mso-width-source: userset; mso-width-alt: 5741" width="157" /><col style="width: 126pt; mso-width-source: userset; mso-width-alt: 6144" width="168" /></colgroup><tbody>     <tr style="height: 15pt" height="20">       <td style="width: 99pt; height: 15pt" class="xl66" height="20" width="132">         <p align="center">Client Machines</p>       </td>        <td style="border-left: medium none; width: 145pt" class="xl66" width="193">         <p align="center">Network Bandwidth (mb/s)</p>       </td>        <td style="border-left: medium none; width: 118pt" class="xl66" width="157">         <p align="center">Installation Size (MB)</p>       </td>        <td style="border-left: medium none; width: 126pt" class="xl66" width="168">         <p align="center">Approximate Rollout Time (minutes)<span style="mso-spacerun: yes">&#160;</span></p>       </td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">200</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">5</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">2</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">500</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">5</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">4</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">5</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">7</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">5000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">5</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">34</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">10000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">5</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">67</td>     </tr>   </tbody></table>  <h6>1 gigabit network</h6>  <table style="width: 488pt; border-collapse: collapse" border="0" cellspacing="0" cellpadding="0" width="650"><colgroup><col style="width: 99pt; mso-width-source: userset; mso-width-alt: 4827" width="132" /><col style="width: 145pt; mso-width-source: userset; mso-width-alt: 7058" width="193" /><col style="width: 118pt; mso-width-source: userset; mso-width-alt: 5741" width="157" /><col style="width: 126pt; mso-width-source: userset; mso-width-alt: 6144" width="168" /></colgroup><tbody>     <tr style="height: 15pt" height="20">       <td style="width: 99pt; height: 15pt" class="xl66" height="20" width="132">         <p align="center">Client Machines</p>       </td>        <td style="border-left: medium none; width: 145pt" class="xl66" width="193">         <p align="center">Network Bandwidth (mb/s)</p>       </td>        <td style="border-left: medium none; width: 118pt" class="xl66" width="157">         <p align="center">Installation Size (MB)</p>       </td>        <td style="border-left: medium none; width: 126pt" class="xl66" width="168">         <p align="center">Approximate Rollout Time (minutes)<span style="mso-spacerun: yes">&#160;</span></p>       </td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">5000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">5</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">4</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">10000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">5</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">7</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">50000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">5</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">34</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">100000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">5</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">67</td>     </tr>   </tbody></table>  <p>However these are the &quot;best case&quot; roll out scenarios give that you may not have all of the prerequisites.&#160; Consider that the following are common prerequisites that you may have to also install:</p>  <p>Office 2007 PIA redist:&#160; 6.82 Mb </p>  <p>VSTOR 3.0 SP1 redist: 3.27 Mb</p>  <h5>Solution, Runtime and PIAs</h5>  <h6>100 megabit network</h6>  <table style="width: 488pt; border-collapse: collapse" border="0" cellspacing="0" cellpadding="0" width="650"><colgroup><col style="width: 99pt; mso-width-source: userset; mso-width-alt: 4827" width="132" /><col style="width: 145pt; mso-width-source: userset; mso-width-alt: 7058" width="193" /><col style="width: 118pt; mso-width-source: userset; mso-width-alt: 5741" width="157" /><col style="width: 126pt; mso-width-source: userset; mso-width-alt: 6144" width="168" /></colgroup><tbody>     <tr style="height: 15pt" height="20">       <td style="width: 99pt; height: 15pt" class="xl66" height="20" width="132">         <p align="center">Client Machines</p>       </td>        <td style="border-left: medium none; width: 145pt" class="xl66" width="193">         <p align="center">Network Bandwidth (mb/s)</p>       </td>        <td style="border-left: medium none; width: 118pt" class="xl66" width="157">         <p align="center">Installation Size (MB)</p>       </td>        <td style="border-left: medium none; width: 126pt" class="xl66" width="168">         <p align="center">Approximate Rollout Time (minutes)<span style="mso-spacerun: yes">&#160;</span></p>       </td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">200</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">15</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">4</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">500</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">15</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">10</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">15</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">20</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">5000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">15</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">10000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">15</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">200</td>     </tr>   </tbody></table>  <h6>1 gigabit network</h6>  <table style="width: 488pt; border-collapse: collapse" border="0" cellspacing="0" cellpadding="0" width="650"><colgroup><col style="width: 99pt; mso-width-source: userset; mso-width-alt: 4827" width="132" /><col style="width: 145pt; mso-width-source: userset; mso-width-alt: 7058" width="193" /><col style="width: 118pt; mso-width-source: userset; mso-width-alt: 5741" width="157" /><col style="width: 126pt; mso-width-source: userset; mso-width-alt: 6144" width="168" /></colgroup><tbody>     <tr style="height: 15pt" height="20">       <td style="width: 99pt; height: 15pt" class="xl66" height="20" width="132">         <p align="center">Client Machines</p>       </td>        <td style="border-left: medium none; width: 145pt" class="xl66" width="193">         <p align="center">Network Bandwidth (mb/s)</p>       </td>        <td style="border-left: medium none; width: 118pt" class="xl66" width="157">         <p align="center">Installation Size (MB)</p>       </td>        <td style="border-left: medium none; width: 126pt" class="xl66" width="168">         <p align="center">Approximate Rollout Time (minutes)<span style="mso-spacerun: yes">&#160;</span></p>       </td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">5000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">15</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">10</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">10000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">15</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">20</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">50000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">15</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">100</td>     </tr>      <tr style="height: 15pt" height="20">       <td style="height: 15pt; border-top: medium none" class="xl65" height="20" align="right">100000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">1000</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">15</td>        <td style="border-left: medium none; border-top: medium none" class="xl65" align="right">200</td>     </tr>   </tbody></table>  <p>What we can draw from these numbers? Nothing specific, these values are based on idealized networking and don't take into consideration a lot of factors that may have a greater impact on your deployment design.&#160; What they do give us though is a basic framework to use as a basis for further discussion.</p>  <p>Specifically, as your organization is bigger or has less infrastructure, there may be value in breaking up the initial roll out into waves or separate deployment sites.&#160; If you have an organization of 10k or more employees, there is a pretty high chance you can use geographic based division to save a lot of pain and allow you to handle the initial rollout in a controlled manner.</p>  <p>Let's move on and talk about some of the other factors that should influence the rollout.&#160; One things that comes to mind in particular is the prerequisites.&#160; By default VSTO publishes a Setup.exe file that is meant to be used to pull prerequisites down to client machines that don't have them installed.&#160; If the prerequisites are not present you may want to roll them out first and possibly even rollout a &quot;dummy&quot; solution that allows you to track the number of successful prerequisite setups.&#160; When you then push out the &quot;real&quot; solution, you only need to worry about the solution itself and not the problems that would be caused by failures in the prerequisites.&#160; </p>  <p>Work habits is another factor you have to consider for initial rollout.&#160; You may consider pre-registration of an Add-in as possible Rollout mechanism, but if you do you should be aware of the impact this specific factor may incur.&#160; Specifically if your clients all connect at the same time or if it is staggered over a period of time there may be a much higher bandwidth cost.&#160; An example graph below compares relative network usage versus Initial connection of clients (the data is made up but it demonstrates the basic idea).</p>  <h5>In this example:</h5>  <p>In this example we have a case where the bandwidth usage of installing the solution on all clients exceeds the capacity of the network infrastructure.&#160; In both &quot;scenarios&quot;&#160; the bandwidth speed and data served is the same, but the final results (and subsequent customer impact)&#160; differ because of usage patterns.&#160; </p>  <p>Scenario A is where a natural Bell curve occurs between 8:00 and 8:30.&#160; Initially only a couple of clients start the installation process at 8:00, at 8:05 more connect, at 8:10 the highest number of clients are connecting (about 50% of the total) and then as time progress fewer clients are connecting.&#160; </p>  <p>Scenario B is where All clients connect at the same moment (at 8:00)</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/EnterpriseLevelDeploymentofVSTOSolutions_FFF6/image_5.png" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/EnterpriseLevelDeploymentofVSTOSolutions_FFF6/image_5.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/EnterpriseLevelDeploymentofVSTOSolutions_FFF6/image_thumb.png" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/EnterpriseLevelDeploymentofVSTOSolutions_FFF6/image_thumb.png" width="672" height="179" /></a> </p>  <p>The key take-away from this example should be the effect that spreading out the install step can have.&#160; In both cases the network usage peaking is causing a delay, but in one case the delay is at least 15 minutes in length for some clients.&#160; If you're in a situation where your clients have common peak times (specifically around startup) you will want to reduce the amount of potential impact your rollout will have.</p>  <p>Now that we've established some of the factors, lets talk about some specific design choices you might make based on how these factors impact your specific deployment story. If you're in an enterprise that is just beginning to rollout .NET 3.5 (or 3.5 SP1) and the VSTO prerequisites, you probably specifically want to roll out the prerequisites ahead of time to ensure that when you finally do roll out your specific solution code there are fewer kinks to work out in both steps.&#160; Using a &quot;test&quot; add-in (specifically on the Application you plan to customize) may help flush out any issues related to initial prerequisite installations.</p>  <p>There are 2 basic paths you might take to propagate the solution out to your clients.&#160; </p>  <p>The ClickOnce method may be used by forcibly installing the prerequisites (which are machine level and require administrative access) and then pushing a ClickOnce registration (of and Add-in) to all user accounts&#160; (for documents, simply making the documents available is the same as registering the add-in).&#160; The first time your solution consumers login on a client machine and start the customized application (or open a customized document) Clickonce will pull down the solution (from the location you specific in the registration) and store in the cache on that machine.&#160; Depending on your user statistics this can result in a installation really bad peaks.&#160; If you find that you might have this kind of peaking behavior there are some specific options you might employ to reduce the rollout impact.&#160; One option is to stagger the registration step.&#160; By introducing the registration in waves you can reduce the &quot;height&quot; of the peaks to something that doesn't significantly impact your user base.&#160; Another option with particularly large rollouts might be to host the solution on different servers.&#160; Doing this breaks up the load but keep in Mind VSTO ClickOnce doesn't really have a good mechanism to allow you to load balance these solution.&#160; Once an installation points to a specific deployment (publish) server, it will always point to that server.&#160; An uninstall and reinstall (on each client) would be necessary to migrate client installations.</p>  <p>The vstolocal method would be the alternative.&#160; Similar to (or possibly using) MSI installations you would copy the customization contents to a specific location on the machine and then push down a registration with the |vstolocal tag.&#160; Using this method would allow you to be more specific about &quot;when&quot; the solution is installed.&#160; With the vstolocal method, the &quot;hard&quot; work is all in getting the client computer properly configured once you've achieved that, the subsequent rollout should just be a matter of &quot;when&quot;.</p>  <p><strong>On trusting the solution:</strong></p>  <p>In both cases, you may want to use certificate trust since it allows you to trust the solution for all users on that machine.&#160; If you do not use a trusted publisher certificate approach, each of your users will incur a trust prompt on the initial execution of the solution on each client (example: Joe would see it on Client A and Client B but Bill who only uses Client B for the customized app only sees the prompt on Client B (though both will see it on Client B)).</p>  <h3>Solution Maintenance:</h3>  <p>Depending on the nature of your solution you may be planning regular updates, infrequent updates or no updates at all.&#160; When considering the design of your deployment story, you should consider how updating is going to impact your usage scenarios. </p>  <p>When using &quot;vstolocal&quot;, updates are entirely based on a push model where you have to push a new version of the manifests and&#160; executable files to each client machine.&#160; Every update in this model will pretty much have the same impact as incurring a solution only initial rollout.</p>  <p>If you use ClickOnce, there are several options for managing updating.&#160; ClickOnce itself allows for determining the frequency of update checks but there are scenarios with this that you may want to consider.&#160; Generally the cost of checking shouldn't be significant issue, when a check is made, only the deployment manifest is downloaded to the client.&#160; Most manifests should be in the 6k - 10k size which means even with a 100 mb/s connection, a 7 second delay would only occur if around 9000 clients attempted to check at the same moment.&#160; It's not really the update check that is likely to cause problems, its those times when an update actually exists to be downloaded (the amount of data and subsequently bandwidth is a magnitude larger).&#160; The same basic network metrics and usage patterns in the initial rollout may have similar impacts on your usage experience so it's a factor you should consider in your design. </p>  <p>One possible method of reducing spiking on &quot;update days&quot; is to stagger when the update checks occur.&#160; This prevents spiking but it also delays when all clients will have the update and can be problematic if older clients can cause problems with newer clients when they share data sources (ex:&#160; your solution access a Database and an update includes a Database Schema change that causes issues when older clients attempt to manipulate data).&#160; </p>  <p>Another potential flaw with staggering updates is relating to a natural tendency for &quot;bunching&quot;.&#160; This is best explained as an example: let us just assume for the sake of this example, profiling indicated that having every client download updates on the same day would over-tax the resources available.&#160; So to mitigate the problem the initial rollout occurred over the course of a week (5 days) and the each client was set to check for updates every 7 days.&#160; So each day of the week, 20% of your clients check for updates first thing in the morning (an assumption that every client opens the application at least 1 time every&#160; (work)day is made here).</p>  <p>The problem occurs whenever vacations or Holidays occur.&#160; Each day that users are not logged into client machines the scheduled checks (for the missed day) to check on the next day.&#160; What this ends up doing is causing bunching up (most likely around the middle of the week).&#160; Here is little example graphic to demonstrate what this might look like:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/EnterpriseLevelDeploymentofVSTOSolutions_FFF6/image_7.png" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/EnterpriseLevelDeploymentofVSTOSolutions_FFF6/image_7.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/EnterpriseLevelDeploymentofVSTOSolutions_FFF6/image_thumb_2.png" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/EnterpriseLevelDeploymentofVSTOSolutions_FFF6/image_thumb_2.png" width="471" height="255" /></a> </p>  <p>Initially in the first week all clients are checking in a consistent pattern and no spike in usage occurs.&#160; However on the second week, Monday and Friday are both Holidays.&#160; On Tuesday 40% of the clients are checking for updates since the 20% from Monday were unable to check on their &quot;designated&quot; day.&#160; Additionally on the third week, due to Monday and the previous Friday being holidays, now 60% of the users are checking for updates on Tuesday (and 0% are checking on Friday and Monday).</p>  <p>One mitigation for this is to delay checking for updates by a larger chunk of time (3 weeks for example) and providing a bigger buffer between each &quot;wave&quot; of updates.&#160; There are other methods you might work around this behavior (rather than using automatic checking, using the ClickOnce API and controlling when update checks occur similar to an earlier blog post I had about creating a &quot;check for updates&quot; button).</p>  <p></p>  <h3>Emergency Response:</h3>  <p>While no one wants to ship a bug or have cases when a solution has been compromised by a virus or hacker, it is important to be aware of what you can do to mitigate the impact when these things occur.&#160; By having a clearly designed response ahead of time, it may be possible to reduce the severity of the impact on your business operations by reducing the response time and window of opportunity for damage.</p>  <p>If you use vstolocal there are 2 specific methods you can take to mitigate a bad customization.&#160; The first option is to disable the solution.&#160; There are 2 methods:&#160; force an uninstall on user startup or an alternative is to simply push the solution certificate into the Untrusted Certificates Store.&#160; One of the subtle behaviors of vstolocal is that trust of the solution is always evaluated at startup.&#160; This works from an administrative (machine) level and doesn't require pushing out any action to specific users.</p>  <p>The other option is to for a registry disable of the customization (set the load behavior to 2).&#160; This works to shut down the solution from automatically starting up and causing further harm but it doesn't prevent users from re-enabling the solution via the com-add-ins dialog in office.&#160; Additionally, disabling the add-in in this method requires pushing the change to every user on every client.&#160; </p>  <p>The second method for vstolocal solutions you might take is to simply force an uninstall of the solution, this prevents the solution from being re-enabled by the user but again incurs a user level action.&#160; This depends on good authoring of your deployment mechanism (I'm assuming this to be an MSI).</p>  <p>If you deployed using ClickOnce, you can't use the Untrusted Certificates store to block/disable existing installs (of the bad update) since security for ClickOnce solutions is only evaluated when we copy the solution contents into the cache.&#160; However you can push out commands to VSTOInstaller to force an install or alter the user level registry to disable the solution (same as described for vstolocal).&#160; </p>  <p>If your solution checks for updates on every run though, you can push out a rollback by simply replacing the &quot;bad&quot; version with the version published previous to it.&#160; Any users who had not updates will not see any effect (they will not have pulled down the &quot;bad&quot; update) and any users who installed the bad version will be rolled back to a working version.</p>  <p>The last option may be to write some code in the initialization of the customization to check for a &quot;halt&quot; registry key in the hklm registry hive.&#160; This allows you to push out a single key to every client machine disabling the solution for every user on that machine...but it does require designing this functionality into the solution immediately.&#160; </p>  <h3>Uninstall:</h3>  <p>Preparing for the end of life for your solution is part of proper deployment design.&#160; When you are looking at Enterprise level solutions, you need to determine how responsive you want the uninstall process to be.&#160; If you use vstolocal deployment, the work for uninstall is achieved by removing the solution files and then further forcing an deletion of the registration of the add-in for each and every user.&#160;&#160; </p>  <p>With ClickOnce Installation, there isn't a specific mechanism built-in for pushing an uninstall out to every user, however VSTOInstaller does support a command line only uninstall.&#160; The command would be something of the format: </p>  <p>%commonprogramfiles%\microsoft shared\VSTO\9.0\VSTOInstaller.exe /Silent /U &quot;{publishlocation...Addin.vsto}&quot;</p>  <p>You probably want to use the silent flag specifically to prevent your users from blocking the uninstall process.</p>  <p>Similar to handling an &quot;emergency response&quot; situation, you may simply want to bake a registry check to cause the solution to uninstall itself.&#160; The problem with this method though is the registry key is left around (assuming it is in the hklm registry hive).</p>  <p>Another possible method for handling the final uninstall:&#160; publish an update that calls VSTOInstaller to uninstall at add-in shutdown.&#160; This this should work because fusion copies the solution executables into a shadow cache during execution (although you may want to ensure no references to (data) files exist at the moment (in execution) you call uninstall).</p>  <p>Thanks for Reading (and being patient enough to stay with me over a long break)</p>  <p>Kris</p>]]></content:encoded>
    </item>
    <item>
      <title>VS 2008 SP1 and VSTO, why you should be seriously considering installation.</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/vs-2008-sp1-and-vsto-why-you-should-be-seriously-considering-installation</link>
      <pubDate>Fri, 03 Oct 2008 12:15:29 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2008/10/03/vs-2008-sp1-and-vsto-why-you-should-be-seriously-considering-installation/</guid>
      <description><![CDATA[I'm not going to go into detail about everything in the VS 2008 SP1 package, but what I would like...]]></description>
      <content:encoded><![CDATA[<p>I'm not going to go into detail about everything in the VS 2008 SP1 package, but what I would like to point out some key deployment features that were added and why you would want to consider installing even if you have a large user base using a base VS 2008 customization.&#160; In this discussion I will refer to things as being RTM (meaning VS 2008 and VSTOR 3.0 Pre SP1) and SP1.</p>  <p><strong>Adding VSTOR 3.0 and .NET 3.5 SP1 Patch Redistributable's:</strong>&#160; </p>  <p>We've added some additional functionality to the base VSTOR 3.0 Runtime that you can actually take advantage with RTM Applications.&#160; As such, if you install the SP1 patch on your development machine, you should be able to include the SP1 patches for both .NET 3.5 and VSTO Runtime 3.0. Adding these patches to the bootstrapper will not upgrade your existing customers but any new customers you have will be able to take advantage of the new functionality without any changes on your end.&#160; Any previously existing customers could re-run the Setup.exe file to receive the upgraded functionality.&#160; </p>  <p>One thing to keep in mind for these changes I'm describing is that the customization itself is not being upgraded, just the runtime it runs on is.&#160; If you have to recompile your customization against the SP1 Runtime to take advantage of a new feature, your customization will not work for your customers who don't install the SP1 patches.</p>  <p><strong>Additional Redistributable Package, the Office 2007 PIAS:</strong></p>  <p>We've authored an Office 2007 PIA installer for general consumption.&#160; In general, Office 2007 will install the PIAs by default, specifically it will install them if you have a .NET Framework installed on your machine at the time you install Office.&#160; The problem with this is that it turns out a lot of you out there still use XP and clean installs of XP do not come with .NET installed.&#160; As such we've included a PIA redist package that you should be able to include.&#160; This package looks for a previous instance of an Office PIA existing on the machine before it does anything that might require elevation.&#160; </p>  <p><strong>Event Logging:</strong></p>  <p>Specifically any deployment errors that occur on your client machines will by default log the error directly into the windows event log.&#160; The functionality here isn't particularly rich, we've basically taken the same information that we display in the &quot;alert dialog&quot; that turning off VSTO_SUPPRESSDISPLAYALERTS enables.&#160; The key here is that you should now be able to excavate what the actual cause of error was even if the issue is resolved before you get a chance to investigate.</p>  <p><strong>Update Cancellation:</strong></p>  <p>In RTM the timeframe in which an update can be &quot;successfully&quot; canceled is very small.&#160; If the user cancels the updated outside of that particular window the VSTO Runtime sees it as an error case and blocks further execution of the customization.&#160; Based on your feedback, we changed this behavior in SP1 such that you should now be able to cancel an update and continue running the previously installed version.&#160;&#160; There are still cases where an error will occur (an example would be if you are installing the customization for the first time) but in general this should be a lot closer to what you guys told us you wanted.</p>  <p>&#160;</p>  <p>Thank You for Reading.</p>  <p>Kris.</p>]]></content:encoded>
    </item>
    <item>
      <title>A day at the movies.</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/a-day-at-the-movies</link>
      <pubDate>Tue, 02 Sep 2008 14:00:40 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2008/09/02/a-day-at-the-movies/</guid>
      <description><![CDATA[It's been quiet.&#160; I've been super busy with a lot of things.&#160; Some things I can talk about...]]></description>
      <content:encoded><![CDATA[<p>It's been quiet.&#160; I've been super busy with a lot of things.&#160; Some things I can talk about and mostly things I can't.&#160; What I can talk about:&#160; I went to PAX this last weekend.&#160; PAX (also known as Penny Arcade Expo) is a big convention for us &quot;gaming&quot; enthusiasts.&#160; When I say &quot;gaming&quot; I mean computer games, board games and of course the run of the old school pen and paper role-playing games (ala Dungeons and Dragons).</p>  <p>PAX is one of those things that helps me recharge once a year, get a bit of a look into what is coming down the pipeline and occasionally just see what other interesting things are going on in the entertainment industries of my choice.&#160; At PAX I tend to focus more on seeing things rather than playing (I usually try a couple of game) there were some very interesting videos of the new stuff coming up and some very compelling demos also.&#160; One thing in particular leapt out at me:&#160; <a href="https://www.popfly.com/">Popfly</a> might be a very inspiring way of easing some of those non-programmer folks into understanding how things are put together.&#160; I completely recommend taking a moment to look at this, especially if you have children you want to get interesting into the whole software industry.&#160; At one point a 12 year old (I think he was 12, may have been younger) was demonstrating his game &quot;apple eater&quot;.&#160; Pretty much a Pac-man clone that he put together.&#160; </p>  <p>So enough with the games, I know most of you are probably more interested in VSTO.&#160; So <a href="https://channel9.msdn.com/posts/funkyonex/New-Features-for-Visual-Studio-2008-Office-Projects-in-SP1/">here</a> is something related to VSTO.&#160;&#160; I have to admit that for me this is kind of an ego boost.&#160; I don't generally put together videos since I feel like I don't have anything worth saving to a camera but when given the opportunity to create one focused on some of the VS 2008 Sp1 features, I couldn't pass it up.&#160; It's pretty short, but there you go.</p>  <p>Thanks for Reading</p>  <p>Kris</p>]]></content:encoded>
    </item>
    <item>
      <title>In the Before of the Beginning: Custom Prerequisites for VSTO ClickOnce (part II).</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/in-the-before-of-the-beginning-custom-prerequisites-for-vsto-clickonce-part-ii</link>
      <pubDate>Wed, 30 Jul 2008 10:00:17 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2008/07/30/in-the-before-of-the-beginning-custom-prerequisites-for-vsto-clickonce-part-ii/</guid>
      <description><![CDATA[In my last post I talked about the first steps to building my Customer Prerequisite.&#160; In it, I...]]></description>
      <content:encoded><![CDATA[<p>In my last post I talked about the first steps to building my Customer Prerequisite.&#160; In it, I built an MSI that would display a message box during the install phase. Here is what Setup1looks like when you run it:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/Setup1inAction_2.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/Setup1inAction_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="516" alt="Setup1inAction" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/Setup1inAction_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/Setup1inAction_thumb.jpg" width="472" border="0" /></a> </p>  <p>It's nothing too ingenious but it gets the job done.</p>  <p>So...here we are with an MSI but I want to be able to somehow integrate this into the setup.exe file that gets created for my VSTO customization.&#160; The first step to doing this is to author some bootstrapper manifests.&#160; Specifically a package.xml file and a product.xml (for each supported language) needs to be created.&#160; Thankfully the is a powertool that will help you do this.&#160; </p>  <p>David Guyer has produced an exellent simple to use UI Tool to help with creating the bootstrapper manifest.&#160; You can get the VS 2008 version of the tool here: <a title="https://www.codeplex.com/bmg/Release/ProjectReleases.aspx?ReleaseId=10652" href="https://www.codeplex.com/bmg/Release/ProjectReleases.aspx?ReleaseId=10652">https://www.codeplex.com/bmg/Release/ProjectReleases.aspx?ReleaseId=10652</a> .&#160; This tool is currently listed as being in Beta and I still had to do some manual work to get everything lined up.&#160; Here are the steps I took:</p>  <ul>   <li>Open BMG for VS 2008 (installed it should show up under the Visual Studio 2008 folder). </li>    <li>Create a new &quot;Package Manifest&quot; Project. </li>    <li>Right Click on the left pane and select [Add Install File] </li>    <li>Select the MSI file via the [Browse] button </li>    <li>Set the Display Name (this will show up in VS) </li>    <li>You can include a text License Agreement file (this will be displayed before the MSI is ran). </li>    <li>Make sure to include a &quot;Success&quot; Exit Code on the Exit Codes tab. </li>    <li>By Default the Hashing method is used under the Security, I did not change this, but you should be aware of it since it means that any changes to MSI after creating the Package Manifests may cause errors. </li>    <li>Click Build. </li> </ul>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/BMG2008_2.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/BMG2008_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="745" alt="BMG2008" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/BMG2008_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/BMG2008_thumb.jpg" width="653" border="0" /></a> </p>  <p>As you can see, I get this warning about the Product Code.&#160; I talked to David Guyer about this and here was his comment:</p>  <p><em>I think once you enter a display name, I try to autogenerate a product code.&#160; Just to help clarify, the bootstrapper&#8217;s product code is not the same as the MSI&#8217;s product code&#8230; so you don&#8217;t need to enter the MSI&#8217;s product code&#8230;&#160; a bootstrapper product code is something typically like &#8220;Microsoft.VisualBasic.Powertoys.1.0&#8221;</em></p>  <p>You can manually add this to the files.&#160; If you go to the build output folder you will see all of the files</p>  <p>So the Product.xml file should look something like this:</p>  <pre class="code"><span style="color: blue">&lt;?</span><span style="color: #a31515">xml </span><span style="color: red">version</span><span style="color: blue">=</span>&quot;<span style="color: blue">1.0</span>&quot; <span style="color: red">encoding</span><span style="color: blue">=</span>&quot;<span style="color: blue">utf-8</span>&quot;<span style="color: blue">?&gt;
&lt;</span><span style="color: #a31515">Product </span><span style="color: red">ProductCode</span><span style="color: blue">=</span>&quot;&quot; <span style="color: red">xmlns</span><span style="color: blue">=</span>&quot;<span style="color: blue">https://schemas.microsoft.com/developer/2004/01/bootstrapper</span>&quot;<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">PackageFiles </span><span style="color: red">CopyAllPackageFiles</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot;<span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">PackageFile </span><span style="color: red">Name</span><span style="color: blue">=</span>&quot;<span style="color: blue">setup1.msi</span>&quot; <span style="color: red">Hash</span><span style="color: blue">=</span>&quot;<span style="color: blue">DD8BF9497F8447128E4F6C72C8D30D8E2871E9BE</span>&quot; <span style="color: blue">/&gt;
  &lt;/</span><span style="color: #a31515">PackageFiles</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Commands </span><span style="color: red">Reboot</span><span style="color: blue">=</span>&quot;<span style="color: blue">Defer</span>&quot;<span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Command </span><span style="color: red">PackageFile</span><span style="color: blue">=</span>&quot;<span style="color: blue">setup1.msi</span>&quot;<span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">ExitCodes</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">ExitCode </span><span style="color: red">Value</span><span style="color: blue">=</span>&quot;<span style="color: blue">0</span>&quot; <span style="color: red">Result</span><span style="color: blue">=</span>&quot;<span style="color: blue">Success</span>&quot; <span style="color: blue">/&gt;
        &lt;</span><span style="color: #a31515">DefaultExitCode </span><span style="color: red">Result</span><span style="color: blue">=</span>&quot;<span style="color: blue">Fail</span>&quot; <span style="color: red">String</span><span style="color: blue">=</span>&quot;<span style="color: blue">Anunexpectedexitcodewasr</span>&quot; <span style="color: red">FormatMessageFromSystem</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: blue">/&gt;
      &lt;/</span><span style="color: #a31515">ExitCodes</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Command</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Commands</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">Product</span><span style="color: blue">&gt;</span></pre>

<p>&#160;</p>

<p>The last steps are to add a Product code to this file and then copy the files in the Build Output folder to the prerequisites directory.</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/PreReqFolderView_2.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/PreReqFolderView_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="259" alt="PreReqFolderView" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/PreReqFolderView_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/PreReqFolderView_thumb.jpg" width="639" border="0" /></a> </p>

<p>The path shown here would be: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\My Custom Prerequisite\ </p>

<p>Once you've done that you should be able to include your custom prerequisite step as if it was just another standard part of your setup.</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/CustomPreReqDialog_2.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/CustomPreReqDialog_2.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="547" alt="CustomPreReqDialog" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/CustomPreReqDialog_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_10C4D/CustomPreReqDialog_thumb.jpg" width="636" border="0" /></a> </p>

<p>I'm going to end with that, it should be enough to get you started on deploying even more powerful and interesting VSTO solutions.</p>

<p>Thank You for reading.</p>

<p>Kris</p>]]></content:encoded>
    </item>
    <item>
      <title>In the Before of the Beginning: Custom Prerequisites for VSTO ClickOnce (part I).</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/in-the-before-of-the-beginning-custom-prerequisites-for-vsto-clickonce-part-i</link>
      <pubDate>Fri, 18 Jul 2008 16:06:53 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2008/07/18/in-the-before-of-the-beginning-custom-prerequisites-for-vsto-clickonce-part-i/</guid>
      <description><![CDATA[In January I talked about using Custom Prerequisites to add a little more specialization to the VSTO...]]></description>
      <content:encoded><![CDATA[<p>In January I talked about using Custom Prerequisites to add a little more specialization to the VSTO ClickOnce experience.&#160; I didn't go too much in depth into this and I've since seen a few comments crop up about them in some of the VSTO community spaces I watch.&#160; So I'm going to go through a basic walk through of how you might go about doing this.&#160; </p>  <p>So first you need to create your custom prerequisite installer.&#160; I believe any executable can be used but for this post I'm going to cover a method where instead of using an &quot;executable&quot; I'm going to build an MSI (Windows Installer).&#160; I might come back to the executable option in another post, but with that lets move on.&#160; </p>  <p>Creating a Custom Prerequisite MSI that does something:</p>  <p>For my first try I actually created a custom .NET DLL that did my prerequisite step (in which I just to display an Message Box to ensure it was working).&#160; To do this I created a C# class library project and added a new &quot;Installer Class&quot; to the solution.&#160;&#160; Here's what the code for that class looks like:</p>  <pre class="code"><span style="color: blue">namespace </span>CustomAction1
{
    [<span style="color: #2b91af">RunInstaller</span>(<span style="color: blue">true</span>)]
    <span style="color: blue">public partial class </span><span style="color: #2b91af">Installer1 </span>: <span style="color: #2b91af">Installer
    </span>{
        <span style="color: blue">public </span>Installer1()
        {
            InitializeComponent();
        }

        <span style="color: blue">public override void </span>Install(<span style="color: #2b91af">IDictionary </span>stateSaver)
        {
            <span style="color: blue">base</span>.Install(stateSaver);
                        
            <span style="color: blue">string </span>messageString = <span style="color: #a31515">&quot;Message Strings: \n&quot;</span>;

            messageString = messageString + <span style="color: #a31515">&quot;Message:&quot;</span>;
            messageString = messageString + <span style="color: blue">this</span>.Context.Parameters[<span style="color: #a31515">&quot;Message&quot;</span>];
            messageString = messageString + <span style="color: #a31515">&quot;\n&quot;</span> + <span style="color: #a31515">&quot;OtherMessage:&quot;</span>;
            messageString = messageString + <span style="color: blue">this</span>.Context.Parameters[<span style="color: #a31515">&quot;OtherMessage&quot;</span>];
            System.Windows.Forms.<span style="color: #2b91af">MessageBox</span>.Show(messageString);
        }
    }
}</pre>
<a href="https://11011.net/software/vspaste"></a>

<p>I built this action and then created a &quot;standard&quot; Windows Installer Project.&#160; I ripped out all of the steps from the MSI project and then added Custom action.&#160; To do this, I added the &quot;Primary Output&quot; of the dll project to the project and then go to the Custom Actions pane via the view option in Setup Project.&#160; </p>

<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_ED65/CustomActionPaneDialogOption_2.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_ED65/CustomActionPaneDialogOption_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="326" alt="CustomActionPaneDialogOption" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_ED65/CustomActionPaneDialogOption_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/krimakey/WindowsLiveWriter/IntheBeforeoftheBeginningCustomPrerequi_ED65/CustomActionPaneDialogOption_thumb.jpg" width="441" border="0" /></a> </p>

<p>Once there I was able to add the &quot;Primary output from CustomAction1&quot; (the dll) as an install custom action.&#160; In the properties window for the custom action (you have to select it) I set the following values:&#160; </p>

<p>CustomActionData = /Message=&quot;Message1&quot; /OtherMessage=&quot;This is the other Message&quot;</p>

<p>InstallerClass = True</p>

<p>And with that I had my CustomAction MSI (I left it labelled &quot;Setup1&quot; in my example).&#160; This is about as simple as it gets and it doesn't nearly cover everything (I didn't implement Uninstall or Update steps).&#160; I believe the &quot;power&quot; in the MSI method is that you can hook into a standardized setup framework and it handles a lot of details you would otherwise need to implement.&#160; This goes a little outside my particular area of expertise and I haven't had time to do the full degree of experimentation to give a definite reasons beyond that yet though.&#160; If anyone is interested in educating me or clarifying anything on this stuff, please feel free to leave a comment.</p>

<p>In the next installment I'll cover how I authored the package manifest files so VS can include this at publish time.&#160;&#160; </p>

<p>My post frequency has been a down a bit lately due to being busy with a lot of things but I am responsive to feedback (I've gotten a littler here and there, please feel free to post any comments or questions here so others may also get the benefit of it).&#160; And with that I'm going to wrap up this post.</p>

<p>Thank You for reading.</p>

<p>Kris</p>]]></content:encoded>
    </item>
    <item>
      <title>MSI VSTO Deployment revealed</title>
      <link>https://docs.microsoft.com/archive/blogs/krimakey/msi-vsto-deployment-revealed</link>
      <pubDate>Mon, 09 Jun 2008 10:30:21 GMT</pubDate>
      <dc:creator><![CDATA[Kris Makey - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/krimakey/2008/06/09/msi-vsto-deployment-revealed/</guid>
      <description><![CDATA[For the past couple of months I have been avoiding talking too much on this blog about about...]]></description>
      <content:encoded><![CDATA[<p>For the past couple of months I have been avoiding talking too much on this blog about about creating &quot;Windows Installer&quot; deployments of VSTO.&#160; I've been avoiding it because we've been working on writing a well-formed paper on how to do this and I wanted to wait for it to come out.&#160; So here's the link to the announcement (includes links to the paper):</p>  <p><a title="https://blogs.msdn.com/vsto/archive/2008/05/29/deploying-office-solutions-with-a-setup-project.aspx" href="https://blogs.msdn.com/vsto/archive/2008/05/29/deploying-office-solutions-with-a-setup-project.aspx">https://blogs.msdn.com/vsto/archive/2008/05/29/deploying-office-solutions-with-a-setup-project.aspx</a></p>  <p>If you're not convinced the ClickOnce deployment model is for you, this is the method you should consider and I recommend reading this paper and looking at the example before proceeding. </p>  <p>That's all I have for the moment, I'm looking for any interesting stories or questions to answer though, so please feel free to send me some feedback.</p>  <p>Thank You for reading.&#160; </p>  <p>-Kris-</p>]]></content:encoded>
    </item>
  </channel>
</rss>