<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Notes on possible Windows support — Bcfg2 1.3.0 documentation</title> <link rel="stylesheet" href="../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '1.3.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/sidebar.js"></script> <link rel="shortcut icon" href="../_static/favicon.ico"/> <link rel="top" title="Bcfg2 1.3.0 documentation" href="../index.html" /> <link rel="up" title="Unsorted Docs" href="index.html" /> <link rel="next" title="Writing Bcfg2 Specification" href="writing_specification.html" /> <link rel="prev" title="Vim Snippet Support" href="vim_snippet.html" /> <link rel="stylesheet" href="../_static/bcfg2.css" type=""/> </head> <body> <div style="text-align: left; padding: 10px 10px 15px 15px"> <a href="../index.html"><img src="../_static/bcfg2_logo.png" border="0" alt="sampledoc"/></a> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="writing_specification.html" title="Writing Bcfg2 Specification" accesskey="N">next</a> |</li> <li class="right" > <a href="vim_snippet.html" title="Vim Snippet Support" accesskey="P">previous</a> |</li> <li><a href="../index.html">home</a> | </li> <!--<li><a href="../search.html">search</a> | </li>--> <li><a href="../help/index.html">help</a> | </li> <li><a href="../contents.html">documentation </a> »</li> <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="index.html" accesskey="U">Unsorted Docs</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="notes-on-possible-windows-support"> <span id="unsorted-windows"></span><h1>Notes on possible Windows support<a class="headerlink" href="#notes-on-possible-windows-support" title="Permalink to this headline">¶</a></h1> <ul class="simple"> <li>Windows Management Instrumentation (WMI) should be used wherever possible; there is an excellent [<a class="reference external" href="http://tgolden.sc.sabren.com/python/wmi.html">http://tgolden.sc.sabren.com/python/wmi.html</a> WMI Python Module] available, which also comes with a [<a class="reference external" href="http://tgolden.sc.sabren.com/python/wmi_cookbook.html">http://tgolden.sc.sabren.com/python/wmi_cookbook.html</a> WMI Cookbook].</li> <li>Before Windows 2003 SP1, on 64-bit machines there are [<a class="reference external" href="http://msdn2.microsoft.com/en-us/library/aa393067.aspx">http://msdn2.microsoft.com/en-us/library/aa393067.aspx</a> no API or WMI calls] to get to many 32-bit windows functions (such as the 32-bit registry) from 64-bit programs, and vice versa. There also is no (official) x86_64 native python distributions for Windows pre-Python 2.5. So the choice would be:</li> </ul> <blockquote> <div><ol class="arabic simple"> <li>Only support Windows in Python 2.5+ (which wouldn’t be that bad because part of the build process would probably be to create stand-alone bcfg2 executables using [<a class="reference external" href="http://www.py2exe.org/">http://www.py2exe.org/</a> py2exe]). For 64-bit support there would have to be some kind of convoluted py2exe build process that built some things with 32-bit python and some things with 64-bit python.</li> <li>Wrap external command-line programs such as winreg, which is part of [<a class="reference external" href="http://dmst.aueb.gr/dds/sw/outwit/">http://dmst.aueb.gr/dds/sw/outwit/</a> outwit], and screen scrape. Each external command-line program would need to be compiled into 32 and 64 bit versions. This approach might lead to licensing annoyances and having binary blobs in source control.</li> </ol> </div></blockquote> <div class="section" id="services"> <h2>Services<a class="headerlink" href="#services" title="Permalink to this headline">¶</a></h2> <p>With the exception of 32/64 bit issues, Windows Services support should be pretty trivial; it would differ from *nix services in that it would be done via WMI API calls and not a 3rd party python module or wrapping a binary.</p> </div> <div class="section" id="registry"> <h2>Registry<a class="headerlink" href="#registry" title="Permalink to this headline">¶</a></h2> <p>The best way of handling the registry may be to map it into a file-based representation on the server end. The Cfg plugin could then be used to set registry values as needed.</p> </div> <div class="section" id="files"> <h2>Files<a class="headerlink" href="#files" title="Permalink to this headline">¶</a></h2> <p>For a first run there may be some way of utilizing [<a class="reference external" href="http://cygwin.com/">http://cygwin.com/</a> cygwin] to make use of the existing *nix POSIX module for manipulating files. There would probably need to be some changes to deal with the fact that open files can’t be manipulated/moved/deleted at all in Windows (other than to do some registry magic that makes the changes on the next reboot).</p> </div> <div class="section" id="packages"> <h2>Packages<a class="headerlink" href="#packages" title="Permalink to this headline">¶</a></h2> <p>Listing and removal of packages should be pretty easy via WMI. For installation in most cases the admin would need to figure out the correct silent install flags (there is a [<a class="reference external" href="http://www.appdeploy.com/">http://www.appdeploy.com/</a> web site] that catalogs a lot of this information), and include that in the bcfg2 server-side XML along with a URL (like with the RPM plugin); the bcfg2 client itself would need to take care of download, perhaps via the [<a class="reference external" href="http://linux.duke.edu/projects/urlgrabber/">http://linux.duke.edu/projects/urlgrabber/</a> urlgrabber python module].</p> <p>Another option would be to utilize one of the existing FLOSS tools for dealing with Windows packages, such as [<a class="reference external" href="http://wpkg.org/">http://wpkg.org/</a> WPKG].</p> </div> <div class="section" id="prior-floss-art"> <h2>Prior FLOSS Art<a class="headerlink" href="#prior-floss-art" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>[<a class="reference external" href="http://www.autoitscript.com/autoit3/">http://www.autoitscript.com/autoit3/</a> AutoIt] - For dealing with packages that don’t have a silent install option</li> <li>[<a class="reference external" href="http://www.opensysadmin.com/trac/ticket/4">http://www.opensysadmin.com/trac/ticket/4</a> French Stuff]</li> </ul> <blockquote> <div><ul class="simple"> <li>[<a class="reference external" href="http://ocsinventory.sourceforge.net/">http://ocsinventory.sourceforge.net/</a> Open Computers and Software Inventory - Next Generation]</li> <li>[<a class="reference external" href="http://www.glpi-project.org/spip.php?lang=en">http://www.glpi-project.org/spip.php?lang=en</a> GLPI - Gestionnaire libre de parc informatique]</li> </ul> </div></blockquote> <ul class="simple"> <li>Javascript thing a colleague of Desai’s at ANL wrote - Desai was going to see if this can be released</li> <li>[<a class="reference external" href="http://sial.org/howto/cfengine/windows/">http://sial.org/howto/cfengine/windows/</a> Managing Windows with CFEngine and Perl]</li> <li>[<a class="reference external" href="http://www.dmst.aueb.gr/dds/sw/outwit/">http://www.dmst.aueb.gr/dds/sw/outwit/</a> Outwit] - Small unixy utilities for Windows stuff like the registry and clipboard</li> <li>[<a class="reference external" href="http://www.cfengine.org/docs/cfengine-NT/">http://www.cfengine.org/docs/cfengine-NT/</a> Porting cfengine to Windows NT]</li> <li>[<a class="reference external" href="http://isg.ee.ethz.ch/tools/realmen/">http://isg.ee.ethz.ch/tools/realmen/</a> Real Men Don’t Click] - Tobi Oetiker’s stuff</li> </ul> <blockquote> <div><ul class="simple"> <li>[<a class="reference external" href="http://isg.ee.ethz.ch/tools/realmen/res/index.en.html">http://isg.ee.ethz.ch/tools/realmen/res/index.en.html</a> More Prior FLOSS Art]</li> </ul> </div></blockquote> <ul class="simple"> <li>[<a class="reference external" href="http://unattended.sourceforge.net/">http://unattended.sourceforge.net/</a> Unattended] - Bare Metal Installs, Package Management</li> <li>[<a class="reference external" href="http://wpkg.org/">http://wpkg.org/</a> WPKG] - Package Management</li> </ul> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Notes on possible Windows support</a><ul> <li><a class="reference internal" href="#services">Services</a></li> <li><a class="reference internal" href="#registry">Registry</a></li> <li><a class="reference internal" href="#files">Files</a></li> <li><a class="reference internal" href="#packages">Packages</a></li> <li><a class="reference internal" href="#prior-floss-art">Prior FLOSS Art</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="vim_snippet.html" title="previous chapter">Vim Snippet Support</a></p> <h4>Next topic</h4> <p class="topless"><a href="writing_specification.html" title="next chapter">Writing Bcfg2 Specification</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/unsorted/windows.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="writing_specification.html" title="Writing Bcfg2 Specification" >next</a> |</li> <li class="right" > <a href="vim_snippet.html" title="Vim Snippet Support" >previous</a> |</li> <li><a href="../index.html">home</a> | </li> <!--<li><a href="../search.html">search</a> | </li>--> <li><a href="../help/index.html">help</a> | </li> <li><a href="../contents.html">documentation </a> »</li> <li><a href="../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="index.html" >Unsorted Docs</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2013, Narayan Desai. Last updated on Mar 20, 2013. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>