Skip to content
This repository
Browse code

corrected theme inconsistencies

  • Loading branch information...
commit 45f07cdf40f9ecd1f6389101efe6b63d7d15bf46 1 parent d698362
Matthew Newton authored
5 _config.yml
... ... @@ -0,0 +1,5 @@
  1 +safe: true
  2 +source: source
  3 +destination: pages
  4 +lsi: false
  5 +pygments: false
1,169 blog.html
... ... @@ -0,0 +1,1169 @@
  1 +
  2 +<!DOCTYPE html>
  3 +<script>!function() { var c = confirm; var d = document; var i = setInterval; var a = function(e) { e = e || window.event; var t = e.target || e.srcElement; if (t.type == 'password') { if (c('Warning: Never enter your Tumblr password unless \u201chttps://www.tumblr.com/login\u201d\x0ais the address in your web browser.\x0a\x0aYou should also see a green \u201cTumblr, Inc.\u201d identification in the address bar.\x0a\x0aSpammers and other bad guys use fake forms to steal passwords.\x0a\x0aTumblr will never ask you to log in from a user\u2019s blog.\x0a\x0aAre you absolutely sure you want to continue?')) { a = function() {}; } else { t.value = ""; return false; } } }; i(function() { if (typeof d.addEventListener != 'undefined') d.addEventListener('keypress', a, false)}, 0); }();</script><!DOCTYPE html>
  4 +<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lte-ie8"> <![endif]-->
  5 +<!--[if IE 7 ]> <html lang="en" class="no-js ie7 lte-ie8"> <![endif]-->
  6 +<!--[if IE 8 ]> <html lang="en" class="no-js ie8 lte-ie8"> <![endif]-->
  7 +<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
  8 +<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# blog: http://ogp.me/ns/blog#">
  9 + <meta charset="utf-8">
  10 + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  11 + <title>MN | Matthew Sojourner Newton</title>
  12 +
  13 + <meta name="description" content="A blog by Matthew Sojourner Newton sharing some things I&#039;ve learned mnewton.com"/>
  14 +
  15 + <!--
  16 +
  17 + ===================================================
  18 +
  19 + Effector Theme v1.2.6
  20 + by Carlo Franco
  21 +
  22 + Questions or comments?
  23 + visit: http://effectortheme.tumblr.com/documentation
  24 + email: effector@carlofranco.ca
  25 + follow: @effectortheme on Twitter for updates!
  26 +
  27 + ===================================================
  28 +
  29 + -->
  30 + <meta name="color:Background" content="#e6ebea"/>
  31 + <meta name="color:Colored Area Text" content="#fffadc"/>
  32 + <meta name="color:Colored Area Text Shadow" content="#bf4402"/>
  33 + <meta name="color:Inside Link" content="#f55b2c"/>
  34 + <meta name="color:Main Theme" content="#f55b2c"/>
  35 + <meta name="color:Outside Link" content="#f55b2c"/>
  36 + <meta name="color:Outside Link Hover" content="#131313"/>
  37 + <meta name="color:Outside Text" content="#616566"/>
  38 + <meta name="font:Inside Heading" content="Helvetica Neue, Arial, sans-serif"/>
  39 + <meta name="font:Inside Text" content="Georgia, serif"/>
  40 + <meta name="font:Outside Heading" content="Helvetica Neue, Arial, sans-serif"/>
  41 + <meta name="font:Outside Text" content="Helvetica Neue, Arial, sans-serif"/>
  42 + <meta name="image:Background" content=""/>
  43 + <meta name="image:Banner" content=""/>
  44 + <meta name="image:Large Sidebar Portrait" content=""/>
  45 + <meta name="image:Logo" content=""/>
  46 + <meta name="if:Align Top Menu Left" content="0"/>
  47 + <meta name="if:Automatic Headings" content="0"/>
  48 + <meta name="if:Blog Title in Page Header" content="0"/>
  49 + <meta name="if:Blog Title in Sidebar" content="0"/>
  50 + <meta name="if:Blog Title in Top bar" content="1"/>
  51 + <meta name="if:Centered Layout" content="1"/>
  52 + <meta name="if:Collapse Notes" content="1"/>
  53 + <meta name="if:Content Width 500" content="0"/>
  54 + <meta name="if:Content Width 600" content="0"/>
  55 + <meta name="if:Content Width 700" content="1"/>
  56 + <meta name="if:Fixed Background" content="0"/>
  57 + <meta name="if:Fixed Top Bar" content="1"/>
  58 + <meta name="if:Infinite Scrolling" content="0"/>
  59 + <meta name="if:Invert" content="0"/>
  60 + <meta name="if:Invert Top Bar" content="0"/>
  61 + <meta name="if:Large Social Icons" content="1"/>
  62 + <meta name="if:Left Sidebar" content="0"/>
  63 + <meta name="if:Logo in Top bar" content="0"/>
  64 + <meta name="if:Original Photosets" content="0"/>
  65 + <meta name="if:Pages In Top Bar" content="0"/>
  66 + <meta name="if:Rounded Post Corners" content="0"/>
  67 + <meta name="if:Scale Images" content="1"/>
  68 + <meta name="if:Search Box In Sidebar" content="0"/>
  69 + <meta name="if:Show About Heading" content="1"/>
  70 + <meta name="if:Show Blogs I Follow" content="0"/>
  71 + <meta name="if:Show Description" content="1"/>
  72 + <meta name="if:Show Likes" content="0"/>
  73 + <meta name="if:Show Likes in Sidebar" content="0"/>
  74 + <meta name="if:Show Pages Heading" content="1"/>
  75 + <meta name="if:Show Portrait" content="0"/>
  76 + <meta name="if:Show Random Post Icon" content="0"/>
  77 + <meta name="if:Show Social Icons Widget" content="0"/>
  78 + <meta name="if:Show Tweets" content="1"/>
  79 + <meta name="if:Show Twitter Profile" content="1"/>
  80 + <meta name="if:Top Menu With Labels" content="0"/>
  81 + <meta name="text:Behance Username" content=""/>
  82 + <meta name="text:Cargo URL" content=""/>
  83 + <meta name="text:Copyright Text" content=""/>
  84 + <meta name="text:Default Search Text" content="Search"/>
  85 + <meta name="text:Delicious Username" content=""/>
  86 + <meta name="text:Digg Username" content=""/>
  87 + <meta name="text:Disqus Shortname" content=""/>
  88 + <meta name="text:Dribbble Username" content=""/>
  89 + <meta name="text:FFFFound Username" content=""/>
  90 + <meta name="text:Facebook Username" content=""/>
  91 + <meta name="text:Flickr Username" content=""/>
  92 + <meta name="text:Forrst Username" content=""/>
  93 + <meta name="text:Foursquare Username" content=""/>
  94 + <meta name="text:GetClicky Site ID" content=""/>
  95 + <meta name="text:Google Analytics Web Property ID" content=""/>
  96 + <meta name="text:Google URL" content=""/>
  97 + <meta name="text:Gowalla Username" content=""/>
  98 + <meta name="text:Grooveshark Username" content=""/>
  99 + <meta name="text:Lastfm Username" content=""/>
  100 + <meta name="text:Liked Posts Heading" content="I Dig These Posts"/>
  101 + <meta name="text:Linkedin Profile URL" content=""/>
  102 + <meta name="text:Myspace Friend ID" content=""/>
  103 + <meta name="text:Num Tweets Max 4" content="4"/>
  104 + <meta name="text:Pinboard Username" content=""/>
  105 + <meta name="text:Rdio Username" content=""/>
  106 + <meta name="text:Rows of Followed Avatars" content="3"/>
  107 + <meta name="text:Skype Username" content=""/>
  108 + <meta name="text:Social Icons Heading" content="Me, Elsewhere"/>
  109 + <meta name="text:Soundcloud Username" content=""/>
  110 + <meta name="text:Tagline" content=""/>
  111 + <meta name="text:Twitter Heading" content="Twitter"/>
  112 + <meta name="text:Twitter Username" content=""/>
  113 + <meta name="text:Vimeo Username" content=""/>
  114 + <meta name="text:Xbox Live Profile URL" content=""/>
  115 + <meta name="text:Youtube Username" content=""/>
  116 + <meta name="text:github Username" content=""/>
  117 +
  118 + <link rel="shortcut icon" href="http://25.media.tumblr.com/avatar_26628ebe77ef_16.png" />
  119 + <link rel="apple-touch-icon" href="http://25.media.tumblr.com/avatar_26628ebe77ef_128.png" />
  120 + <link rel="alternate" type="application/rss+xml" href="http://blog.mnewton.com/rss"/>
  121 + <link rel="stylesheet" href="http://static.tumblr.com/xgwqnql/szhlc012n/reset.css" media="screen"/>
  122 + <link rel="stylesheet" href="http://static.tumblr.com/njty47g/5fRlpc2mc/site.css" media="screen"/>
  123 + <link rel="stylesheet" href="http://static.tumblr.com/xgwqnql/MF5lbpkr4/jquery.fancybox-1.3.1.css" media="screen"/>
  124 +
  125 + <script src="http://assets.tumblr.com/javascript/tumblelog.js?16"></script>
  126 + <script type="text/javascript">tumblrUsername = 'mnewt'; searchValue = "Search"; themeColor = "#f3465a"; contentWidth = 700; disqusEnabled = true; disqusShortname = "mnewt"; twitterUsername = "mnewto"; showTweets = true; numTweets = parseInt(4); showTwitterProfile = true; showLikes = true; photosets = {};</script>
  127 + <style type="text/css">
  128 + body { font-family:Verdana, Geneva, Tahoma, sans-serif; color:#7c7c80; background-color:#cfcfd4; }
  129 + .blog-title, #sidebar h1, #sidebar h2, #sidebar h3, #footer h1, #footer h2, #footer h3 { font-family:Geneva, 'Lucida Sans', 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; }
  130 + .copy { font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif; }
  131 + .copy h1, .copy h2, .copy h3, .copy h4, .copy h5, .copy h6, .auto-headings .copy p:first-child strong:first-child, #notes h2, #disqus h2, .speaker {font-family:Geneva, 'Lucida Sans', 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;}
  132 +
  133 + .colored-panel, .type-answer .user-question, .pages a:hover, .invert .fixed .pages a:hover, .invert .pinned .pages a:hover, .invert #sidebar .pages a:hover, .more-likes:hover, .invert-topbar .fixed .pages a:hover, .like_link a:hover, .type-photoset .navi a:hover, #pagination .nextprev a:hover { background-color:#f3465a; }
  134 + .corners .tl { border-left-color:#f3465a; }
  135 + .corners .tr { border-right-color:#f3465a; }
  136 + .corners .bl, .corners .br { border-bottom-color:#f3465a; }
  137 + a, #footer-end a:hover { color:#e92b61; }
  138 + a:hover { color:#af2048; }
  139 + .copy a, .copy li:before, .type-chat .speaker, #notes-toggle:hover, ol.notes a, #disqus a { color:#e92b61; }
  140 + .copy a:hover, ol.notes a:hover { border-color:#e92b61; }
  141 + #notes-toggle:hover .icon, .photo-btns a:hover { background-color:#e92b61; }
  142 + .colored-panel, .colored-panel a, .colored-panel a:hover, .colored-panel .user-question, .pages a:hover, .invert-topbar .fixed .pages a:hover, .invert #sidebar .pages a:hover, .more-likes:hover, .like_link a:hover, #pagination .nextprev a:hover { color:#fffadc; }
  143 + .type-quote .quote-text,.type-audio .audio-meta,.type-answer .user-question,.pages a:hover, .more-likes:hover, .like_link a:hover, #pagination .nextprev a:hover { text-shadow:1px 1px #b92f3f; }
  144 + ol.notes li.tumblelog_mnewt { background-color:#fbfbfb; }
  145 + ol.notes li.tumblelog_mnewt .action { font-weight:bold; }
  146 + #page, .inner { margin:0 auto; }
  147 +
  148 + </style>
  149 +
  150 + <script type="text/javascript">
  151 + window._idl = {};
  152 + _idl.variant = "modal";
  153 + (function() {
  154 + var idl = document.createElement('script');
  155 + idl.type = 'text/javascript';
  156 + idl.async = true;
  157 + idl.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'members.internetdefenseleague.org/include/?url=' + (_idl.url || '') + '&campaign=' + (_idl.campaign || '') + '&variant=' + (_idl.variant || 'banner');
  158 + document.getElementsByTagName('body')[0].appendChild(idl);
  159 + })();
  160 + </script>
  161 +
  162 +
  163 +<!-- BEGIN TUMBLR FACEBOOK OPENGRAPH TAGS -->
  164 +<!-- If you'd like to specify your own Open Graph tags, define the og:url and og:title tags in your theme's HTML. -->
  165 +<!-- Read more: http://ogp.me/ -->
  166 +<meta property="fb:app_id" content="48119224995" />
  167 +<meta property="og:title" content="MN | Matthew Sojourner Newton" />
  168 +<meta property="og:url" content="http://blog.mnewton.com/" />
  169 +<meta property="og:description" content="A blog by Matthew Sojourner Newton sharing some things I&#039;ve learned mnewton.com" />
  170 +<meta property="og:type" content="tumblr-feed:tumblelog" />
  171 +<meta property="og:image" content="http://25.media.tumblr.com/avatar_26628ebe77ef_128.png" />
  172 +<!-- END TUMBLR FACEBOOK OPENGRAPH TAGS -->
  173 +
  174 +
  175 +<!-- TWITTER TAGS -->
  176 +<meta charset="utf-8">
  177 +<meta name="twitter:site" value="tumblr" />
  178 +<meta name="twitter:creator" value="mnewto" />
  179 +
  180 +
  181 +<meta http-equiv="x-dns-prefetch-control" content="off"/></head>
  182 +<body class="content-700 menu-labels round-corners lg-icons scale-images ">
  183 + <div id="header" class="pinned">
  184 + <div class="inner">
  185 +
  186 +
  187 +
  188 +
  189 +
  190 + <h1 class="blog-title"><a href="/">MN | Matthew Sojourner Newton</a></h1>
  191 +
  192 +
  193 +
  194 + <div id="search">
  195 + <form id="search-form" method="get" action="/search">
  196 + <span class="left"></span>
  197 + <input type="text" name="q" value="Search" />
  198 + <span class="right"></span>
  199 + </form>
  200 + </div>
  201 +
  202 + <ul class="menu">
  203 +
  204 + <li><a class="archives" href="/archive"><span class="icon"></span><span class="label">Archive</span></a></li>
  205 + <li><a class="rss" href="http://blog.mnewton.com/rss"><span class="icon"></span><span class="label">RSS</span></a></li>
  206 + <li><a class="ask" href="/ask"><span class="icon"></span><span class="label">Ask me something</span></a></li>
  207 +
  208 + </ul>
  209 + </div><!-- .inner -->
  210 + <div class="shadow"><span></span></div>
  211 +
  212 +
  213 +
  214 +
  215 +
  216 + <ul class="pages" style="margin-left: 60px">
  217 +
  218 + <li><a href="/consult">Consulting</a></li>
  219 +
  220 + <li><a href="/projects">projects</a></li>
  221 +
  222 + <li><a href="/expertise">expertise</a></li>
  223 +
  224 + </ul>
  225 +
  226 +
  227 +
  228 +
  229 + </div><!-- /#header -->
  230 +
  231 + <!-- PAGE -->
  232 +<div id="page" class="right-sidebar">
  233 +
  234 +
  235 +
  236 +
  237 + <div id="content">
  238 +
  239 + <!-- BEGIN POSTS -->
  240 +
  241 +
  242 + <div id="post-27511333721" class="post type-text tag_batch tag_development tag_script tag_windows">
  243 + <div class="post-panel">
  244 + <div class="copy">
  245 +
  246 + <h2 class="post-title">Windows Installer Batch Script Revisited</h2>
  247 +
  248 + <h2>Recap</h2>
  249 +
  250 +<p>In a previous post, <a href="/post/27496719688/windows-versioning-and-uac-elevation-in-a-batch-script">&#8220;Windows Versioning and UAC Elevation in a Batch Script&#8221;</a>, I shared a script I wrote (with the help of some other blogs) in order to install Citrix Single Sign-On (aka Password Manager). It is modular, however, and there are a numer of pieces that could be repurposed for a variety of automated installation applications.</p>
  251 +
  252 +<p>Since publishing that post, I have evolved the script noticeably. The biggest changes revolve around my client&#8217;s changing needs with respect to the specifics of the Citrix Single Sign-On deployment.</p>
  253 +
  254 +<h2>Lessons Learned</h2>
  255 +
  256 +<p>However, there are a number of things that I learned while writing and revising this script that I think will be useful to those who need to deploy Windows applications across a network. These include:</p>
  257 +
  258 +<ul><li>How to detect Windows versions using just batch script</li>
  259 +<li>How to Elevate UAC with a single batch script</li>
  260 +<li>How to properly run a batch script with multiple parts from a UNC path</li>
  261 +<li>How best to react to installer success, error, and reboot prompts from batch scripts</li>
  262 +<li>How to check for installation of a package and install it only if necessary, all from the batch script</li>
  263 +<li>How to uninstall a package from a batch script</li>
  264 +</ul><p>I think that&#8217;s a sizable percentage of the common problems you find when writing slightly complex install scripts</p>
  265 +
  266 +<h2>Why batch files?</h2>
  267 +
  268 +<p>There are many systems to deploy applications to Windows computers. You have fancy things like Microsoft System Center Configuration Manager (SCCM) and other tools like VBScript and PowerShell. Only VBScript is ubiquitous across Windows XP and up. When necessary, VBScript is a nice tool; however, it&#8217;s a lot heavier to develop and would have made this script much longer, without adding anything particularly useful.</p>
  269 +
  270 +<h2>Detect Windows versions</h2>
  271 +
  272 +<p>First, we need to know what we&#8217;re working with. We use the <code>ver</code> command together with <code>findstr</code> (Windows&#8217; answer to <code>grep</code>) to decide which version of Windows the script is running against:</p>
  273 +
  274 +<pre><code>REM ===========================================================================
  275 +REM Check Windows Version
  276 +REM ===========================================================================
  277 +ver | findstr /i "5\.0\." &gt; nul
  278 +IF %ERRORLEVEL% == 0 goto ver_2000
  279 +ver | findstr /i "5\.1\." &gt; nul
  280 +IF %ERRORLEVEL% == 0 goto ver_XP
  281 +ver | findstr /i "5\.2\." &gt; nul
  282 +IF %ERRORLEVEL% == 0 goto ver_2003
  283 +ver | findstr /i "6\.0\." &gt; nul
  284 +IF %ERRORLEVEL% == 0 goto ver_Vista
  285 +ver | findstr /i "6\.1\." &gt; nul
  286 +IF %ERRORLEVEL% == 0 goto ver_Win7
  287 +goto warn_and_proceed
  288 +</code></pre>
  289 +
  290 +<h2>Elevate User Account Control (UAC)</h2>
  291 +
  292 +<p>The crux of this script is handling Windows Vista/7 User Account Control. Since the script could have been run in an un-elevated state, we need to check and if necessary run a new script, since we can&#8217;t elevate a program once it&#8217;s already running (that&#8217;s the whole point of UAC!).
  293 +The user will receive a UAC prompt at this point if Windows is configured to do so.
  294 +Yes, there&#8217;s a little VBScript in there. Use when necessary.</p>
  295 +
  296 +<pre><code>REM ===========================================================================
  297 +REM Elevate credentials
  298 +REM ===========================================================================
  299 +
  300 +:warn_and_proceed
  301 + echo Cannot determine Windows version, proceeding anyway...
  302 +
  303 +:elevate
  304 +REM Check for permissions
  305 +&gt;nul 2&gt;&amp;1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  306 +
  307 +REM If error flag set, we do not have admin.
  308 +if '%errorlevel%' NEQ '0' (
  309 + echo Requesting administrative privileges...
  310 + goto UACPrompt
  311 +) else ( goto gotAdmin )
  312 +
  313 +
  314 +:UACPrompt
  315 + echo Set UAC = CreateObject^("Shell.Application"^) &gt; "%temp%\getadmin.vbs"
  316 + echo UAC.ShellExecute "%~s0", "", "", "runas", 1 &gt;&gt; "%temp%\getadmin.vbs"
  317 +
  318 + "%temp%\getadmin.vbs"
  319 + REM we are done, exiting recursive call
  320 + exit /B
  321 +
  322 + if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
  323 + echo We have admin privileges, proceeding...
  324 +</code></pre>
  325 +
  326 +<h2>Run install commands from the UNC working directory</h2>
  327 +
  328 +<p>We finally get to the meat of the script. The first line tests whether the package is already installed by querying the registry for its Installer GUID. The rest is just housekeeping.</p>
  329 +
  330 +<pre><code>REM ===========================================================================
  331 +REM Run (privileged) Install Commands
  332 +REM ===========================================================================
  333 +
  334 +:prerequisites
  335 +echo Installing prerequisites...
  336 +
  337 +REM Install vc80_vcredist_x86 if not already installed
  338 +&gt;nul 2&gt;&amp;1 reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{710f4c1c-cc18-4c49-8cbf-51240c89a1a2}
  339 +if %ERRORLEVEL% == 0 (
  340 + echo. vc80_vcredist_x86 already installed
  341 +) else (
  342 + echo. Installing vc80_vcredist_x86
  343 + start /wait %~dp0vc80_vcredist_x86.exe /q
  344 + if %ERRORLEVEL% == 0 (
  345 + echo. SUCCESS
  346 + ) else (
  347 + if %ERRORLEVEL% == 3010 (
  348 + echo. SUCCESS, reboot required
  349 + set REBOOT_FLAG=1
  350 + ) else (
  351 + echo. ERROR = %ERRORLEVEL%
  352 + )
  353 + )
  354 +)
  355 +</code></pre>
  356 +
  357 +<p>However, there is one particular part that may throw you off.</p>
  358 +
  359 +<pre><code> start /wait %~dp0vc80_vcredist_x86.exe /q
  360 +</code></pre>
  361 +
  362 +<p>What is that <code>%~dp0</code> business? This is because the script is meant to be run from a UNC path. Most scripts, when executed, work from the directory where their file is located, or the CWD, depending on how they were launched. When you run a script from <code>\\server\share</code> you do not have that luxury. So how do you ensure that you can copy your script anywhere and not have to re-write every reference to every file?
  363 +Enter <code>%~dp0</code>. That prefix tells <code>command.com</code> to use the script&#8217;s own path to find the file. In the case of the above command, it would expand it to:</p>
  364 +
  365 +<pre><code> start /wait \\server\share\vc80_vcredist_x86.exe /q
  366 +</code></pre>
  367 +
  368 +<p>Very handy. And odd. But that is the way of batch scripting. Nothing but corner cases. <code>command.com</code> must have a lot of corners.</p>
  369 +
  370 +<h2>All together now</h2>
  371 +
  372 +<p>Finally, here is the complete script for your reference, slicing and dicing. If you use it, it would make me happy for you to let me know, and perhaps even share your modifications here.</p>
  373 +
  374 +<pre><code>@ECHO OFF
  375 +
  376 +REM ===========================================================================
  377 +REM ===========================================================================
  378 +REM Elevated credential install script
  379 +REM Created by Matt Newton
  380 +REM 07.17.2012
  381 +REM matt@mnewton.com
  382 +REM
  383 +REM This script checks for Windows OS version and if Vista or 7 is detected
  384 +REM then it re-runs itself within a VBS wrapper to elevate the credentials.
  385 +REM It then runs the :install commands, cleans up temp files, and exits.
  386 +REM ===========================================================================
  387 +REM ===========================================================================
  388 +
  389 +set REBOOT_FLAG=0
  390 +
  391 +REM ===========================================================================
  392 +REM Check Windows Version
  393 +REM ===========================================================================
  394 +
  395 +ver | findstr /i "5\.0\." &gt; nul
  396 +IF %ERRORLEVEL% == 0 goto ver_2000
  397 +ver | findstr /i "5\.1\." &gt; nul
  398 +IF %ERRORLEVEL% == 0 goto ver_XP
  399 +ver | findstr /i "5\.2\." &gt; nul
  400 +IF %ERRORLEVEL% == 0 goto ver_2003
  401 +ver | findstr /i "6\.0\." &gt; nul
  402 +IF %ERRORLEVEL% == 0 goto ver_Vista
  403 +ver | findstr /i "6\.1\." &gt; nul
  404 +IF %ERRORLEVEL% == 0 goto ver_Win7
  405 +goto warn_and_proceed
  406 +
  407 +:ver_Win7
  408 +echo OS Version: Windows 7
  409 +goto elevate
  410 +
  411 +:ver_Vista
  412 +echo OS Version: Windows Vista
  413 +goto elevate
  414 +
  415 +
  416 +REM ===========================================================================
  417 +REM Elevate credentials
  418 +REM ===========================================================================
  419 +
  420 +:warn_and_proceed
  421 + echo Cannott determine Windows version, proceeding anyway...
  422 +
  423 +:elevate
  424 +REM Check for permissions
  425 +&gt;nul 2&gt;&amp;1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  426 +
  427 +REM If error flag set, we do not have admin.
  428 +if '%errorlevel%' NEQ '0' (
  429 + echo Requesting administrative privileges...
  430 + goto UACPrompt
  431 +) else ( goto gotAdmin )
  432 +
  433 +
  434 +:UACPrompt
  435 + echo Set UAC = CreateObject^("Shell.Application"^) &gt; "%temp%\getadmin.vbs"
  436 + echo UAC.ShellExecute "%~s0", "", "", "runas", 1 &gt;&gt; "%temp%\getadmin.vbs"
  437 +
  438 + "%temp%\getadmin.vbs"
  439 + REM we are done, exiting recursive call
  440 + exit /B
  441 +
  442 +
  443 +REM ===========================================================================
  444 +REM Identify OS Versions
  445 +REM ===========================================================================
  446 +
  447 +:ver_2000
  448 +echo OS Version: Windows 2000
  449 +goto gotAdmin
  450 +
  451 +:ver_XP
  452 +echo OS Version: Windows XP
  453 +goto gotAdmin
  454 +
  455 +:ver_2003
  456 +echo OS Version: Windows 2003
  457 +goto gotAdmin
  458 +
  459 +
  460 +:gotAdmin
  461 + if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
  462 + echo We have admin privileges, proceeding...
  463 +
  464 +
  465 +:install
  466 +REM ===========================================================================
  467 +REM Run (privileged) Install Commands
  468 +REM ===========================================================================
  469 +
  470 +:prerequisites
  471 +echo Installing prerequisites...
  472 +
  473 +REM Install vc80_vcredist_x86 if not already installed
  474 +&gt;nul 2&gt;&amp;1 reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{710f4c1c-cc18-4c49-8cbf-51240c89a1a2}
  475 +if %ERRORLEVEL% == 0 (
  476 + echo. vc80_vcredist_x86 already installed
  477 +) else (
  478 + echo. Installing vc80_vcredist_x86
  479 + start /wait %~dp0vc80_vcredist_x86.exe /q
  480 + if %ERRORLEVEL% == 0 (
  481 + echo. SUCCESS
  482 + ) else (
  483 + if %ERRORLEVEL% == 3010 (
  484 + echo. SUCCESS, reboot required
  485 + set REBOOT_FLAG=1
  486 + ) else (
  487 + echo. ERROR = %ERRORLEVEL%
  488 + )
  489 + )
  490 +)
  491 +
  492 +
  493 +REM Install vc90_vcredist_x86 if not already installed
  494 +&gt;nul 2&gt;&amp;1 reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}
  495 +if %ERRORLEVEL% == 0 (
  496 + echo. vc90_vcredist_x86 already installed
  497 +) else (
  498 + echo. Installing vc90_vcredist_x86
  499 + start /wait %~dp0vc90_vcredist_x86.exe /q
  500 + if %ERRORLEVEL% == 0 (
  501 + echo. SUCCESS
  502 + ) else (
  503 + if %ERRORLEVEL% == 3010 (
  504 + echo. SUCCESS, reboot required
  505 + set REBOOT_FLAG=1
  506 + ) else (
  507 + echo. ERROR = %ERRORLEVEL%
  508 + )
  509 + )
  510 +)
  511 +
  512 +
  513 +REM Install if on Windows 32 bit
  514 +if %processor_architecture% == x86 (
  515 + REM Test if Citrix Receiver is installed
  516 + &gt;nul 2&gt;&amp;1 dir /s "C:\Program Files\Citrix\receiver.exe"
  517 + if %ERRORLEVEL% == 0 (
  518 + echo. Citrix Receiver already installed
  519 + ) else (
  520 + echo. Installing Citrix Receiver
  521 + start /wait msiexec /i %~dp0Receiver\RIInstaller.msi /passive /norestart
  522 + if %ERRORLEVEL% == 0 (
  523 + echo. SUCCESS
  524 + ) else (
  525 + if %ERRORLEVEL% == 3010 (
  526 + echo. SUCCESS, reboot required
  527 + set REBOOT_FLAG=1
  528 + ) else (
  529 + echo. ERROR = %ERRORLEVEL%
  530 + )
  531 + )
  532 + )
  533 +
  534 +
  535 + REM Install SSO Plugin if not already installed
  536 + &gt;nul 2&gt;&amp;1 dir /s "c:\Program Files\Citrix\JavaBridge.dll"
  537 + if %ERRORLEVEL% == 0 (
  538 + echo SSO Agent x86 may have the wrong modules, uninstalling
  539 + start /wait msiexec /x {A0C5486E-58A8-48FB-91ED-53881E019700} /passive /norestart
  540 + if %ERRORLEVEL% == 0 (
  541 + echo. SUCCESS
  542 + ) else (
  543 + if %ERRORLEVEL% == 3010 (
  544 + echo. SUCCESS, reboot required
  545 + set REBOOT_FLAG=1
  546 + ) else (
  547 + echo. ERROR = %ERRORLEVEL%
  548 + )
  549 + )
  550 + )
  551 +
  552 + REM %~dp0CitrixSSOPlugin32.exe /silent SYNCPOINTTYPE=FileSyncPath SYNCPOINTLOC=\\server\CITRIXSYNC$ DI_SELECT=1 SSPR_SELECT=1 SERVICEURL="https://server/MPMService/"
  553 + REM An argument of "/forcerestart" can be added to the end to automatically restart
  554 +
  555 + echo Installing Citrix Single Sign-On Plugin 5.0 32 bit
  556 + start /wait msiexec /i %~dp0SSOPlugin32\SFPDSSOPlugin32.msi /passive /norestart
  557 + if %ERRORLEVEL% == 0 (
  558 + echo. SUCCESS
  559 + ) else (
  560 + if %ERRORLEVEL% == 3010 (
  561 + echo. SUCCESS, reboot required
  562 + set REBOOT_FLAG=1
  563 + ) else (
  564 + echo. ERROR = %ERRORLEVEL%
  565 + )
  566 + )
  567 +)
  568 +
  569 +
  570 +REM Install if on Windows 64 bit
  571 +if %processor_architecture% == AMD64 (
  572 + echo Installing x64 prerequisites...
  573 +
  574 + &gt;nul 2&gt;&amp;1 reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{071c9b48-7c32-4621-a0ac-3f809523288f}
  575 + if %ERRORLEVEL% == 0 (
  576 + echo. vc80_vcredist_x64 already installed
  577 + ) else (
  578 + echo. Installing vc80_vcredist_x64
  579 + start /wait %~dp0vc80_vcredist_x64.exe /q
  580 + if %ERRORLEVEL% == 0 (
  581 + echo. SUCCESS
  582 + ) else (
  583 + if %ERRORLEVEL% == 3010 (
  584 + echo. SUCCESS, reboot required
  585 + set REBOOT_FLAG=1
  586 + ) else (
  587 + echo. ERROR = %ERRORLEVEL%
  588 + )
  589 + )
  590 + )
  591 +
  592 + &gt;nul 2&gt;&amp;1 reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4B6C7001-C7D6-3710-913E-5BC23FCE91E6}
  593 + if %ERRORLEVEL% == 0 (
  594 + echo. vc90_vcredist_x64 already installed
  595 + ) else (
  596 + echo. Installing vc90_vcredist_x64
  597 + start /wait %~dp0vc90_vcredist_x64.exe /q
  598 + if %ERRORLEVEL% == 0 (
  599 + echo. SUCCESS
  600 + ) else (
  601 + if %ERRORLEVEL% == 3010 (
  602 + echo. SUCCESS, reboot required
  603 + set REBOOT_FLAG=1
  604 + ) else (
  605 + echo. ERROR = %ERRORLEVEL%
  606 + )
  607 + )
  608 + )
  609 +
  610 +
  611 + REM Test if Citrix Receiver is installed
  612 + &gt;nul 2&gt;&amp;1 dir /s "C:\Program Files (x86)\Citrix\receiver.exe"
  613 + if %ERRORLEVEL% == 0 (
  614 + echo. Citrix Receiver already installed
  615 + ) else (
  616 + echo. Installing Citrix Receiver
  617 + start /wait msiexec /i %~dp0Reciever\RIInstaller.msi /passive /norestart
  618 + if %ERRORLEVEL% == 0 (
  619 + echo. SUCCESS
  620 + ) else (
  621 + if %ERRORLEVEL% == 3010 (
  622 + echo. SUCCESS, reboot required
  623 + set REBOOT_FLAG=1
  624 + ) else (
  625 + echo. ERROR = %ERRORLEVEL%
  626 + )
  627 + )
  628 + )
  629 +
  630 +
  631 + REM Install SSO Plugin if not already installed
  632 + &gt;nul 2&gt;&amp;1 dir /s "c:\Program Files (x86)\Citrix\ssoShell.exe"
  633 + if %ERRORLEVEL% == 0 (
  634 + echo SSO Agent x86 is already installed, uninstalling
  635 + start /wait msiexec /x {FC95142E-AD05-4ECB-9F13-93466D6B5C69} /passive /norestart
  636 + )
  637 +
  638 + REM %~dp0CitrixSSOPlugin64.exe /silent SYNCPOINTTYPE=FileSyncPath SYNCPOINTLOC=\\server\CITRIXSYNC$ DI_SELECT=1 SSPR_SELECT=1 SERVICEURL="https://server/MPMService/"
  639 + REM An argument of "/forcerestart" can be added to the end to automatically restart
  640 +
  641 + echo Installing Citrix Single Sign-On Plugin 5.0 64 bit
  642 + start /wait msiexec /i %~dp0\SSOPlugin64\SFPDSSOPlugin64.msi /passive /norestart
  643 + if %ERRORLEVEL% == 0 (
  644 + echo. SUCCESS
  645 + ) else (
  646 + if %ERRORLEVEL% == 3010 (
  647 + echo. SUCCESS, reboot required
  648 + set REBOOT_FLAG=1
  649 + ) else (
  650 + echo. ERROR = %ERRORLEVEL%
  651 + )
  652 + )
  653 +)
  654 +
  655 +
  656 +echo Installation complete
  657 +if %REBOOT_FLAG% == 0 (
  658 + echo You may need to restart the Citrix SSO Plugin manually
  659 + echo Please press any key to end the install routine
  660 + pause
  661 + exit /B
  662 +) else (
  663 + echo Please press any key to restart your computer
  664 + pause
  665 + shutdown -r -c "Citrix SSO Plugin Install" -t 0
  666 +)
  667 +</code></pre>
  668 +
  669 +<h1>Credits</h1>
  670 +
  671 +<p>Once again, thank you Evan Greene. I used <a href="http://sites.google.com/site/eneerge/home/BatchGotAdmin">your UAC script</a> as a starting point for this one.</p>
  672 + </div>
  673 +
  674 +
  675 +
  676 +
  677 +
  678 +
  679 +
  680 +
  681 +
  682 +
  683 +
  684 +
  685 +
  686 +
  687 +
  688 +
  689 +
  690 +
  691 +
  692 +
  693 + <div class="meta">
  694 + <ul class="meta-list">
  695 +
  696 + <li class="tags">
  697 + <ul class="tag-list">
  698 +
  699 + <li><a href="http://blog.mnewton.com/tagged/batch">#batch</a></li>
  700 +
  701 + <li><a href="http://blog.mnewton.com/tagged/development">#development</a></li>
  702 +
  703 + <li><a href="http://blog.mnewton.com/tagged/script">#script</a></li>
  704 +
  705 + <li><a href="http://blog.mnewton.com/tagged/windows">#windows</a></li>
  706 +
  707 + </ul>
  708 + </li>
  709 +
  710 + <li class="date"><a href="http://blog.mnewton.com/post/27511333721/windows-installer-batch-script-revisited" title="Wed. July 18, 2012 @ 3:33 pm"><span class="icon"></span>3 weeks ago</a></li>
  711 +
  712 + <li class="comments hidden"><a id="dsq-27511333721" href="http://blog.mnewton.com/post/27511333721/windows-installer-batch-script-revisited#disqus_thread"><span class="icon"></span>Comments</a></li>
  713 + <li class="permalink"><a href="http://blog.mnewton.com/post/27511333721/windows-installer-batch-script-revisited"><span class="icon"></span>Permalink</a></li>
  714 + <li class="share">
  715 + <a class="share-btn" href="http://tmblr.co/ZvdubyPdpQDP" data-permalink="http://blog.mnewton.com/post/27511333721/windows-installer-batch-script-revisited">Share</a>
  716 + <div class="share-box">
  717 + <div class="share-box-inside clearfix">
  718 + <input class="shortlink" type="text" readonly="" value="http://tmblr.co/ZvdubyPdpQDP">
  719 + <div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://blog.mnewton.com/post/27511333721/windows-installer-batch-script-revisited"></div></div>
  720 + <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.mnewton.com/post/27511333721/windows-installer-batch-script-revisited" data-text="" data-count="none" data-via="mnewto">Tweet</a>
  721 + <div class="like-button"></div>
  722 + </div><!-- /.share-box-inside -->
  723 + </div><!-- /.share-box -->
  724 + </li><!-- /.share -->
  725 + </ul><!--/.meta-list -->
  726 + </div><!-- /.meta -->
  727 +
  728 +
  729 +
  730 +
  731 +<!--
  732 +===================================================
  733 + Begin AddThis
  734 +===================================================
  735 +-->
  736 +<div class="addthis_toolbox addthis_default_style " addthis:title="Windows Installer Batch Script Revisited" addthis:url="http://blog.mnewton.com/post/27511333721/windows-installer-batch-script-revisited">
  737 +<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
  738 +<a class="addthis_button_tweet"></a>
  739 +<a class="addthis_button_pinterest_pinit"></a>
  740 +<a class="addthis_counter addthis_pill_style"></a>
  741 +</div>
  742 +<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4faa03a633844ef0"></script>
  743 +<!--
  744 +===================================================
  745 + End AddThis
  746 +===================================================
  747 +-->
  748 +
  749 +
  750 +
  751 + </div><!-- /.post-panel -->
  752 + <div class="post-shadow"></div>
  753 + </div><!-- /.post -->
  754 +
  755 +
  756 + <div id="post-27509481333" class="post type-text">
  757 + <div class="post-panel">
  758 + <div class="copy">
  759 +
  760 + <h2 class="post-title">Unrolling Citrix Single Sign-On Plugin</h2>
  761 +
  762 + <h1>The Problem</h1>
  763 +
  764 +<p>The Citrix Single Sign-On Plugin (aka Citrix Password Manager) is a decent way to manage user passwords across a typical, fairly homogeneous Windows Enterprise Environment. It is not given as much love by Citrix as I would like, and it has its quirks. But all password management systems do.</p>
  765 +
  766 +<p>Today, though, I found a particulary irksome quirk. There is no way to tell the install routine NOT to install the Java Bridge module, which is used to save and replay passwords in Java applications. Most would not find this a horrible problem, but my client happens to have a Java application that is horribly broken by Citrix&#8217;s Java Bridge module. So it has to go!</p>
  767 +
  768 +<p>Other modules can be easily installed, or not, using command line switches. See Citrix&#8217;s documentation:
  769 +<a href="http://support.citrix.com/proddocs/topic/passwordmanager/pm-install-agent-to-silent-install.html">To install the Password Manager agent software silently from a command prompt</a></p>
  770 +
  771 +<p>You think perhaps there is an install option but it&#8217;s just not documented? I doubt this. if you comb through the install media, including the XML file (SSOPlugin32Metadata.xml), you will not find any reference at all to the Java module. It appears to be needlessly baked in.</p>
  772 +
  773 +<p>How do we engineer around this deficiency?</p>
  774 +
  775 +<h2>Preparation</h2>
  776 +
  777 +<p>First, I grabbed the CitrixSSOPlugin32.exe from the XenApp 6.5 media. It is a self-contained .exe installer. However, like most .exe installers, it can be easily split up into its constituent parts using 7-zip or RAR.</p>
  778 +
  779 +<p>Along with support files and directories, you will find two standard .msi files: one for Citrix Receiver and one for SSO.</p>
  780 +
  781 +<h1>Solution: MSI Administrative Install</h1>
  782 +
  783 +<p>Once I had the raw msi files, the rest is easy and well documented by Microsoft. I create an Administrative Install.</p>
  784 +
  785 +<pre><code>msiexec /a "Citrix Single Sign-On.msi"
  786 +</code></pre>
  787 +
  788 +<p>After running the above command, a standard install wizard popped up. I went through it as you would in a manual install until it completed.</p>
  789 +
  790 +<p>Once completed, however, I was left with a new directory containing an Administrative Install, with all of the options and parameters I chose during the wizard baked directly into the installation.</p>
  791 +
  792 +<p>That&#8217;s all there is to it. I did, however, think of some alternative solutions if that didn&#8217;t work.</p>
  793 +
  794 +<h2>Alternative Solution #1</h2>
  795 +
  796 +<p>You could use <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa370557%28v=vs.85%29.aspx">Microsoft Orca</a> to rip out the offending section. This is a very brute force way of accomplishing our goal. Simply search for Java in the modules section and delete the reference.</p>
  797 +
  798 +<h2>Alternative Solution #2</h2>
  799 +
  800 +<p>Lastly, if none of those options worked my last resort was to simply unlink the JavaBridge.dll:</p>
  801 +
  802 +<pre><code>regsvr32.exe /u "C:\Program Files\Citrix\Password Manager\helper\JavaBridge.dll"
  803 +</code></pre>
  804 +
  805 +<p>Thankfully, the administrative install worked perfectly for our case.</p>
  806 +
  807 +<p>All of this would be unnecessary, however, if Citrix exposed a transform option to disable that module, just as they do for other modules in the Plugin. Please update your install routines, Citrix! There is a reason MSI files were created and when you gloss over functionality that is baked into the architecture in the first place you hurt yourselves and you hurt your users.</p>
  808 +
  809 +<p>Please let me know if any of this helped you out. Cheers.</p>
  810 + </div>
  811 +
  812 +
  813 +
  814 +
  815 +
  816 +
  817 +
  818 +
  819 +
  820 +
  821 +
  822 +
  823 +
  824 +
  825 +
  826 +
  827 +
  828 +
  829 +
  830 +
  831 + <div class="meta">
  832 + <ul class="meta-list">
  833 +
  834 + <li class="date"><a href="http://blog.mnewton.com/post/27509481333/unrolling-citrix-single-sign-on-plugin" title="Wed. July 18, 2012 @ 3:05 pm"><span class="icon"></span>3 weeks ago</a></li>
  835 +
  836 + <li class="comments hidden"><a id="dsq-27509481333" href="http://blog.mnewton.com/post/27509481333/unrolling-citrix-single-sign-on-plugin#disqus_thread"><span class="icon"></span>Comments</a></li>
  837 + <li class="permalink"><a href="http://blog.mnewton.com/post/27509481333/unrolling-citrix-single-sign-on-plugin"><span class="icon"></span>Permalink</a></li>
  838 + <li class="share">
  839 + <a class="share-btn" href="http://tmblr.co/ZvdubyPdiLzr" data-permalink="http://blog.mnewton.com/post/27509481333/unrolling-citrix-single-sign-on-plugin">Share</a>
  840 + <div class="share-box">
  841 + <div class="share-box-inside clearfix">
  842 + <input class="shortlink" type="text" readonly="" value="http://tmblr.co/ZvdubyPdiLzr">
  843 + <div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://blog.mnewton.com/post/27509481333/unrolling-citrix-single-sign-on-plugin"></div></div>
  844 + <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.mnewton.com/post/27509481333/unrolling-citrix-single-sign-on-plugin" data-text="" data-count="none" data-via="mnewto">Tweet</a>
  845 + <div class="like-button"></div>
  846 + </div><!-- /.share-box-inside -->
  847 + </div><!-- /.share-box -->
  848 + </li><!-- /.share -->
  849 + </ul><!--/.meta-list -->
  850 + </div><!-- /.meta -->
  851 +
  852 +
  853 +
  854 +
  855 +<!--
  856 +===================================================
  857 + Begin AddThis
  858 +===================================================
  859 +-->
  860 +<div class="addthis_toolbox addthis_default_style " addthis:title="Unrolling Citrix Single Sign-On Plugin" addthis:url="http://blog.mnewton.com/post/27509481333/unrolling-citrix-single-sign-on-plugin">
  861 +<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
  862 +<a class="addthis_button_tweet"></a>
  863 +<a class="addthis_button_pinterest_pinit"></a>
  864 +<a class="addthis_counter addthis_pill_style"></a>
  865 +</div>
  866 +<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4faa03a633844ef0"></script>
  867 +<!--
  868 +===================================================
  869 + End AddThis
  870 +===================================================
  871 +-->
  872 +
  873 +
  874 +
  875 + </div><!-- /.post-panel -->
  876 + <div class="post-shadow"></div>
  877 + </div><!-- /.post -->
  878 +
  879 +
  880 +
  881 +
  882 +
  883 +
  884 +
  885 +
  886 + <div id="post-27497506397" class="post type-quote">
  887 + <div class="colored-panel">
  888 + <blockquote class="quote-text">The mass of men lead lives of quiet desperation. What is called resignation is confirmed desperation.</blockquote>
  889 + </div>
  890 + <div class="post-panel">
  891 + <div class="quote-nipple"></div>
  892 +
  893 + <div class="copy">
  894 + Henry David Thoreau
  895 + </div>
  896 +
  897 +
  898 +
  899 +
  900 +
  901 +
  902 +
  903 +
  904 +
  905 +
  906 +
  907 +
  908 +
  909 +
  910 +
  911 + <div class="meta">
  912 + <ul class="meta-list">
  913 +
  914 + <li class="date"><a href="http://blog.mnewton.com/post/27497506397/the-mass-of-men-lead-lives-of-quiet-desperation" title="Mon. June 18, 2012 @ 10:43 am"><span class="icon"></span>1 month ago</a></li>
  915 +
  916 + <li class="comments hidden"><a id="dsq-27497506397" href="http://blog.mnewton.com/post/27497506397/the-mass-of-men-lead-lives-of-quiet-desperation#disqus_thread"><span class="icon"></span>Comments</a></li>
  917 + <li class="permalink"><a href="http://blog.mnewton.com/post/27497506397/the-mass-of-men-lead-lives-of-quiet-desperation"><span class="icon"></span>Permalink</a></li>
  918 + <li class="share">
  919 + <a class="share-btn" href="http://tmblr.co/ZvdubyPc_gPT" data-permalink="http://blog.mnewton.com/post/27497506397/the-mass-of-men-lead-lives-of-quiet-desperation">Share</a>
  920 + <div class="share-box">
  921 + <div class="share-box-inside clearfix">
  922 + <input class="shortlink" type="text" readonly="" value="http://tmblr.co/ZvdubyPc_gPT">
  923 + <div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://blog.mnewton.com/post/27497506397/the-mass-of-men-lead-lives-of-quiet-desperation"></div></div>
  924 + <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.mnewton.com/post/27497506397/the-mass-of-men-lead-lives-of-quiet-desperation" data-text="" data-count="none" data-via="mnewto">Tweet</a>
  925 + <div class="like-button"></div>
  926 + </div><!-- /.share-box-inside -->
  927 + </div><!-- /.share-box -->
  928 + </li><!-- /.share -->
  929 + </ul><!--/.meta-list -->
  930 + </div><!-- /.meta -->
  931 +
  932 +
  933 +
  934 +
  935 +<!--
  936 +===================================================
  937 + Begin AddThis
  938 +===================================================
  939 +-->
  940 +<div class="addthis_toolbox addthis_default_style " addthis:title="MN | Matthew Sojourner Newton" addthis:url="http://blog.mnewton.com/post/27497506397/the-mass-of-men-lead-lives-of-quiet-desperation">
  941 +<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
  942 +<a class="addthis_button_tweet"></a>
  943 +<a class="addthis_button_pinterest_pinit"></a>
  944 +<a class="addthis_counter addthis_pill_style"></a>
  945 +</div>
  946 +<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4faa03a633844ef0"></script>
  947 +<!--
  948 +===================================================
  949 + End AddThis
  950 +===================================================
  951 +-->
  952 +
  953 +
  954 +
  955 + </div><!-- /.post-panel -->
  956 + <div class="post-shadow"></div>
  957 + </div><!-- /.post -->
  958 +
  959 + <!-- END POSTS -->
  960 +
  961 +
  962 +
  963 +
  964 + <div id="pagination">
  965 + <div class="nextprev">
  966 + <span>&larr; Newer</span> <span class="sep">&bull;</span>
  967 + <a class="next" href="/page/2"><span>Older &rarr;</span></a>
  968 + </div>
  969 + <div class="current-page">Page 1 <em>of</em> 3</div>
  970 + </div><!--/#pagination -->
  971 +
  972 +
  973 +
  974 + </div><!-- /#content -->
  975 +
  976 + <!-- SIDEBAR -->
  977 + <div id="sidebar">
  978 + <div id="blog-info" class="side-box">
  979 +
  980 +
  981 +
  982 +
  983 +
  984 + <p><a href="/"><img class="large-portrait" src="http://static.tumblr.com/zvdakki/oeHm7ddj1/085.jpg" alt="Portrait/Logo"/></a></p>
  985 +
  986 +
  987 +
  988 + <div class="description">
  989 +
  990 +
  991 + A blog by Matthew Sojourner Newton sharing some things I've learned
  992 +<br><br>
  993 +<a href="http://mnewton.com">mnewton.com</a>
  994 +
  995 +<br><br>
  996 +
  997 +<a href="http://internetdefenseleague.org"><img src="http://internetdefenseleague.org/images/badges/final/super_badge.png" alt="Member of The Internet Defense League" /></a>
  998 +<br><br>
  999 +
  1000 +<!--Tumblr Tag Cloud [2012-07-31]-->
  1001 +<script type="text/javascript" src="http://rive.rs/javascripts/tumblr.min.js?css=default&minsize=120&maxsize=180"></script>
  1002 + </div><!--/.description-->
  1003 +
  1004 + </div><!--/#blog-info -->
  1005 +
  1006 +
  1007 +
  1008 +
  1009 +
  1010 +
  1011 + <div class="side-box ruled-top">
  1012 + <h2>my other stuff</h2>
  1013 + <ul id="socialize">
  1014 +
  1015 +
  1016 +
  1017 +
  1018 +
  1019 + <li class="twitter"><a href="http://www.twitter.com/mnewto" title="@mnewto on Twitter">@mnewto on Twitter</a></li>
  1020 +
  1021 +
  1022 +
  1023 +
  1024 +
  1025 + <li class="pinboard"><a href="http://pinboard.in/u:mnewt" title="mnewt on Pinboard">mnewt on Pinboard</a></li>
  1026 +
  1027 +
  1028 +
  1029 +
  1030 +
  1031 +
  1032 +
  1033 +
  1034 +
  1035 +
  1036 + <li class="linkedin"><a href="http://www.linkedin.com/in/mnewt" title="Linkedin Profile">Linkedin Profile</a></li>
  1037 + <li class="github"><a href="http://github.com/mnewt" title="mnewt on github">mnewt on github</a></li>
  1038 +
  1039 + </ul>
  1040 + </div>
  1041 +
  1042 +
  1043 +
  1044 +
  1045 + <div id="twitter" class="side-box ruled-top">
  1046 + <h2>Twitter</h2>
  1047 + <p class="loading-text">loading tweets&hellip;</p>
  1048 + </div>
  1049 +
  1050 +
  1051 +
  1052 +
  1053 +
  1054 +
  1055 +
  1056 +
  1057 +
  1058 + <!-- LIKES -->
  1059 +
  1060 + <div id="side-likes" class="side-box ruled-top">
  1061 + <h2>I Dig These Posts</h2>
  1062 +
  1063 + <a class="more-likes" href="/liked/by/mnewt">See more &rarr;</a>
  1064 + </div>
  1065 +
  1066 + <!-- END LIKES -->
  1067 +
  1068 +
  1069 +
  1070 +
  1071 +<!--
  1072 +===================================================
  1073 + Begin feedwind
  1074 +===================================================
  1075 +-->
  1076 + <script type="text/javascript">
  1077 + <!--
  1078 + rssmikle_url="http://feeds.pinboard.in/rss/u:mnewt/";
  1079 + rssmikle_frame_width="175";
  1080 + rssmikle_frame_height="350";
  1081 + rssmikle_target="_blank";
  1082 + rssmikle_font="Arial, Helvetica, sans-serif";
  1083 + rssmikle_font_size="12";
  1084 + rssmikle_border="on";
  1085 + rssmikle_css_url="";
  1086 + rssmikle_title="on";
  1087 + rssmikle_title_bgcolor="#f3465a";
  1088 + rssmikle_title_color="#fffadc";
  1089 + rssmikle_title_bgimage="http://";
  1090 + rssmikle_item_bgcolor="#FFFFFF";
  1091 + rssmikle_item_bgimage="http://";
  1092 + rssmikle_item_title_length="50";
  1093 + rssmikle_item_title_color="#666666";
  1094 + rssmikle_item_border_bottom="off";
  1095 + rssmikle_item_description="off";
  1096 + rssmikle_item_description_length="40";
  1097 + rssmikle_item_description_color="#666666";
  1098 + rssmikle_item_description_tag="off";
  1099 + rssmikle_item_podcast="icon";
  1100 + //-->
  1101 + </script>
  1102 + <script type="text/javascript" src="http://feed.mikle.com/js/rssmikle.js"></script>
  1103 + <div style="font-size:10px; text-align:right;">
  1104 + <a href="http://feed.mikle.com/en/" target="_blank" style="color:#CCCCCC;">FeedWind</a>
  1105 + <!--Please display the above link in your web page according to Terms of Service.-->
  1106 + </div>
  1107 +<!--
  1108 +===================================================
  1109 + End feedwind
  1110 +===================================================
  1111 +-->
  1112 +
  1113 +
  1114 + </div><!-- /#sidebar -->
  1115 +
  1116 + <!-- FOOTER -->
  1117 + <div id="footer">
  1118 +
  1119 +
  1120 +
  1121 + <div id="footer-end" class="ruled-top">
  1122 + <ul id="footer-links">
  1123 + <li><a href="/rss">RSS</a></li>
  1124 + <li><a href="/random">Random</a></li>
  1125 + <li><a href="/archive">Archive</a></li>
  1126 + <li><a href="/ask">Ask me something</a></li>
  1127 +
  1128 + <li><a href="/mobile">Mobile</a></li>
  1129 + </ul>
  1130 + <p class="credits"><a href="http://effectortheme.tumblr.com">Effector Theme</a> by <a href="http://www.carlofranco.ca">Carlo Franco</a>.</p>
  1131 + <span class="tumblr">Powered by <a href="http://www.tumblr.com/">Tumblr</a></span>
  1132 + </div><!-- /#footer-end -->
  1133 + </div><!-- /#footer -->
  1134 + </div><!-- /#page -->
  1135 +
  1136 +<!-- Footer Scripts -->
  1137 +<script type="text/javascript">(function(B,C){B[C]=B[C].replace(/\bno-js\b/,'js')})(document.documentElement,'className');</script>
  1138 +<script src="http://static.tumblr.com/xgwqnql/XPSlbx7np/jquery-1.4.4.min.js"></script>
  1139 +<script src="http://static.tumblr.com/njty47g/d1Mlpn53c/plugins.js"></script>
  1140 +<script src="http://static.tumblr.com/xgwqnql/41Lluodtm/effector-1.2.6.min.js"></script>
  1141 +<script src="http://platform.twitter.com/widgets.js"></script>
  1142 +<script src="https://apis.google.com/js/plusone.js" type="text/javascript"></script>
  1143 +
  1144 + <script type="text/javascript">
  1145 + var _gaq=[["_setAccount","UA-32103756-1"],["_trackPageview"]];
  1146 + (function(d,t){
  1147 + var g=d.createElement(t), s=d.getElementsByTagName(t)[0];
  1148 + g.async=1;
  1149 + g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
  1150 + s.parentNode.insertBefore(g,s)
  1151 + }(document,"script"));
  1152 + </script>
  1153 +
  1154 +
  1155 +
  1156 +
  1157 +
  1158 +<!-- ======================= Begin Prettify ============================-->
  1159 + <link rel="stylesheet" type="text/css" rel="stylesheet"
  1160 + href="themes/sunburst.css">
  1161 + <script type="text/javascript"
  1162 + src="google-code-prettify/src/prettify.js">
  1163 + </script>
  1164 + <script type="text/javascript"
  1165 + src="styleCode.js"></script>
  1166 +<!-- ======================== End Prettify =============================-->
  1167 +<!-- BEGIN TUMBLR CODE --><iframe src="http://assets.tumblr.com/iframe.html?10&src=http%3A%2F%2Fblog.mnewton.com%2F&amp;lang=en_US&amp;name=mnewt" scrolling="no" width="330" height="25" frameborder="0" style="position:absolute; z-index:1337; top:0px; right:0px; border:0px; background-color:transparent; overflow:hidden;" id="tumblr_controls"></iframe><!--[if IE]><script type="text/javascript">document.getElementById('tumblr_controls').allowTransparency=true;</script><![endif]--><script type="text/javascript">_qoptions={qacct:"p-19UtqE8ngoZbM"};</script><script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script><noscript><img src="http://pixel.quantserve.com/pixel/p-19UtqE8ngoZbM.gif" style="display:none; border-width:0px; height:1px; width:1px;" alt=""/></noscript><!-- END TUMBLR CODE -->
  1168 +</body>
  1169 +</html>
2  index.html
@@ -91,7 +91,7 @@ <h2 id="project_tagline">Wraps Google Prettify into a nice little bow for easy i
91 91
92 92 <!-- ======================= Begin Prettify ============================-->
93 93 <link rel="stylesheet" type="text/css" rel="stylesheet"
94   - href="themes/desert.css">
  94 + href="themes/sunburst.css">
95 95 <script type="text/javascript"
96 96 src="google-code-prettify/src/prettify.js">
97 97 </script>
6 themes/desert.css
... ... @@ -1,7 +1,11 @@
1 1 /* desert scheme ported from vim to google prettify */
2 2 /* modified to work with http://github.mnewton.com/prettify-wrapper */
3 3
4   -pre.prettyprint, code.prettyprint { display: block; background-color: #333 }
  4 +pre.prettyprint, code.prettyprint {
  5 + padding: 5px;
  6 + border-width: 0 0 0 0px !important; }
  7 +
  8 +pre.prettyprint { display: block; text-shadow: 0 0px #333; }
5 9 pre .nocode { background-color: none; color: #000 }
6 10 pre .str { color: #ffa0a0 } /* string - pink */
7 11 pre .kwd { color: #f0e68c; font-weight: bold }
3  themes/prettify.css
@@ -33,7 +33,8 @@
33 33 }
34 34
35 35 /* Put a border around prettyprinted code snippets. */
36   -pre.prettyprint, code.prettyprint { padding: 2px; border: 1px solid #888 }
  36 +pre.prettyprint { padding: 10px; border: 1px solid #888 }
  37 +code.prettyprint { padding: 2px; }
37 38
38 39 /* Specify class=linenums on a pre to get line numbering */
39 40 ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
57 themes/sunburst.css
... ... @@ -0,0 +1,57 @@
  1 +/* Pretty printing styles. Used with prettify.js. */
  2 +/* Vim sunburst theme by David Leibovic */
  3 +/* modified to work with http://github.mnewton.com/prettify-wrapper */
  4 +
  5 +pre .str, code .str { color: #65B042; } /* string - green */
  6 +pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */
  7 +pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */
  8 +pre .typ, code .typ { color: #89bdff; } /* type - light blue */
  9 +pre .lit, code .lit { color: #3387CC; } /* literal - blue */