tag:blogger.com,1999:blog-15851057874737964762024-03-15T12:15:29.836+00:00keyliner.blogspot.comTechnical and non-technical articles about computers. Articles and illustrations may be re-printed/re-published; please advise via this blog. Your comments are welcome.traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.comBlogger208125tag:blogger.com,1999:blog-1585105787473796476.post-72801904995590440652024-02-22T20:00:00.005+00:002024-02-23T14:58:06.656+00:00Excel User-Defined Formulas<p><span style="font-size: 85%;"><span style="font-style: italic;">Create custom Excel User-Defined Functions using Visual Basic (VBA). UDF's act like new Excel keywords and they are essentially mini-programs that can live within a cell. Instead of writing a horrendously-long formula, replace it with a keyword.<br /></span></span></p><p><span style="font-size: 85%;"><span style="font-style: italic;">This article demonstrates these functions:<br /><br /></span><span style="font-family: courier;">=FindLastSpacePos (find last space position)<br />=ReturnLastWord<br />=SuperTrim<br /></span></span><span style="font-size: 85%;"><span style="font-family: courier;">=CountWords</span></span></p><p></p><p><i><span style="font-size: x-small;">This article was originally written for OfficeXP and has been re-written for Excel 365</span></i>.<br />
<span style="font-size: 85%;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-size: 85%;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUUlLRFxqMixhve06MBGH4bz8qigp9zLMHxKfp0l1zLZjwhWET_dTQD4vESUoL2E3e3kjNEaeWLuCjSXetCMkJpZqYS05ga8O8Le11ILYBFFv0_x21KLjf5tK1nNRoaIuUGZxVU2rrc4MrIVrLNSMIkp0ScsOBbdEpjSo9J5_3Pk-IFjH0lA8kFhu3QgfD/s430/2009-05-ExcelUDFBanner.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="230" data-original-width="430" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUUlLRFxqMixhve06MBGH4bz8qigp9zLMHxKfp0l1zLZjwhWET_dTQD4vESUoL2E3e3kjNEaeWLuCjSXetCMkJpZqYS05ga8O8Le11ILYBFFv0_x21KLjf5tK1nNRoaIuUGZxVU2rrc4MrIVrLNSMIkp0ScsOBbdEpjSo9J5_3Pk-IFjH0lA8kFhu3QgfD/s320/2009-05-ExcelUDFBanner.png" width="320" /></a></span></div><span style="font-size: 85%;"><br /></span><br />
<span style="font-size: 130%;">Excel User-Defined Formulas: Tutorial</span><br />
<br />
Excel makes it famously easy to build formulas that are so horrendously long they become unmanageable. This article describes a way to tame complicated formulas by writing your own Excel User-Defined Functions. <br />
<br />
In other words, Excel has built-in functions, such as "=Sum", "Find", "Mid", "Left." Now you can write your own equal-sign-keywords. This moves the complexity out of the spreadsheet and places it within a mini Visual-Basic program. The VBA program is easier to maintain and easier to read.<br />
<br />
Benefits:<br />
<p></p><ul>
<li>The function is written once but can be called many times</li>
<li>Allows for if-statements, nested-ifs, switch statements, and other logic</li>
<li>Logic is formatted with indentations, making it easier to read<br /></li>
<li>Transportable to other sheets</li><li>Works for any version of Office </li><li>Will blow people's minds when they see how smart you are<br /></li>
</ul><p>
<br />
<span style="font-weight: bold;">Standard Excel Formulas:</span><br />
<br />
<span style="font-size: 180%;">A</span>s an introduction, spend a moment reviewing Excel's "Find" function. <br /><br />"Find" locates any character (or group of characters) and returns the first position of the found-character. For example, if cell A3 contained the text<br />
<br />
"<span style="font-family: "courier new";">Dogs, Cats, Mice, and Mooses</span>"<br />
<br />
This formula:<br />
<br />
<span style="font-family: "courier new";">=find(" ",A3,1)</span><br />
<br />searches for and finds the first-found space, starting at position 1. In this example it returns a numeric 6. Try this yourself by typing the formula in cell B3.<br />
<br />But what if <span style="font-style: italic;">last</span> space position is needed? <br />Excel does not have a native way to do this. <br /><br />This is where you can write your own function.<br />
<br />
<br />
<span style="font-size: 130%;"><span style="font-weight: bold;">Simple User-Defined Function:</span></span><br />
<br />
In this section, write a user-defined Excel function that locates the "last space" in a string, returning a numeric value - the horizontal position of the space.<br />
<br />Consider the phrase "Dogs, cats, Mice, and Mooses", typed in Cell A3.<br /><br />In cells B3, C3, and D3, could be these formulas:<br /><span style="font-family: courier;">=LastSpacePos(A3)</span> = 22<br /><span style="font-family: "courier new";">=CountWords(A3)</span>, returning "5" or<br /><span style="font-family: courier;">=ReturnLastWord(A3)</span> returns "Mooses".
</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPHBvGGMjRkNsiyhrSASunt7OmFjLnJUDnzC2IjNwsxBwsxg4G9pN3btFK7DGONs1olHXI9FpbrzxQplcE0nOkG0PUcCLiSb-GMWATFRZ6789HOWvmJEPJWA0RUk58aWaIDEnILD_6FOh-gTuxEi865z4JmwLhFqfZxASuoABbTdIeT7i22X5_9IjcdNVw/s873/2009-05-ExcelUDFIntro.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="378" data-original-width="873" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPHBvGGMjRkNsiyhrSASunt7OmFjLnJUDnzC2IjNwsxBwsxg4G9pN3btFK7DGONs1olHXI9FpbrzxQplcE0nOkG0PUcCLiSb-GMWATFRZ6789HOWvmJEPJWA0RUk58aWaIDEnILD_6FOh-gTuxEi865z4JmwLhFqfZxASuoABbTdIeT7i22X5_9IjcdNVw/w400-h174/2009-05-ExcelUDFIntro.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><p>"<span style="font-family: courier;">=CountWords</span>", "<span style="font-family: courier;">=FindLastSpacePos</span>", and "<span style="font-family: courier;">=ReturnLastWord</span>" are not normal Excel functions. </p><p> <br />Write these new functions using Excel's Visual Basic Editor. Yes, this is an actual programming language. Do not panic.<br /><br />To build the function, follow these steps, starting with a new, blank sheet:<br />
<br />A. Since Macros can be a virus vector, security has to enable the feature.<br /><br />In Excel, select File, <b>Options</b><br />On the Left-Nav, choose "<b>Trust Center</b>", then "<u>Trust Center Settings</u>"<br />Choose "<b>Disable VBA Macros with notification</b>" <br />(in other words, you are prompted before they are allowed).<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8xwhnCi1AJFU4v1XSNhbMhDGLo4A3OuheitXEKQqxesJVCIUlS89Fa9F9F_Fs77gpp0gwDqgznlNVIiFe8NmwjpEzrE0PrhELQDWC0M5jdI028YwXnaqpzbN0r_fE1Rubn02xCJr9IoBL9F5x5GZ4ntULQWV4pjdVqQj9SbeQVSHBa6JUfI_OLr4DvMsp/s975/2009-05-ExcelUDFTrustSettings.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="587" data-original-width="975" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8xwhnCi1AJFU4v1XSNhbMhDGLo4A3OuheitXEKQqxesJVCIUlS89Fa9F9F_Fs77gpp0gwDqgznlNVIiFe8NmwjpEzrE0PrhELQDWC0M5jdI028YwXnaqpzbN0r_fE1Rubn02xCJr9IoBL9F5x5GZ4ntULQWV4pjdVqQj9SbeQVSHBa6JUfI_OLr4DvMsp/s320/2009-05-ExcelUDFTrustSettings.png" width="320" /></a></div><p><br /><br /> B. For test data, type in Cell A3, no quotes:<br /> <br />"<span style="font-family: "courier new";">Dogs, cats, Mice, and Mooses</span>" <br />
Press Enter.<br />
<br /><b><u>Start the VBA Editor</u></b><br /><br />
1. From the new sheet, start the Visual Basic Editor:<br />
<br />Press Alt-F11<br />
(or on the Ribbon, View, "Macros")<br />
<br />
<br />
2. In the Visual Basic (VBA) editor, left-Nav, highlight your workbook at the top of the tree (e.g. "VBAProject Book1")<br />Select menu "Insert, Module"</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxzm2Zz_RTu3QeDznL-WWKuL3HJ8CSS-K2aeQ2KlsfDrFAntmFqBlWFKYxs7BcuiXi6kRQxetVC6kPs5YeOjSJPxrlExwB_LjwrtmmrYP_Hblcq9napkL_FPNwX6xHpy8gApufmHB6LMMo84h1gykaeKg8EO_Y5svnHg0726UqPCwTxBTSa62moD0hKRQo/s872/2009-05-ExcelUDFNewModule.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="514" data-original-width="872" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxzm2Zz_RTu3QeDznL-WWKuL3HJ8CSS-K2aeQ2KlsfDrFAntmFqBlWFKYxs7BcuiXi6kRQxetVC6kPs5YeOjSJPxrlExwB_LjwrtmmrYP_Hblcq9napkL_FPNwX6xHpy8gApufmHB6LMMo84h1gykaeKg8EO_Y5svnHg0726UqPCwTxBTSa62moD0hKRQo/w400-h236/2009-05-ExcelUDFNewModule.png" width="400" /></a></div><br /><span style="font-style: italic;"><br /></span><p></p><p style="margin-left: 80px; text-align: left;"><span style="font-style: italic;">The new Module name, probably called "Module1", is added to the tree-diagram</span>. The module can hold one or more functions. It is typical to have a stack of them within Module1. The name, Module1, is not particularly important. <br /></p><p> <br />3. Code in the blank editing Window.<br />
<br />
In the blank editing panel (Book1 - Module1 (Code)), type this statement, which tells VBA to require declared variable names – <span style="font-style: italic;">this statement is recommended for all VBA Macros</span>:<br />
<br />
"<span style="font-family: "courier new";">Option Explicit</span>" (no quotes, press enter when done)<br />
</p><p></p><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnKfdratyGJF6te42Mipf0i56X_LrPb4G46ZnTMDty3l56egj-NbsBdoZteBfO6iYvbvnyVA4pVNeiN4NhoDywwu-hFKUcD6-q5F3Cc2j6JE8GbbFF5eLJlYLIQxPYcaolxp3URjbxzvzi6MFksdOg6QfHeLWRE62umos86byvXQhf4thW47TXNehUUfX0/s1000/2009-05-ExcelUDFFirstFunction.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="246" data-original-width="1000" height="158" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnKfdratyGJF6te42Mipf0i56X_LrPb4G46ZnTMDty3l56egj-NbsBdoZteBfO6iYvbvnyVA4pVNeiN4NhoDywwu-hFKUcD6-q5F3Cc2j6JE8GbbFF5eLJlYLIQxPYcaolxp3URjbxzvzi6MFksdOg6QfHeLWRE62umos86byvXQhf4thW47TXNehUUfX0/w640-h158/2009-05-ExcelUDFFirstFunction.png" width="640" /></a></div><br />4. On the next line down, invent a new function called "FindLastSpacePos" routine by literally typing this statement on the next blank line (type on one line, no word-wrapping):<br />
<br />
<span style="font-family: "courier new";">Public Function FindLastSpacePos <br /><span> </span><span> </span><span> </span>(ByVal passedCell as String) As Integer</span><br />
<br />Complete the remainder of the function by typing or copying the rest of the routine. Type the text carefully, including upper and lower-case. The words "End Function" mark the end of the routine.
<br />
<br />Edit, Copy (or type Control-C)<br />
<code><br />Option Explicit<br /><br /><b>Public Function FindLastSpacePos (ByVal passedCell As String) As Integer</b><br /> 'This function returns a numeric value showing the last space position of a cell<br /> 'Use: =FindLastSpacePos(Celladdress)<br /><br /> Dim ihpos1 as integer 'Horizontal Position<br /> ihpos1 = Instr<span style="background-color: #d9ead3;">Rev</span>(passedCell, " ")<br /><br /> 'Return the results to the calling function:<br /> FindLastSpacePos = ihpos1<br /><br /><b>End Function</b></code><br />
<br />
<br />
3. Close the Visual Basic editor by clicking the Big-X, in the upper Right corner (no need to "Save;" it saves automatically). This returns you to the spreadsheet. <span style="font-style: italic;">See Office 2007/2010/2016 Save Warning, later in this article.<br /> </span><br />
<span style="font-style: italic;">where:</span><br />
<p></p><ul>
<li>"<span style="font-family: "courier new";">Public Function</span>" means the function is visible to the Excel Spreadsheet. (As an aside, "<span style="font-family: "courier new";">Private Functions</span>" would only be visible to the VBA routines).<br /> </li>
<li>"<span style="font-family: "courier new";">ReturnLastSpacePos</span>" is an arbitrary name invented to describe the function and this is the name that will be typed in the Excel sheet (e.g. <span style="font-family: "courier new";">=ReturnLastSpacePos...</span>).<br /><br /><span style="font-family: "courier new";">"passedCell</span>" is an invented name, which represents the first value passed into the function. In the example, <span style="font-family: "courier new";">=ReturnLastSpacePos(A1)</span> – cell A1 is the first passed parameter and it gets temporarily re-assigned the name "passedCell" once it arrives in the new function.<br /> </li>
<li>"<span style="font-family: "courier new";">passedCell</span>" must be declared as a <span style="font-family: "courier new";">String, Integer</span>, "<span style="font-family: "courier new";">Float</span>", etc. This tells the function what 'type' of value is expected. "<span style="font-family: "courier new";">Integer</span>" means a non-decimal-number, "<span style="font-family: "courier new";">Float</span>" means decimals are allowed, and "<span style="font-family: "courier new";">boolean</span>" means True/False.<br /> </li>
<li>In Excel, the keyword "<span style="font-family: "courier new";">ByVal</span>" is required for all passed parameters.<br /> </li>
<li>Ultimately, the function "returns" an integer (the answer) to the calling-spreadsheet; note the "<span style="font-family: "courier new";">As Integer</span>" after the closing parenthesis. In other words, the function itself has a 'type'.</li>
</ul><p>
<br />
<span style="font-size: 130%; font-weight: bold;"><span style="font-size: small;"><u>Testing the New Function</u>:<br /></span></span><br />
Return to the spreadsheet. Assuming a test-string is in cell A3 ("Dogs, cats, mice, and mooses"), type this formula in cell B3:<br />
<br />
<span style="font-family: "courier new";">=FindLastSpacePos(A3)</span><br />
<br />
Press Enter.<br />
<span style="font-style: italic;">Results: B3 should report "23": The 23rd position in the string is the last-space in the string.</span><br />
<br />
<br />
<span style="font-size: 130%; font-weight: bold;">Write a Return Last Word:</span><br />
<br />
<span style="font-size: 180%;">C</span>ontinue the example by writing a second module that parses the last word from the phrase. <br /><br />The new function is called "=ReturnLastWord" and it uses the previous function as a subroutine, further demonstrating the power of UDFs.<br />
<br />
1. Press Alt-F11; returning to the Visual Basic Editor.<br />
<br />
2. Confirm "Module1" is highlighted on the tree-side and locate your previously-written code (you should arrive there, by default)<br />
<br />
3. Place the editing cursor after the last End Function statement. <br />Press return a few times, inserting blank lines for cosmetics.<br />
<br /><br />
4. Create a new function called "ReturnLastWord".<br /><br />
Type this code, including the "Public Function" <span style="font-style: italic;">statement</span>:</p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibjef5YFOJuM2GajA-ve9fIigyZvzmufrcSZ2tTVRE3RlSzcdurBUzfg-38KodIF8VoO3hpOJ0GCt3V2e6XW84gAScDeZ9iTIjNN7yws_FD63wBjVRq-sn4mY_HjqypdDMBPpHfQ6M5ndpL5RBNSJbyOTTajzFd57s8KppV_yqqOnfC_ygW_R_Lc9dxhYs/s886/2009-05-ExcelUDFSecondFunction.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="601" data-original-width="886" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibjef5YFOJuM2GajA-ve9fIigyZvzmufrcSZ2tTVRE3RlSzcdurBUzfg-38KodIF8VoO3hpOJ0GCt3V2e6XW84gAScDeZ9iTIjNN7yws_FD63wBjVRq-sn4mY_HjqypdDMBPpHfQ6M5ndpL5RBNSJbyOTTajzFd57s8KppV_yqqOnfC_ygW_R_Lc9dxhYs/w400-h271/2009-05-ExcelUDFSecondFunction.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><br /><p></p><p>Code: Or cut and paste:<br />
<br />
<code><br /><b>Public Function ReturnLastWord (ByVal passedCell As String) As String</b><br /> Dim ihpos1 as Integer<br /> Dim strlastWord as String<br /><br /> ihpos1 = FindLastSpacePos(passedCell)<br /> strlastWord = Mid(passedCell, ihpos1 + 1, 9999).Trim()<br /><br /> ReturnLastWord = strlastWord<br /><br /><b>End Function</b></code><br />
<br />
where:<br />
<br />
* Calculate where the last word is by calling the previously-written "FindLastSpacePos" routine (which returns the numeric position of the last word.<br />
<br />
* The "Mid-string" command substrings from the last-space-position plus 1 (which skips the space), parsing until the end of the string (e.g. 9999 characters). I added a .Trim() to remove leading and trailing spaces that might be typed by the end-user.<br />
<br />
* On the last statement, return the answer with <span style="font-family: "courier new";">ReturnLastWord = strlastWord</span>.<br />
<br />
5. Close the Editor and return to the sheet.<br />
<br />
<span style="font-weight: bold;"><br /><span style="font-size: small;"><u>Testing ReturnLastWord</u>: </span></span><br />
<br />
In the Excel sheet, move to cell C3 and type this formula, which uses the new function name: <br /><span style="font-family: "courier new";"><br />=ReturnLastWord(A3)</span><br />
<br />
<span style="font-style: italic;">Results in Cell C3: "Mooses".</span><br /></p><p>In cell A3, type other test-text, including single-word sentences and sentences that end with differing text. The should always find the last word.<br />
<br /><b><u>Errors</u></b>:</p><p></p><p>If <span style="background-color: #fcff01;">errors are found while testing</span>, the function's name will be highlighted in yellow and an obscure and unhelpful error message displays. Click the square "Stop" icon in the VBA editor to stop the program. Review the code. Re-type the formula in the sheet to test again.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv4XX5AY9PrIu0W3kuUjM1kqY-aChFqcPOu8uH4uzLm1MEUrc2rxM_j1fJVQMlMf13rUnhqTvUToic4Kdqywwy_KTnpQWN_qSsE-reijOY9_AgGh-q00PATvvnFFH1qg-6Yzkt78CDhza2203biVmk4W0jkcsOsWVHzTOnNirQ2Tg0pTqa2ey8WC27RIeC/s1000/2009-05-ExcelUDFErrros.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="304" data-original-width="1000" height="121" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv4XX5AY9PrIu0W3kuUjM1kqY-aChFqcPOu8uH4uzLm1MEUrc2rxM_j1fJVQMlMf13rUnhqTvUToic4Kdqywwy_KTnpQWN_qSsE-reijOY9_AgGh-q00PATvvnFFH1qg-6Yzkt78CDhza2203biVmk4W0jkcsOsWVHzTOnNirQ2Tg0pTqa2ey8WC27RIeC/w400-h121/2009-05-ExcelUDFErrros.png" width="400" /></a></div><p><br /><b><u>Count Words and SuperTrim</u>:</b><br /><br />A routine to count the words in a cell will work most of the time by counting the spaces between words, but it will make a mistake if double-spaces were used. Normally, this could be fixed with a .TRIM(), which removes leading and trailing spaces -- but .Trim() does not work with interior spaces. <br /><br />Resolve this with a helper routine I like to call "SuperTrim" -- this trims leading and trailing spaces, as well as duplicate interior spaces. Write this function first. I admit this is a sneaky block of code I've written and it is beyond the scope of this article to explain how it works:<br /><br />As before, below the last "End Function", create a new routine with this code:<br /><br /><code><span style="font-family: courier;"><span><b>Public Function SuperTrim(strtextIn, Optional trimChar = " ") As String</b><br /> 'Remove multiple duplicate spaces from the interior of a string (cell)<br /> 'Note: this module appends to its own return value, making it quasi-recursive<br /><br /> On Error GoTo LocalError<br /><br /> trimChar = CStr(trimChar)<br /> SuperTrim = CStr(textIn)<br /> <br /> SuperTrim = Replace(SuperTrim, trimChar, vbNullChar)<br /> While InStr(SuperTrim, String(2, vbNullChar)) > 0<br /> SuperTrim = Replace(SuperTrim, String(2, vbNullChar), vbNullChar)<br /> Wend<br /><br /> ' Delete Leading and Trailing<br /> If Left(SuperTrim, 1) = vbNullChar Then<br /> SuperTrim = Right(SuperTrim, Len(SuperTrim) - 1)<br /> End If<br /> <br /> If Right(SuperTrim, 1) = vbNullChar Then<br /> SuperTrim = Left(SuperTrim, Len(SuperTrim) - 1)<br /> End If<br /><br />LocalError:<br /> 'You can also fall into this routine legitimately; not just as an error<br /> SuperTrim = Replace(SuperTrim, vbNullChar, trimChar, , , vbTextCompare)<br /><br /><b>End Function </b></span></span></code><br /></p><br /><p><b><u>Count Words</u></b>:<br /> <br />The final "Count Words" function calls the SuperTrim function, and then counts the interior spaces:<br /><br /><code><span style="font-family: courier;"><b>Public Function CountWords(textIn) As Integer</b><br /> 'Counts the number of space-delimited words in a string, including <br /> 'leading and trailing words.<br /> 'Words are super-trimmed<br /> <br /> Dim icount As Integer<br /> Dim i As Integer<br /> textIn = SuperTrim(textIn)<br /> icount = 0<br /> <br /> If Len(textIn) > 0 Then<br /> For i = 1 To Len(textIn) Step 1<br /> If Mid(textIn, i, 1) = " " Then<br /> icount = icount + 1<br /> End If<br /> Next i<br /> 'Account for single-word strings because Len > 0<br /> icount = icount + 1<br /> Else<br /> 'icount = 0 because of zero len<br /> End If<br /> <br /> CountWords = icount<br /><br /><b>End Function</b></span></code><br /><br /><b><br />Testing:</b></p><p>Back to the sheet, in an empty cell, use these formulas:<br /><br /><span style="font-family: courier;">=CountWords(A3)</span><br /><br />Add redundant interior spaces in the text text<br /><br /><span style="font-family: courier;">=SuperTrim(A3)<br /></span><br />Note the extraneous spaces are collapsed.<br /></p><p></p><p><br /></p><p><b><span style="font-size: large;">Saving:</span></b><br />
<br />When the sheet is saved with a special extension, the macros are packaged with the sheet. Optionally, the macros can be saved separately, so they can be used in any sheet. Follow these steps carefully.<br /><br />
By default, Excel saves sheets as ".XLSX" -- but this <u>will strip-out the macros</u> as it saves! <br /></p><p style="margin-left: 40px; text-align: left;">When prompted: 'The following features cannot be saved in macro-free workbooks." Click "No" (a counter-intuitive menu). On the next dialog, change the "File Type" from XLSX to <span style="background-color: #fcff01;">XLS<u>M</u></span> (or get the the same menu using "File, <u>Save-As</u>", choosing "Excel Macro xlsm"). <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqyVxAoOFkznUootGBThGHbTT1ALCsZ60BLd7WPZbqYPzeUDcAs4850B7CzM2S5l3M-UWRSdIR-f81ulfGAXsiMFMbDE9XzXPqcROH4H7wjTSIC-lHjYOSkuAkHlDNVCdGC49tx4iYQ86Lqp-yaSAMqx9tuUJ8fBi1cWYlyXZWUksm9Ihobpq_dUeyDrRz/s907/2009-05-ExcelUDFSaveAsXLSM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="306" data-original-width="907" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqyVxAoOFkznUootGBThGHbTT1ALCsZ60BLd7WPZbqYPzeUDcAs4850B7CzM2S5l3M-UWRSdIR-f81ulfGAXsiMFMbDE9XzXPqcROH4H7wjTSIC-lHjYOSkuAkHlDNVCdGC49tx4iYQ86Lqp-yaSAMqx9tuUJ8fBi1cWYlyXZWUksm9Ihobpq_dUeyDrRz/w640-h216/2009-05-ExcelUDFSaveAsXLSM.png" width="640" /></a></div><p style="margin-left: 40px; text-align: left;">Be aware that most email systems block xlsm sheets as attachments because macros can do nefarious things; the cyber-security folks will be nervous. <br /></p><p><br />If by accident the macros are stripped, they are not recoverable and will have to be re-written. Missing macros appear in a newly-opened sheet as "#Name?" -- indicating the underlying macro/UDF is missing.
<br />
<br />
<span style="font-size: 130%; font-weight: bold;">Permanently SAVING MODULE 1</span><br />
<br />The macros can be saved externally from Sheet1 and with this, the can be imported and used in any worksheet. This is what I do.<br /> <br />
1. Open the Macro VBA Editor with "Alt-F11". Locate Module1<br />
2. Highlight Module1's Name<br /> <br />
3. In the Properties Window (below the tree diagram), change the (Name) from 'Module1' to a more meaningful name. I recommend "<span style="font-family: courier;">M800_Util</span>", or any name of your choosing.<br /> <br />
4. In the tree-diagram, "other-mouse-click" the newly-renamed M800_Util, <br />Choose "Export"<br /> <br />
5. Browse to a good directory (for example, C:\Data\Source\CommonVB)<br />
6. Accept the filename "M800_Util.bas" (note the .bas - basic - extension)<br />
<br />
<span style="font-size: 130%; font-weight: bold;">Importing in a New Sheet:</span><br />
<br />
1. From any blank, new sheet: Alt-F11 to open the Visual Basic Editor<br />
2. On the tree-side, highlight the spreadsheet name (e.g. Book1)<br />
3. Other-mouse-click the sheet's name, choose "Import File"<br /> <br />
4. Browse to (C:\Data\Source\CommonVB); <br />Select M800_Util.bas.<br /> <br />
5. Close the VB Editor (The big "X") and return to the sheet. <br /><br />The new functions are now available for use. In any cell, type "=ReturnLastWord()" to test.<br />
<br />
<br />
<span style="font-size: 130%; font-weight: bold;">Advanced Calls:</span><br />
<br />Functions can use multiple input parms. Using commas, pass each value separately, through the parenthesis.<br />
<br />
For example, <span style="font-family: "courier new";">=MyFunction(A1, A2, A3)</span>, where cell 3 is a number and the others are strings. In the module, it would be represented as:<br />
<code><br /> Public Function MyFunction _<br /> (ByVal passedCell1 as String, _<br /> ByVal, passedCell2 as String, _<br /> ByVal, passedCell3 as Integer) as String</code><br />
<br />underscores are a line-continuation flag, making the function's parameters easier to read.<br /><br />
Naturally, better names than "passedCell" should be coined: passedFirstName, passedLastName, passedEmployeeNumber. This example passes three cells. Two are concatenated and the the third (EmployeeNumber) is ignored. <br /><span style="font-size: 78%;"><br /></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ-SO4u7O6kFIJRTDCZ_S5-09y0076TOBj4rUex7qeMjD6aL9rdR1pfAozlto0resqeZAQBtz_MpLPGul1JYCKxwCg2GiPT-_51sH_JpFc9miZXv5dNtgHwRRGzs7mUdlUrVZCpQ-PAmG-nmZJADYxdbWNTHefUYEFdnvAJYqe2LKmnlKwZ05r6g3dyH3y/s906/2009-05-ExcelUDF3Parms.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="653" data-original-width="906" height="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ-SO4u7O6kFIJRTDCZ_S5-09y0076TOBj4rUex7qeMjD6aL9rdR1pfAozlto0resqeZAQBtz_MpLPGul1JYCKxwCg2GiPT-_51sH_JpFc9miZXv5dNtgHwRRGzs7mUdlUrVZCpQ-PAmG-nmZJADYxdbWNTHefUYEFdnvAJYqe2LKmnlKwZ05r6g3dyH3y/w400-h289/2009-05-ExcelUDF3Parms.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><p><br />In an Excel formula, the results of a vLookup could be sent into the downsteam function. For example: <br />
<span style="font-family: "courier new";">=ReturnLastWord(vlookup(...stuff...)) <br /><br />or pass multiple values this way: <br />=MyFunction(A1, vlookup(....), B3&B5)</span><br />
<br />
<br />
<span style="font-weight: bold;">Summary:</span><br />
<br />This is a taste of how to write functions in Excel. Admittedly, it is helpful to know Visual Basic, but this article should get you started. Writing this same logic in a native Excel formula would be nearly impossible. <br />
<br />Tucking the logic within a procedural language, the spreadsheet becomes almost readable because the keywords can be self-explanatory (ReturnLastWord, SuperTrim, etc.). But more importantly, the cells can now contain if-then statements, loops, case-selects, subroutines, and any other complicated logic you can imagine. A long Excel if-statement could be reduced to a simple keyword, with some passed parameters. <br />
<br />
<br />
<span style="font-weight: bold;">Followup:</span><br />
I found this gem on the net the other day: This standard Excel formula also parses the last word in a string and is very creative in how it works:<br />
<br />
<span style="font-family: "courier new"; font-size: 85%;">=RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1," ","*",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))) </span><br />
<br />
There is a tradeoff here: the =FindLastWord function is esoteric and most Excel users do not understand how it works, but I would argue most Excel users do not understand this formula either. If the formula needed to be debugged, which is easier?<br />
<br />
Related Keyliner articles:<br />
Using Excel for Raffle-Ticket Drawing: <a href="http://keyliner.blogspot.com/2010/10/prizeorama-raffle-ticket-selection-in.html">Prizeorama</a><br />
<a href="http://keyliner.blogspot.com/2010/02/excel-vlookup-how-to.html">Excel VLookup</a> - a complete tutorial<br />
Excel <a href="http://keyliner.blogspot.com/2009/06/excel-coloring-alternate-rows.html">Coloring Alternate Rows</a><br />
<a href="http://keyliner.blogspot.com/2009/05/excel-citystatezip-functions.html">Excel Parsing City-State-Zip</a><br />
Excel <a href="http://keyliner.blogspot.com/2009/11/excel-import-leading-zeroes.html">Importing Text with Leading Zeroes</a><br />
<a href="http://keyliner.blogspot.com/2009/05/reference-these-excelvb-macros-for.html">VB - Return First Word, Last Word, Supertrim</a><br />
<a href="http://keyliner.blogspot.com/2009/07/using-vba-to-send-email.html">Using VBA to Send Email</a><br />
<a href="http://keyliner.blogspot.com/2010/10/prizeorama-raffle-ticket-selection-in.html">Using Excel to select Raffle Tickets - Prize-orama</a><br />
<br />
<br /></p><br />traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-61004616341001733612024-01-21T21:31:00.013+00:002024-02-17T16:03:18.776+00:00CityStateParse - Parse single-line Addresses into CityStateZip<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibXPWuOTogGYRaiT_fs3xgx4mWaTJ5_xiseJ9SZfmsTTMgc9GpBszSYhFnt-YP9FIo8LyJS0-Zg2B4oDa_ObwcIevuSOf0u6l49xc4DGVc1S5zLdp8ETBXRDyw9whFEogVJiEpDUy7E5DV/s1600/1110_ExcelNames_BannerPostagel.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibXPWuOTogGYRaiT_fs3xgx4mWaTJ5_xiseJ9SZfmsTTMgc9GpBszSYhFnt-YP9FIo8LyJS0-Zg2B4oDa_ObwcIevuSOf0u6l49xc4DGVc1S5zLdp8ETBXRDyw9whFEogVJiEpDUy7E5DV/s1600/1110_ExcelNames_BannerPostagel.jpg" /></a>CityStateParse - Parse single-line ASCII street addresses into separate Address-City-State-Zip fields, writing results to a tab-delimited text file.<br /><br />The mailing addresses can be punctuated with commas, or not, and it sees through misspellings and other typos. The program can be run interactively or in an unattended batch mode.<br /><br />For example:<br /><br /><span style="font-family: courier;"><b>"123 North Elm Street Suite 102 Boise ID 83701"</b></span><br /><br />is parsed and returned as:<br />Address: <span style="font-family: courier;">123 N. Elm Street Suite 102</span><br />City: <span style="font-family: courier;">Boise</span><br />State: <span style="font-family: courier;">ID</span> <br />Postal Code: <span style="font-family: courier;">83701</span><br /></p><p></p><p>CityStateParse.exe is a Windows program that can work with both punctuated and un-unpunctuated addresses. It can navigate misspelled, poorly-delimited, and otherwise crappy addressing data. It does not rely on postal-code lookup tables. <br /><br />Using an internal algorithm, it snakes through the line and teases-out
the proper fields. Using terminology from the 1990's, it uses "fuzzy
logic." To be more modern, I can joke and say it uses "AI."<br /><br />With the on-screen panel, you can play with and experiment with single addresses, parsing one at a time, viewing the results on-screen. <br /><br />More commonly, feed it a larger ASCII transaction file. In a few seconds, results are returned as a tab-delimited file that can be read with Excel or other programs. The batch conversion can be run interactively or batch. <br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbEslvvoblr76CYvy0y4GzLNljcgznspk5sxav_qSy8QjImWEEhZgZCYZmH03i_0fv_CqDwQiVXpD7swZRlx4S8EehzQXizfDLjDpGPYgnuUEad2XxrhUPMwkrVhyphenhyphen32h2xIPbmIzYWDtsbWgkEQ2-FkJ0ujl0J47-laoDov_OwB_nr6DybybivpNDQg2-5/s873/Illustration.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="642" data-original-width="873" height="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbEslvvoblr76CYvy0y4GzLNljcgznspk5sxav_qSy8QjImWEEhZgZCYZmH03i_0fv_CqDwQiVXpD7swZRlx4S8EehzQXizfDLjDpGPYgnuUEad2XxrhUPMwkrVhyphenhyphen32h2xIPbmIzYWDtsbWgkEQ2-FkJ0ujl0J47-laoDov_OwB_nr6DybybivpNDQg2-5/w400-h294/Illustration.png" width="400" /></a><br /><br /><br /></p><p>Formerly, this program crunched only CityStateZip fields (CSZ), but now handles CSZ plus addresses. This illustration gives an indication of some of the issues it can dance around.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3VRKnlsk_oQ4gVzgtqgYx_xt-jKgNPZWZTflC6iOdeIh0YD0hmPW6tKS6zL007W3B3FHv72Zmrt7-FlP6Z6ZE4T9tvp3dV_qdHsALJ_Q_wUo-cnmykU4ymeT9R6kQXl2v4KXqkxCPRqrLgCFyeQXQvkFUeWvtcYnXgW1WOGk0NeVFwTqcp46VZ-HntmWF/s499/2015_03_CSZ_Badly.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="431" data-original-width="499" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3VRKnlsk_oQ4gVzgtqgYx_xt-jKgNPZWZTflC6iOdeIh0YD0hmPW6tKS6zL007W3B3FHv72Zmrt7-FlP6Z6ZE4T9tvp3dV_qdHsALJ_Q_wUo-cnmykU4ymeT9R6kQXl2v4KXqkxCPRqrLgCFyeQXQvkFUeWvtcYnXgW1WOGk0NeVFwTqcp46VZ-HntmWF/w400-h345/2015_03_CSZ_Badly.png" width="400" /></a></div><p><br /></p><p><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;">With street addresses, it correctly parses a litany of St. (Saint), St, Street, <br />Ave, Blvd, Court, Cir, Drives, as well as Suites, Ste., Apt, Units, etc.<br />It sees many misspelled states, such as Missisippi, Illinoise, Louiseiana, and others. <br /></span></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: "Courier New",Courier,monospace;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYtilPm9QmrJ4PEBNf0yUn_nfKZTWiTQ6r5iYGasjr-0t_56lTfbXrC38nhHM21gN2PU8x5lx4QtZ-yvIvtBt20u02BWo-KZgpZuE6X_CYlLZ-lQf8Ik5nzslDLu4HM_lhzgEransogu8YqOW39qwUWwuYQHFfATy7RU2pUdy6dtDqNbCKrySbjFpoErNQ/s168/SaintIconWhit.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="168" data-original-width="134" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYtilPm9QmrJ4PEBNf0yUn_nfKZTWiTQ6r5iYGasjr-0t_56lTfbXrC38nhHM21gN2PU8x5lx4QtZ-yvIvtBt20u02BWo-KZgpZuE6X_CYlLZ-lQf8Ik5nzslDLu4HM_lhzgEransogu8YqOW39qwUWwuYQHFfATy7RU2pUdy6dtDqNbCKrySbjFpoErNQ/s16000/SaintIconWhit.png" /></a></span></div><p><span style="font-family: "Courier New",Courier,monospace;"><br /></span><span style="font-family: courier;">123 N. Elm <span style="background-color: #fcff01;">St.</span> <span style="background-color: #ffa400;">St.</span> Marys ID 83701</span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;"> (street vs saint)<br /></span></span><span style="font-family: courier;">224 E. Oak <span style="background-color: #fcff01;">St.</span> <span style="background-color: #ffa400;">St.</span> Martin's City Wash. 83701</span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;"><br /></span></span></p><p></p><p><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;">(<i>There are a lot of cities named "Saint this and Saint that" and this program can figure all of them out.</i>)<br /><br />Results:<br />a tab-delimited file with these columns:<br /></span></span><span style="font-family: courier;">Address<br />City<br />StateCode<br />PostalCode<br />Country</span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;"> (if present)<br /><br /><b>Running in Batch:</b><br />To parse multiple addresses -- thousands of addresses -- place them in an ASCII text file, one address per line. From the panel, use the 'Alternate Input File' field (third field on panel), and click "Parse". <br /><br /><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;">(must be a text file, with one address (aCSZ) per line, CRLF between records, </span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;">no tabs</span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;">)</span></span><br /><br /><br />Or pass the input file as a command-line parameter: <br /><br /></span></span><span style="font-family: courier;"><span><b>CityStateParse.exe C:\temp\myaddresses.txt </b></span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;"><br /><br /></span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Times, "Times New Roman", serif;">When passed as a command-line, the program loads, parses, writes the results, then closes. The output file is named with a date and arrives in the same directory as the source. The program must have 'write' permissions to the folder.<br /></span></span><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_xqAGFg4bEPs-H6_YTcE_U2ywgqRi_dS-qp1utF4dVTRO8uvni82gtTYLxtmVYyAXSEDwONHrQcI5TUtxeuLJkH_IxSRzzhGFIQhB6f1Io_NGPx8GnY9GtaK4bfjJUOkiixGTBvSe7BqFyycX8hMsXx9EBvwtgQ-YCE-D2k_rbtMS65QOhOeVU7OYafie/s100/StampIcon.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="100" data-original-width="93" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_xqAGFg4bEPs-H6_YTcE_U2ywgqRi_dS-qp1utF4dVTRO8uvni82gtTYLxtmVYyAXSEDwONHrQcI5TUtxeuLJkH_IxSRzzhGFIQhB6f1Io_NGPx8GnY9GtaK4bfjJUOkiixGTBvSe7BqFyycX8hMsXx9EBvwtgQ-YCE-D2k_rbtMS65QOhOeVU7OYafie/s1600/StampIcon.png" width="93" /></a></div><p>"CityStateParse" is a keyliner-developed program that is free for all personal, commercial, and government use.<br /><br />There is no registration<br />No email<br />No nagging<br />No advertisements<br />No spying<br />No cost<br /></p><p>------------<br /><b> <br />A. Download Link</b>:</p><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">From Keyliner's public GDrive, click this link and download to a <b>temp</b> or <b>download</b> directory. <b><i>Do not download directly into ProgramFiles</i>.</b> <br /></p></div><div style="margin-left: 40px; text-align: left;"><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s45/DownloadIcon_Small.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="45" data-original-width="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s0/DownloadIcon_Small.png" /></a></div><p>Download Link: <br /><br /><a href="https://drive.google.com/file/d/1HFrACrc5Z-KQ8PSK1GWzNNs7WTsrDPwf/view?usp=drive_link" target="_blank">CityStateParse.exe Download</a><br />- Version 2.03 (2024.02). Contains standalone .exe. <br /><br /></p><div class="separator" style="clear: both; text-align: center;">
</div><p>
</p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;"><a href="https://drive.google.com/file/d/1HFrACrc5Z-KQ8PSK1GWzNNs7WTsrDPwf/view?usp=drive_link" target="_blank">CityStateParse.exe</a> MD5 check:<i><br /><br /></i>MD5: <span style="font-family: courier;"><span style="font-size: x-small;">5a-37-34-a4-5f-53-47-fb-4e-eb-17-b0-8f-f0-28-3e</span></span><br />SHA256: <span style="font-family: courier;"><span style="font-size: x-small;">abf621944eb8df2d8386fb2ee1383cdf60b403b2c353620ff98b003979cf6034</span></span><br />Len: <span style="font-family: courier;"><span style="font-size: x-small;">169K</span></span><br /><i><br /></i></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">When downloading, different browsers behave differently. <br />You will be prompted the file cannot be scanned. Click "Download anyway"<br /></p></div><div style="margin-left: 40px; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s498/2021-05-DirectoryPulseCantScan.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="123" data-original-width="498" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s320/2021-05-DirectoryPulseCantScan.png" width="320" /></a></div></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">Microsoft Edge:<br />Prompts "CityStateParse.exe" was blocked because it could harm your device (it is an .exe from the Internet). <br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">"Click See More" and allow the download. <br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">With Microsoft Edge, the downloaded file appears in your Downloads directory with a random name, such as "<span style="background-color: #04ff00;">Unconfirmed 780359.crdownloaded</span>" (name varies). Use File Explorer to <b>rename</b> the file to "CityStateParse.exe".<br /><br />(keyliner.com cannot afford a code-signing certificate, which would help this situation.)<br /></p></div><div style="text-align: left;"><p style="text-align: left;"><b>B. Mark the program as safe-to-run</b>:<br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;"><i>(This step may not be needed if downloaded by Edge and you clicked "More / Download Anyway")</i><br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">Using File Explorer, right-mouse-click the downloaded (and re-named) .exe <br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">Select "Properties"<br />Check [x] Unblock. <i>This removes the "mark of the web."</i> </p></div><div style="margin-left: 40px; text-align: left;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s615/2021-05-DirectoryPulseMarkOfWeb.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="615" data-original-width="604" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s320/2021-05-DirectoryPulseMarkOfWeb.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"> Click for larger view<br /></td></tr></tbody></table></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">* Only do this if you trust
keyliner *and* only if downloaded from keyliner's public GDrive. </p></div>If
"Unblock" is not visible, it has already been unlocked (by Microsoft
Edge). <br />Once [x] Unblocked is clicked, this security menu disappears. <br /><br /><u>The program is ready to run</u><br />a) Launch one-time (from the download directory) to generate a control.ini file (CityStateArrays.ini).<br /><br />b) Move the .exe and the .ini file to any directory of your choosing, typically C:\Program Files\Util<br /><br /><p><b><u>Installation: First-time Run</u>:<br /></b><br />The download does not need to be installed. <br />Download the .exe and run.<br /><br />For the first-time run, CityStateParse.exe, must be run from a directory where users have create rights. On this first run, the program builds a control-INI file, which contains various city-state rules (or download separately).</p><div style="margin-left: 40px;">To install, download the .exe and place in any temp folder on your hard disk<br />Launch the program once to create the control.ini file<br />Move the executable plus the .ini to a location of your choosing, such as C:\programFiles\Util<br /><br /></div><p><b>The Control .ini File:</b><br />CityStateArrays.ini is an editable ASCII text file that contains State-code cross-references, <br />city-prefix, and suffix rules (with words like "saint", "grand", "new", "gardens", "springs",
etc.), as well as common two and three-word city names that do not fall into
the prefix rules. These guide the parsing steps.<br /><br />Usually, this file is not edited and does
not need to be changed. But if you find a city that does not parse as expected (where part of the city name arrives in the Street Address), make adjustments here. New state and city rules can be added and take affect when the program loads. It is a fun file to review.<br /><br />This file is fragile,
with no auditing. Edit with care. It follows a fixed format; with
case-sensitive entries, blank-line sensitive. If the file is damaged, delete and re-launch -- a new default version is
re-created.<br /><br />The program was designed for US and
Canadian addresses and probably is not useful in other countries. This
has been tested with tens of thousands of addresses and it is remarkably
accurate. Canadian addresses have been lightly tested. </p><p><b>Cardinal Comments N S E W:</b><br />Considerable effort was spent on address problems with North, South, East, West. For example, should these cardinals land on the street address or the city name? <br />123 Elm <u>East</u> Newark, NJ (there is a city called East Newark)<br />4100 E Highway <u>South</u> Ogden, UT (there is a city called South Ogden)<br />354 <u>East</u> Hampton North NY (unbelievably not North NY)<br /><br />The program attempts to solve this by having an actual inventory of all US cities with a cardinal in their name. If the address has an identifiable street address (such as Suite 103F, Apt 100, the word "Street", etc.), it uses it to help de mark where the city name begins. User-typed punctuation (commas) are too unreliable and are generally ignored.</p><p></p><p></p><p><br />Your feedback welcome. <br />If you make changes to the .ini file, I would like to know what address you were trying to fix and what changes you made.<br /></p><p></p><p></p><p></p><p><br />
<u>Version History</u>:<br />
1.01 Initial Release as a DLL in 2015. This has been retired and is no longer available.<br /><br />2.00 2024.01 <br />First Windows version (non DLL); consumes transaction files<br /><br />2.03 2024.02<br />Improved "city name" detection. It was good before. Now fantastic.<br />
</p><p><br /><br />
Related Articles:<br />
At <a href="http://keyliner.com">keyliner.com</a>, see other blog entries and other keyliner-developed programs:<br /><br /><a href="https://keyliner.blogspot.com/2022/06/device-id-asset-tag-management.html" target="_blank">DeviceID</a> - free asset Tag Management for home and small businesses<br /><a href="https://keyliner.blogspot.com/2021/05/directorypulse-keyliner-backup-software.html" target="_blank">DirectoryPulse</a> - a free and nifty backup program<br />
<br />This program was written using techniques from my programming books, "War and Peace Programming C#" (search Amazon). <span style="background-color: white;"> <a href="https://www.amazon.com/War-Peace-Programming-Instructor-Workbook-ebook/dp/B09QZZPPY9/ref=sr_1_5?crid=35F7JOMBN5UE8&keywords=war+and+peace+programming&qid=1656549821&sprefix=war+and+peace+programming%2Caps%2C135&sr=8-5" target="_blank">War and Peace Programming Volume 6</a> (Visual Studio C#). </span> <br /><br /><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-64235165291345943902023-11-11T04:08:00.017+00:002023-11-27T04:45:06.519+00:00Is a Cheap Celeron PC good enough for Grandma?<p>Is a cheap Celeron PC good enough for Grandma?<br />Is a low-end computer good enough for Grandma?<br />Is an inexpensive computer good enough for Grandma?<br />2023.11.15</p><p>Amazingly, Grandma has a Dell Windows XP-era machine (vintage 2008) in need of an upgrade. Although she has a capable laptop, she also wanted a desktop computer for the printer, scanner, and regular keyboard and monitor. *Anything* would be an upgrade from her current setup. <br /><br />The local Best Buy had two low-end machines: An "Acer - Aspire XC-840" for $300, and a "Lenovo IdeaCentre 3i" for $400. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN09XlVRjeuZv4-y6mO10dJE0xRNETj3I8hNB_ELsuRT8wpC8YF7u5Ta0tdaXkswPCwsc3B-rwGM0VBLnMLPKPXvWjfvrypkR6waJs60gkJY2W5UHGSsUpXFVbPnFP6vAhkxe2VmuY4LFLYk0ae2ZXGxMQJaOIWhFjoTq4WiYAhVKtim1jvJ5hq62QXobF/s663/2023_11_GrandMasPC.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="275" data-original-width="663" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN09XlVRjeuZv4-y6mO10dJE0xRNETj3I8hNB_ELsuRT8wpC8YF7u5Ta0tdaXkswPCwsc3B-rwGM0VBLnMLPKPXvWjfvrypkR6waJs60gkJY2W5UHGSsUpXFVbPnFP6vAhkxe2VmuY4LFLYk0ae2ZXGxMQJaOIWhFjoTq4WiYAhVKtim1jvJ5hq62QXobF/w400-h166/2023_11_GrandMasPC.png" width="400" /></a></div><p>We chose the Lenovo because it had more ports and a slightly faster chip. (The "3i" name is a marketing deception. Don't be fooled - this is not an Intel i3 chip). <br /><br /><br /><b>Is it good enough?</b><br /><br />Yes. <br /><br />Surfing, email, scanning, opening Excel, etc., all performed well. Obviously, you won't be using this for video editing or gaming, but it is good enough for household chores.<br /></p><p>Compared to the XP machine, most of
the
performance gains were from the SSD drive -- but more RAM and the better chip couldn't have hurt. Overall, I found nothing to complain about and it met our needs.<br /></p><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: left;">Kudos to the clerk at Best Buy who rightfully tried to dissuade us from buying such a
low-end machine. She relented when I explained we were retiring a 16-year-old
computer. Anything was better than what we had, and we were price conscious. </p></blockquote><p><br /><u>Installed Crapware</u>:<br />Remarkably, there was little crapware -- only two programs, where one could be forgiven: "Lenovo Driver Update" (Lenovo "Vantage"), and the obligatory and hateful McAfee software that all new computers seem to have. <br /><br />I kept the Lenovo program for a few minutes, allowing it to run its updates, then de-installed (it later prompts for a paid upgrade). McAfee was removed immediately for all the normal reasons. <a href="https://keyliner.blogspot.com/2012/06/aggressive-mcafee-security-scan-plus.html" target="_blank">McAfee has a special place</a> in hell, and I always remove it.<br /><br />On Best Buy's site, a "free" Trend Micro Virus Scanner (a $30 value!) was offered. Being only a six-month trial, it was also ignored. Besides, Microsoft's default virus scanner is unobtrusive and is good.<br /></p><div style="margin-left: 40px; text-align: left;">Except for Windows Updates, the machine needs to be unattended. (GMa lives 1,500 miles away and we can't be having the software asking about new subscriptions.)<br /></div><p><br /><b><u>Lenovo IdeaCentre 3i Specs</u></b>:<br /> <br />Dual Core, Celeron, 3.4Ghz (G6900 LGA 1200-series chipset)<br />I am pretty sure this is a laptop motherboard in a desktop case.<br /><br />256G NVme Micron SSD Drive <br />(256 GB SSD M.2 2280 PCIe Gen4 TLC)<br /><br />8 GB Ram, 1-slot occupied, 1-slot free (32G max)<br />(DDR4-3200MHz (UDIMM))<br /><br />2 USB 2.0<br /> 4 USB 3.2<br />1 USB C</p><p>Wifi 6.0<br />Bluetooth<br />RJ45 Network port<br />HDMI 2.1 TMDS (integrated video)<br />VGA<br />Front and Rear Audio jacks, Front Microphone jack<br />SD Card-Slot (nice to see)<br /> <br />Cheap mouse and keyboard<br />Power button (smile)<br />Windows 11 Home <br />Completely silent; air-cooled; no fan (except for the powersupply)<br /><br />No DVD, nor is there room to install one (if needed, buy an external USB DVD)<br />No expansion slots<br /><br /></p><p></p><p><b><u>Upgrades</u>:</b><br /><br />I ran out of time, but if I were doing this again, I'd upgrade the RAM from 8GB to 16 (DDR4-3200MHz (UDIMM))<span face="intel-clear, tahoma, Helvetica, helvetica, Arial, sans-serif" style="background-color: white; color: #003c71; font-size: 14px;">.</span> The new memory chip would just snap into place - a two minute install. <i>Still, I am continually amazed at how well Windows runs on just 8GB</i>.<br /><br />With Windows and Office installed, plus Foxit PDF Reader, along with a few other small utilities, 25% of the disk was used, leaving 200G for data. For GMa, this is more than enough space for what she does, but for a student, or someone who is using this for photography, you might consider replacing the hard drive with a 1T drive, which can be found for $50. (This is an NVme drive, but is not the "M.2" style.)<br /><br />Lenovo makes other models, with the same footprint and case-design, some with an Intel i3 chip, and room for DVD drives, larger SSD's, etc. I did not explore, all being about $200 more expensive. For this machine, I did not take the time to open the case and photograph the interior.<br /><br /><b><u>More on the CPU</u></b>: </p><p>Intel Celeron G-6900 <br />By itself, the chip retails for $45 - but it lacks a lot of onboard L3 cache, and does not have hyper-threading, and no virtual cores. Tech publications roundly hate this chip, instead preferring the Intel i3 for low-end PC's. The i3 (not the "3i") is $130, just for the chip, and it requires a better motherboard, a larger power supply, and a CPU cooler -- all which make for a more complicated and expensive setup (albeit a more normal setup). Still, with those reservations, online reviews for this lower-end chip are positive (for the
cost). Of interest, many low-end laptops use this chipset. <br /><br />Because there is no hyperthreading or virtual cores, many newer games will not run -- check with your games to confirm, but this was expected. Besides, it only has on-board video, which no gamer would tolerate. <br /><br />-end<br /></p><p><br />Related links:<br />Best Buy: <a href="https://www.bestbuy.com/site/lenovo-ideacentre-3i-desktop-celeron-g6900-8gb-memory-256gb-ssd-cloud-grey/6535561.p?skuId=6535561">https://www.bestbuy.com/site/lenovo-ideacentre-3i-desktop-celeron-g6900-8gb-memory-256gb-ssd-cloud-grey/6535561.p?skuId=6535561</a><br /><br />Intel G6900 Motherboard: <a href="https://ark.intel.com/content/www/us/en/ark/products/96163/intel-celeron-processor-g6900-4m-cache-3-40-ghz.html">https://ark.intel.com/content/www/us/en/ark/products/96163/intel-celeron-processor-g6900-4m-cache-3-40-ghz.html</a><br /><br />keyliner: <a href="https://keyliner.blogspot.com/2021/11/windows-11-tuning.html" target="_blank">Windows 11 Tuning Tips and Tricks</a><br />keyliner: <a href="https://keyliner.blogspot.com/2019/11/frankenputer-i9-new-wolfhouse-computer.html" target="_blank">Frankenputer I9 - Home Built PC</a><br /><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-35036088060761463182023-09-12T07:06:00.023+01:002023-11-19T22:21:58.266+00:00WordLock - Hacking a Bicycle Bike Lock with C#<p>WordLock - Hacking a Bicycle Bike Lock with C#<br /><br />Walking with a friend last week, we found a bike lock in the middle of the street. The lock is called a "Word Lock" and is a popular design. Instead of using numbers, it uses letters -- where you choose a word to make the lock's combination. The available letters are a mixture of real words and nonsense words.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrD3SqWdXhkLGdGpImxbaY4jldba2fZ5fWQt0DRS5VEqjmz9_VI3gt_f3TH3YE0AswKQhav6bZA0e8ICw2F_aP6hOkJBOYw42R3HnPluc98eFUutiEDpgywMVsGjA2--WQLjoQesIUjjKrks9QvYikkAtd7oYImRpj4m_M6CY2nSpMfnzUVeoPOzL1nzfN/s280/2023_09_WordLockBikeLock.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="280" data-original-width="269" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrD3SqWdXhkLGdGpImxbaY4jldba2fZ5fWQt0DRS5VEqjmz9_VI3gt_f3TH3YE0AswKQhav6bZA0e8ICw2F_aP6hOkJBOYw42R3HnPluc98eFUutiEDpgywMVsGjA2--WQLjoQesIUjjKrks9QvYikkAtd7oYImRpj4m_M6CY2nSpMfnzUVeoPOzL1nzfN/s1600/2023_09_WordLockBikeLock.png" width="269" /></a></div><p><b>I wondered, is it crackable? </b><br /></p><p style="margin-left: 40px; text-align: left;"><i>Can I write a C# program, showing all possible combinations, both nonsense and real words, and then whittle-down that list to only "word-like combinations"? Then use that list to break in? </i><b>Yes!</b><i> <br /><br />Don't care to write the program - go to the end of the article to see how to protect your word-lock from programs like this.<br /><br /></i></p><p><u>Assumptions</u>:<br /><br />* 4 Rings, with 10 letters each. <br /><br />* Some word are good words: "band", "bald", "rose"<br /><br />* Not all four-letter words are real, but look like a word: "baad", "dumm", "wity"<br /><br />* Some four-letter words are not words and can be discounted: "bwrd", "fwot"<br /><br />* Assume the person who owned the lock used a word or word-like four-letter phrase. <br /><br /></p><p style="margin-left: 160px; text-align: left;"><i>Of
all the possible combinations, why limit my choices to "wordy-words? It is called WordLock! Of course the previous owner used a word! -- I hope. <br /></i></p><p><br />The Rings have mixed letters in a variable order. </p><p>For example, on my lock, Ring1 has the letters <span style="font-family: courier;">b,f,r,m,d,t,s,w,p,</span> and <span style="font-family: courier;">L</span>, for a total of 10 letters. The second Ring has a different set of letters (<span style="font-family: courier;">a,u,y,r...</span>), the third ring (<span style="font-family: courier;">a,o,k...</span>), and so on.<br /><br />That makes 10,000 combinations -- 10x10x10x10 -- but I was betting only a few hundred were "real" words -- a majority of the combinations could be discounted.<br /><br />You
are invited to try writing a program to generate all combinations yourself. Use Python, C#,
Cobol, VB, and it could even be done in an Excel macro. Compare your
program with the one in this article<i>. Drop a comment here and tell me how you did.<br /></i></p><p style="margin-left: 40px; text-align: left;"><i>If you don't know how to write a C# program, consider my book "<a href="https://keyliner.blogspot.com/2020/04/war-and-peace-programming-in-c.html" target="_blank">War and Peace Programming</a>" (Amazon.com), where I talk about things just like this (but not bike locks).</i></p><p style="text-align: right;">The Rings, if you are trying this yourself:<br /><span style="font-size: x-small;"><span style="font-family: courier;"><span style="color: #666666;">R1 "b", "f", "r", "m", "d", "t", "s", "w", "p", "l" <br />R2 "a", "u", "y", "r", "w", "h", "e", "l", "o", "i"<br />R3 "a", "o", "k", "s", "n", "t", "m", "r", "e", "l"<br />R4 "d", "l", "y", "p", "e", "t", "s", "m", "k", "g"</span><br /></span></span></p><p style="margin-left: 160px; text-align: left;">Each
bike lock might have different letters on its rings, but I think all are the same. Photos on the Internet show the same characters as
mine. Other testing shows Ring1, which is all consonants, starts more real words than the
other rings, so I doubt the manufacturer varies the letters.<br /></p><p><br /><span style="font-size: medium;"><b><u>The Technique</u>:</b></span><br /><br />Four nested loops are needed, one for each Ring. The first loop starts with Ring1's first-letter 'b', then it needs to try every combination on Rings2, 3, and 4. Once done, Ring1 moves to its second letter 'f' and repeats the tests.<br /><br />It is a bit more complicated than that. It really works like this:<br /><br />Ring1 (R1), Letter 1<br /> Ring 2, Letter 1<br /> Ring 3, <u>Letter 1</u><br /> Ring 4, try every letter <br /> >> Generate words R1-<span style="color: red;">1</span>, R2-<span style="color: red;">1</span>, R3-<span style="color: red;">1</span>, [R4 1-10]<br /><br />then<br /> Ring 1, Letter 1<br /> Ring2, Letter 1<br /> Ring3, <u>Letter <span style="color: red;">2</span></u><br /> Ring4, every letter >> R1-1, R2-1, R3-<b><span style="color: red;">2</span></b>, [R4 1-10]<br /><br />Ultimately, after several hundred combinations, working your way up the rings, Ring1 will move to <u>Letter 2</u>. This can be done with a half-dozen lines of code.<br /><br /><b>Are you serious?</b><br /><br />Did I actually think the logic through before writing the code? No. <br /><br />Knowing a loop-within-a-loop was needed, there was confidence it would generate the results -- it is in the nature of how nested loops work. Once written, all I needed was to spot-check the results from the top of the combinations, then spot-check the bottom. I could spin the dials on the actual lock to confirm the right order.<br /><br />The program writes the results into a text file, 10,000 records deep. Here are the first-20, and last-20 results. Most of the generated words are nonsense: </p><p>First20 Last20<br /><span style="font-family: courier;">baal <span style="font-size: x-small;">(where "b" was Ring1's first letter)</span><br />baap lirk<br />baae lirg<br />baas liel<br />baam liey<br />baak* liep<br />baag liee<br />baod liet* <span style="font-size: x-small;">Possible word? Dune fan?</span><br />baol liem<br />baoy liek<br />baop lieg<br />baoe lild<br />baot lill*<br />baos lily*<br />baom lilp<br />baok lile<br />baog lilt*<br />bafd lils<br />bafy lilm<br />bafp lilk<span style="font-size: x-small;"><br /></span></span><span style="font-family: courier;"> lilg</span><span style="font-family: courier;"> </span><span style="font-family: courier; font-size: x-small;">(where each letter is the 10th in its Ring)</span><span style="font-family: courier;"><br /></span><br /><br />In the hope of narrowing-down the list to legitimate words, I loaded the list into a word processor and glanced at the spelled and misspelled words. <br /><br />Bad news: Too many words were "word-like" but were flagged as misspelled. <br /><br />What teenage boy wouldn't want to use these words: "baad", "baty", "byod", "blep".... How do I know it was a teenage boy? A girl would never be dumb enough to lose her bike lock.<br /><br /><b><u>Flagging the words</u>:</b><br /><br />Instead, I loaded the words into a spreadsheet, keeping them in their generated order. Then I manually flagged each 'word-like-word' by hand, putting an 'x' in the next column. In a short evening, I found 608 likely words. Flagging 608 was easier than unflagging 9,392 words. Large swaths of similar letters (fyug, fy-this, fy-that) were quickly ignored. If a word were missed here-or-there, it had a low probability of being the "one true word."<br /><br />Filter the list by the flags, keeping their same order.<br /><br />My flagged word list, starting with Ring1, letter-1 ... spellcheckers be damned:<br /><br /><span style="font-family: courier;">1 baad first flagged<br />3 baay<br />6 baat<br />22 bafl<br />32 basl<br />35 base<br />39 bask<br />41 band<br />45 bane<br />49 bank<br />50 bang<br />: <span style="color: #999999;">plus lots of other word-like words...</span><br /></span>:<br />and ended here, at row 608:<br /><span style="font-family: courier;">9965 lime<br />9981 lied<br />9987 lies last-flagged</span><br /><br /> </p><p>Grunt Work: <br />Starting at the top, I methodically tried each combination on the actual bike lock. <span style="color: #ea9999;">Gasp</span>! (<i>Remember, this is a project with a clear, well-motivated goal of a free bike lock.</i>)<br /></p><p style="margin-left: 120px; text-align: left;">Since the combinations are generated in order, I usually only needed to change one or two letters per word because the previous word already set the first two or three letters. This made it less painful.<br /><br /></p><p style="text-align: left;"><b><span style="background-color: #fcff01; font-size: medium;">Screaming Success!</span></b><br /><br />On the <span style="font-size: medium;"><b><span style="color: #cc0000;">363rd</span></b></span> attempt, the lock opened on the word <span style="background-color: #b6d7a8;">"DERP"</span>.<br />Yep, a teenage boy.<br /><br />I now own a new bike lock, saving me over $30!<br /><br /><i>Is DERP even a word? Good thing I flagged it. Total time testing combinations was about 60 minutes(?) -- not counting the labor in building the word list. Time well-spent for bragging rights such as this.</i><br /></p><p style="margin-left: 120px; text-align: left;">Statistically, of 600 possible words, finding the right word near the half-way mark (363) was no surprise. I should have started there.<br /></p><p style="text-align: left;"><br /><span style="font-size: large;"><b>The Code:</b></span><br /><br />I wrote this as a console app in Visual Studio C# -- a free development environment from Microsoft (it could have easily been a Windows app with Button1). <br /></p><p style="text-align: left;">At the top of the program, where you would normally initialize new variables, build four single-dimensioned string arrays, representing each Ring.<br /><br />string[] astrRing1 = new string[] {"b", "f","r","m","d",...};<br />string[] astrRing2 = new string[] {"a","u","y","r"...};<br />etc.<br /><br />Then, in Button1_Click, or in this case, in the main module, allocate an output file and write the nested loops. The loops are all the same -- a for-next loop -- with each running from one to ten, selecting one letter from their respective array. <br /><br />Ring 2's loop is nested inside of Ring 1, and the other rings are nested inside of 2's. The net effect is Ring 1's loop runs a leisurely 10 times while the inside loops run like hamsters on a wheel. As they whirl, they concatenate each found letter, assembling into a four-letter word. As-is typical, it took ten minutes to write the program and three times as long to verify. Running the program for all 10,000 results took about 14 milliseconds and this constantly amazes me. <br /><br />Because this blog isn't well-designed for displaying code, I'll use a screenshot. The entire program is small enough to fit:</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3M0xkn96ykf4zufYBMnW0_STTvIWS2_kFPCAE0nfGhQ7fYN5uGmY9AGkt7Hsbo_J0vgf4XtKmxacv4NL_khMZYxKtmduiwaQUrulahe7jIG4VQjwke94a7X8TwVwIW9QxoAxecUORM-2l3zqnBoXvikGSqtoXfQ6Rt6MHy9xMEGFo373V4Rvk7nZywiTT/s890/2023_09_WordLockCode.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="890" data-original-width="836" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3M0xkn96ykf4zufYBMnW0_STTvIWS2_kFPCAE0nfGhQ7fYN5uGmY9AGkt7Hsbo_J0vgf4XtKmxacv4NL_khMZYxKtmduiwaQUrulahe7jIG4VQjwke94a7X8TwVwIW9QxoAxecUORM-2l3zqnBoXvikGSqtoXfQ6Rt6MHy9xMEGFo373V4Rvk7nZywiTT/w376-h400/2023_09_WordLockCode.png" width="376" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><br /><br />Note: <i><span style="color: #666666;">This is more condensed than one I would write for the real-world. The variable names are short, the code obtuse. This goes against the programming skills I teach in my books and classes. But it was only needed for this one run and I was not expecting it to arrive in an article like this</span></i>.<br /><br /><br /><span style="font-size: medium;"><b><u>Protect your lock from me, and now you</u></b></span><br /><br /><div style="text-align: left;">Knowing my victim likely selected a real word, I am amused that 9,400 combinations were immediately tossed. Having a limited pool of real words is <i>the</i> weakness in the lock's design. Of course, you could pick a nonsense word, but these are hard to remember, and nobody wants to do that. <br /><br />If the rings were digits, all 10,000 combinations would be in-play and there would be no rhyme or reason for the numbers chosen, and a filtered list would not have worked. <br /></div><div style="text-align: left;"><br /></div><div style="text-align: left;">Testing the remaining 600 combinations is entirely manageable while watching TV, sitting on the front porch on a lazy summer afternoon, or when ignoring your spouse. On average, you would find the answer after 300 attempts. Once unlocked, it is easy to re-set the lock to any other word, as long as it fits within the letters of the rings. <br /></div><div style="text-align: left;"></div><div style="text-align: left;"></div><div style="text-align: left;"><br />Here are two tricks that keep the natural words, but make it appear scrambled to the human safe-cracker. </div><br /><div style="margin-left: 40px; text-align: left;">The back side of the lock shows the same four rings, but does not have a center index. DERP on the front is LUKK on the back. Spelling LUKK on the front, is DERP on the back. Don't tell anyone, but just use the back. Because the lock-picker does not know you did this, it doubled the number of possible words (and made it a lot messier with 600 nonsense words).<br /></div><br /><div style="margin-left: 40px; text-align: left;">Or, who said the index needs to be in the center of the dial? If using the left-edge of the window, DERP is spelled "TLEE" on the center-front index. <br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaXmSGPN7VWV5zHE9XfNm4zwPfBm8E_kXCOe4hNIzG1y26kerqLfLZyjYF_vC8K0IPvFX-DmgI9VxQMarP4_LYcBV63MBe7egvIra8QGuFR8oIoDNVYRUQqPSO3b-pLvsd7u62rmjehLv1RNMojBLFW7oM6x9mlrohX4SaKnAU_y_8GgQjUlPDHELjZ7X1/s376/2023_09_WordLockDERP.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="376" data-original-width="274" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaXmSGPN7VWV5zHE9XfNm4zwPfBm8E_kXCOe4hNIzG1y26kerqLfLZyjYF_vC8K0IPvFX-DmgI9VxQMarP4_LYcBV63MBe7egvIra8QGuFR8oIoDNVYRUQqPSO3b-pLvsd7u62rmjehLv1RNMojBLFW7oM6x9mlrohX4SaKnAU_y_8GgQjUlPDHELjZ7X1/s320/2023_09_WordLockDERP.png" width="233" /></a></div><p><br />Both tricks could be combined, using the left-edge on the back-side, expanding the number of combinations exponentially -- all appearing as gibberish to the casual attacker but
are a clear word when you know where to look. <br /></p><p>Either of these ideas thwart+ programmatic attempts and would force an expensive sequential search. Trying every possible combination takes on average 5,000 attempts before finding the answer, but on a bad day it would take 9,999 attempts. <br /><br />This was a fun project.<br /><br /><span style="color: #666666;">+It is not every day one gets to use the word 'thwart'.</span><br /></p><p>-end<br /></p><p style="margin-left: 120px; text-align: left;">These techniques are described with kid-gloves in my <a href="https://keyliner.blogspot.com/2020/04/war-and-peace-programming-in-c.html" target="_blank">programming book, War and Peace Programming - Amazon</a>.
(For other projects, see Volume 6 - the Student and Instructor's
guide, where you can write a Star Trek Bridge computer simulation, take
apart credit card numbers, and other interesting projects. This is a fun book and makes for a good introduction to programming.) <br /></p><br />traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-24924126743387250792023-09-08T01:21:00.081+01:002024-02-17T15:39:39.524+00:00Install - Raspberry PI Webserver Step-by-Step<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTSWHR-ZIsmpn5EbNYFtTLuv83m9Lw8ul8mwEq_9W-RkAU2IcqbyexjA_V_r4sCYktZ-yL1_ppUNg1Vr_qi2vMP_dq4sRXdTSOZXMVftDVyhqKU7ZkAJxOYlwtLPSBFH8QpeDMbJ2YT-yKsJr1Y8rqnH992H15SbpXOIqlF5KfvZpmJtTGUMakSwZdQW6r/s260/2023_09_WebServerBannerLogo.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="130" data-original-width="260" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTSWHR-ZIsmpn5EbNYFtTLuv83m9Lw8ul8mwEq_9W-RkAU2IcqbyexjA_V_r4sCYktZ-yL1_ppUNg1Vr_qi2vMP_dq4sRXdTSOZXMVftDVyhqKU7ZkAJxOYlwtLPSBFH8QpeDMbJ2YT-yKsJr1Y8rqnH992H15SbpXOIqlF5KfvZpmJtTGUMakSwZdQW6r/w200-h100/2023_09_WebServerBannerLogo.png" width="200" /></a></div><br />Install - Raspberry PI Webserver Step-by-Step instructions <br />Build an Apache2 Webserver at your home<br /><br /><br /><div>After switching my domain provider to GoDaddy, I discovered I could not host a simple webpage on the domain without paying a monthly fee (my previous provider hosted simple sites for free). My needs are unremarkable -- a few pages of static text and I am not paying $12 a month for the privilege.<p></p><p>I thought: <i><span style="color: #38761d;">Why not build my own webserver and point my domain that direction? </span></i> <br /><br /><b>Oh my gosh, no, you say! Trust me. This is not hard. </b> </p><p>Using an inexpensive Raspberry Pi (a small computer for $50 - now $80!), you can install a free operating system, install the web server, and be online with a basic page all <u>within a few hours</u>. Literally! <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqOiAG6Wcqy1X03qrrUhHZH7aXngqMlKtXKNkUMqNFc41RQlJGZPiwPmNOgtCjxk-1Y6vXWQwnr9LcrLgkm0zFAvew98Fv2V9idzAj9P-IVPHXFC0fanddIM0UgeZ8tU8hjk3NnEXZ50ZNNL1he7CK26sMA9tp9w1UQNC9P6tIR-ZgNrqsi9BUnwtcgzqu/s561/2023_09_WebServerMastoBannerThin.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="369" data-original-width="561" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqOiAG6Wcqy1X03qrrUhHZH7aXngqMlKtXKNkUMqNFc41RQlJGZPiwPmNOgtCjxk-1Y6vXWQwnr9LcrLgkm0zFAvew98Fv2V9idzAj9P-IVPHXFC0fanddIM0UgeZ8tU8hjk3NnEXZ50ZNNL1he7CK26sMA9tp9w1UQNC9P6tIR-ZgNrqsi9BUnwtcgzqu/s320/2023_09_WebServerMastoBannerThin.png" width="320" /></a></div><p>This was all new to me, having never done this before. This article shows the steps. You do not need to know Linux, or the hardware:<br /></p><p>* Raspberry Pi Hardware<br />* Installing Linux<br />* Installing Apache Webserver<br />* Configuring your router<br />* Pointing your Domain to your website<br />* Encrypting https with an ssl cert<br /></p><p></p><p></p><p>This is a long article but easy steps. No panic. Take it one step at-a-time.<br /><br /></p><p><u>Assumptions</u>:<br /><br />* You own a registered domain. Mine is <a href="https://keyliner.com" target="_blank">keyliner.com</a>. Domains run about $15 or $20 per year, which is separate from the webhosting fees I am avoiding.<br /></p><p>* You must be able to login into your Domain Provider's website as an
administrator. e.g. GoDaddy, or other provider. If you own a domain (such as keyliner.com), you will have a
login. <br /><br />* You must be able to login to your home router as administrator. This article shows a NetGear Wireless router. All routers work similarly. Steps illustrated below.<br /><br />* Purchase a small computer called a Raspberry Pi. You might need a USB SD-card reader. <br /></p><p><br /><b><span style="font-size: large;">Raspberry Pi, you say?</span></b><br />
</p><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3zaXTLGN5HEyMobteJG-2sMQsF1IUmvOSAi8HJ8vOS7YoxLSjQMlC2Czf2LUI88T5YM2rjSQ8Q_Z18fUSfd-8hQ6eIAy7a78f_F_aMuBH9sUxk883Cl5j8T4rBzO_6fIb2foMG7u6DUSO/s1600/2018-pihole-raspberrypi.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="151" data-original-width="254" height="118" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3zaXTLGN5HEyMobteJG-2sMQsF1IUmvOSAi8HJ8vOS7YoxLSjQMlC2Czf2LUI88T5YM2rjSQ8Q_Z18fUSfd-8hQ6eIAy7a78f_F_aMuBH9sUxk883Cl5j8T4rBzO_6fIb2foMG7u6DUSO/s200/2018-pihole-raspberrypi.png" width="200" /></a></div>To make this work, build a small dedicated computer using a device
called a Raspberry Pi. <br />
<br />
"I don't know anything about that!" Neither did I!<br />
<br />
And yet, with <u>zero</u> experience, I built the server, installed the Linux operating system, and configured everything -- all in about two hours.
The operating system and webserver software are free. The only expense is a
$50 (now $80) computer.<br /><br />
<b>What is a Raspberry Pi?</b><br />
<br />
A Pi is a small computer, the size of a deck of cards, running Linux and costs about $50 to $60. It
has 4 USB ports, an HDMI video port, an RJ45 wired network port,
Bluetooth, a wireless adapter, and a slot for an SD-card. <br />
<br />
Google-search to find a reseller. I bought mine from Walmart.com. Any
Pi version will work, where I am using an older version 3. Version 4 is
the newer (2022), and version 5 was just announced (2023.10).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU6wH_at-I1XYXIxoKqzLXZw3DacXNQJqeyzPR6CI9ZirEMuXA7rI5B6TMQuZDWCOwCvLjNO7A_lnvl-ysqa4qfziy4-6K6aftfTBQ52xtTaqKQEuwJcKK0NrP-cJ2tqLQ3U3dWFf1XtqW/s1600/2018-pihole-raspberryKit.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="583" data-original-width="630" height="370" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU6wH_at-I1XYXIxoKqzLXZw3DacXNQJqeyzPR6CI9ZirEMuXA7rI5B6TMQuZDWCOwCvLjNO7A_lnvl-ysqa4qfziy4-6K6aftfTBQ52xtTaqKQEuwJcKK0NrP-cJ2tqLQ3U3dWFf1XtqW/s400/2018-pihole-raspberryKit.png" width="400" /></a></div>
<br />
<u>You will also need the following</u>:<br />
<br />HDMI cable to connect to your TV or monitor (temporary, just for setup).
<br />
Short .5 or 1 Meter (2 - 3 ft) Ethernet patch cable ($5)<br />
Wired or wireless Keyboard (borrow from your PC, temporary)<br />
Wired or wireless Mouse (borrow from your PC, temporary)<br />
<br />
16GB or 32GB Micro SD card, with adapter. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUENEzJnYw-STvGJM82p2zg47PNMQnfV5mC5dOjtlu8zKZYN41djHQAMuXCPxBFv-CJ2IK-kdC-iuEYfnAlJtn41TFLyB3jO3-tXdT614wrmHp_7050l0m0XW9rkCp32b4-IQx-li1BnpD/s1600/2018-pihole-SDCard.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="210" data-original-width="347" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUENEzJnYw-STvGJM82p2zg47PNMQnfV5mC5dOjtlu8zKZYN41djHQAMuXCPxBFv-CJ2IK-kdC-iuEYfnAlJtn41TFLyB3jO3-tXdT614wrmHp_7050l0m0XW9rkCp32b4-IQx-li1BnpD/s320/2018-pihole-SDCard.png" width="320" /></a></div>
<br /><div style="margin-left: 40px; text-align: left;">
The SD card acts as the Pi's hard drive. This is the Micro SD card,
which is smaller than a postage stamp. Buy at any
electronics or office store for about $15. Buy the card with a standard-sized adapter so it can plug
it into a laptop or desktop's SD slot -- if you don't have a slot, you will have to buy an USB SD Card Reader. ***Do not buy a 64GB or larger
drive; it is not needed, nor will it work.</div>
<br /><div style="margin-left: 80px; text-align: left;"><div style="margin-left: 40px; text-align: left;"><i>After setup, the Pi does not need an attached keyboard, mouse, or monitor. It can be a little box, sitting in the corner, minding its own business</i>.<br /></div></div><div style="margin-left: 40px; text-align: left;"><br />
</div><p><u>Prerequisites</u>:<br /></p><div></div><p><b>A. Find an IP Address for the Pi</b><br /><br />The Raspberry Pi needs a place to live. Identify a static (fixed) IP address on your home network/internal network. Start with your local workstation and discover your network's IP-address range with these easy but geeky steps:<br />
<br />
From a DOS / Command prompt (windows-R, "CMD"), type this command:<br />
<span style="font-family: "courier new" , "courier" , monospace;">ipconfig</span> (enter)<br />
<br />
</p><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlXKDWBEDh7IRaSeasJyoq5o0rKF1W7mtLofeijGmDFw2w5toCzNDn46CVdlwTXaDFTgQoci4rUAC8T4_dIu94VR4FPu9YK9GUJu-FkhjDumVnC-QJoGKIHzdLQ8EbzV57d1WdZNitVyTu/s1600/2018-pihole-Octets.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="140" data-original-width="563" height="98" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlXKDWBEDh7IRaSeasJyoq5o0rKF1W7mtLofeijGmDFw2w5toCzNDn46CVdlwTXaDFTgQoci4rUAC8T4_dIu94VR4FPu9YK9GUJu-FkhjDumVnC-QJoGKIHzdLQ8EbzV57d1WdZNitVyTu/s400/2018-pihole-Octets.png" width="400" /></a></div><p>
<br />
* Note your IPV4 address, illustrated.<br />
<br />
Yours will probably read something like<br />
<span style="font-family: "courier new" , "courier" , monospace;">192.168.<u>0</u>.10 </span> or<br />
<span style="font-family: "courier new" , "courier" , monospace;">192.168.<u>1</u>.17 </span> etc.<br />mine happens to be 192.168.<u>100</u>.10<br />
<br />
* Note the default Gateway's dot-1 address: (mine is 192.168.100.<u>1</u>) - This is your main router. The ".100" is the subnet. <i>*If* the secondary (wireless) router has a Default Gateway IP Address of ".2", ignore it and do all the work on the (.1) address.<br /></i></p><p style="margin-left: 40px; text-align: left;">The Pi needs an address in this same subnet. Practically-speaking, <i>you can guess</i>, and I'd bet picking that last octect as 192.168.<u>100</u>.<span style="background-color: #fcff01;">245</span> will work. For that last
octet, pick a high number, below 250. I chose .245.<br /></p><p>Test this address: <br />From your workstation, open a DOS prompt. Type this command:<br /><span style="font-family: courier;"><br />PING 192.168.100.<span style="background-color: #fcff01;">245</span></span></p><p>If no device answers ("destination unreachable"), then this address is probably safe to use. Otherwise, try a different near-by-number (.244, .243, etc.). Write this address down.<br />
</p><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><div style="text-align: left;"><i>Technical
notes for those who care: Home routers assign automatic DHCP addresses
to each workstation using a range (or pool) of numbers. This range
varies by router. Some start at 2 - through 100, others
start at 10 through 150. The range does not matter, but the Raspberry
Pi needs a number </i><u>outside</u><i> that range, where I am choosing <span style="background-color: #fcff01;">.245</span> (stay below .250).<br /></i> <br /></div></blockquote></blockquote></blockquote><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><div style="text-align: left;"><i>Optionally, you can research this by logging into the router: Type the "x.x.x.1" dot-one IP Address in a browser URL. A login panel appears. Login as "admin" and use the password the router was installed with (sometimes printed on the back of the router), or as-set in your long-lost documentation. (See later in this article if you can't login). <br /><br />Once logged in, find an advanced setup menu for "LAN Setup" and "Use the Router as a "DHCP Server" (menus will vary). Confirm the exact DHCP
Address range it uses. It will show something like 10 through 150. Then pick a number outside of that range (151, 200, 210, 245, etc.). <br /></i></div></blockquote></blockquote></blockquote><p></p><p style="text-align: left;"><br /><u>Continue with these software installs</u>:</p><p style="text-align: left;"></p><p style="text-align: left;"></p><p style="text-align: left;"><b>B. Install a console program called Putty</b><br /><br /><img border="0" data-original-height="128" data-original-width="128" height="128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh38hwpgg43wE7aAoFtE4Vu6Ljz16WDiorduRsVnjxeFKnCf7fTpx6LgxKszgzfyeWva8ymeQQiKJmJRDv-uq7D30e4tjYiOHz34DnJtdKCIyyZhoBgoJaXHOLJWEBEP5Vd-G-pihaIrfihjqoV9n0PcWHNGafpZoRgw-uLGmXoNQcxaMC4hiaS-fwiEyTY/s1600/2023_09_Webserver_PuttyLogo.png" style="color: #0000ee; text-align: center;" width="128" /></p><div>On your local workstation, download and install a small DOS program called Putty.exe (a remote desktop console). This program will be used later to help administer the Pi. Optionally,
place the putty.exe's tile on the start menu to make the program
easy-to-find. <i>Install, but don't worry about using the program yet</i>.<br /><br />link: <a href="https://www.putty.org" target="_blank">https://www.putty.org<br /></a><br /><br /><b>C. Install a Remote Desktop program, VNC</b><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zQZcCw9yEEZ5470-SeJ1GoPmGzY2WkdNJJTulZwg8QMFjxe265KeViwTPFQqCLPto4mVxZMXi7S2MhOXPta55RJVnBEzDbnL_1kgk_kKYxphz-sfaN-NN63r6kts07OSph5fd2aeTbPdS7wnjtqV2M7bQRhJMSCpWM0naVXI9kNaWiwKyNQi7KIuriZu/s77/2023_09_WebServer_VNCLogo.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="76" data-original-width="77" height="76" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zQZcCw9yEEZ5470-SeJ1GoPmGzY2WkdNJJTulZwg8QMFjxe265KeViwTPFQqCLPto4mVxZMXi7S2MhOXPta55RJVnBEzDbnL_1kgk_kKYxphz-sfaN-NN63r6kts07OSph5fd2aeTbPdS7wnjtqV2M7bQRhJMSCpWM0naVXI9kNaWiwKyNQi7KIuriZu/s1600/2023_09_WebServer_VNCLogo.png" width="77" /></a><br /><br />On your local workstation, download and install a remote desktop viewer called "VNC". <br /><br />This is also handy for remote administration because you can use your PC's mouse-and-keyboard on the Pi's desktop from another room. Technically, this program is not needed for this project, but is handy.<br /><br />link: <a href="https://www.realvnc.com/en/connect/download/viewer" target="_blank">https://www.realvnc.com/en/connect/download/viewer</a><br /><br />Select "Standalone EXE x64 Installer"<br /><i>Install, but don't worry about using this program yet</i> -- plus, it won't work until the server-side is configured. Build an icon/tile for your desktop or start menu. <br /><br /><br /><b>D. Install FileZilla - an FTP Client<br /></b><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi936lOJxJTMsC64CAffliWZuPmzsIqsknri_dLkwoYBwnrL8BhfSVtbZV7CQjdO139zQubaX8x_EB4qqA2YVuHXqKuCDeCsvOzz3aU2StVn-becePrcouCr7nd-xvnopHyMHfRXAFOpZ4lFRqt1C9vqOvkigyjbbd7Vl1lgKSXjlnLwVNUYWya0CdYMlA9/s108/2023_09_WebServer_FileZillaLogo.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="104" data-original-width="108" height="104" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi936lOJxJTMsC64CAffliWZuPmzsIqsknri_dLkwoYBwnrL8BhfSVtbZV7CQjdO139zQubaX8x_EB4qqA2YVuHXqKuCDeCsvOzz3aU2StVn-becePrcouCr7nd-xvnopHyMHfRXAFOpZ4lFRqt1C9vqOvkigyjbbd7Vl1lgKSXjlnLwVNUYWya0CdYMlA9/s1600/2023_09_WebServer_FileZillaLogo.png" width="108" /></a><br /><br />On your local workstation, download and install FileZilla (an ftpClient), or use any other FTP client. This is needed for webpage development.<br /><br />Link: <a href="https://filezilla-project.org/download.php?type=client" target="_blank">https://filezilla-project.org/download.php?type=client</a><br /><br /><i>Install, but don't worry about using this program yet. Put an icon on your desktop or start menu</i>.</div><p><br />E. <b>Find your "external-facing" IP address:</b><br /><br />From your local workstation, Google-search "<span style="font-family: courier;">What is my IP</span>".<br />Write down your "external-facing" IP address. This is no where near your home network's addressing.<br /></p><p>For example, as-of this writing, mine is "<span style="background-color: #fce5cd;">96.19.200.6</span>".<br /><br /></p><div style="margin-left: 40px; text-align: left;">Important Note: <i>This address can change when your router is rebooted or after a power failure. From your ISP, you can pay extra for a fixed, "Static" IP address. I am too cheap. My address sticks around for months-at-a-time, and if it changes, I am willing to have downtime while I change my "A-Record" (see below)</i>.</div><div style="margin-left: 40px; text-align: left;"><br /></div></div><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><div><div style="margin-left: 40px; text-align: left;">Alternately, and for fun, install keyliner's free "DeviceID" asset-tag manager, which helps monitor your internal and external IP addresses using a snazzy program. The program is free and super-easy. Link: <a href="https://keyliner.blogspot.com/2022/06/device-id-asset-tag-management.html" target="_blank">https://keyliner.blogspot.com/2022/06/device-id-asset-tag-management.html</a></div></div></blockquote></blockquote><div><br /><br /><div>
-----------------------------------------------------------<br />
<span style="background-color: white;"><span style="font-size: large;"><b>Raspberry Pi Hardware<br /></b></span></span>
-----------------------------------------------------------
<div style="text-align: right;"><br /></div>A
new Raspberry Pi is a small circuit board. Snap the board into the
kit's plastic case, and if the kit came with self-adhesive heat-sinks,
apply them now. This is all obvious as you assemble the box.<br />
<br />
Next, download and install the Linux operating system:<br />
<br />1. On your local workstation, plug in your SD-card Reader/adapter and the SD-data-card. If Windows offers to format the drive, skip.<br /><br />2. From a PC, Google "Raspberry Pi OS" download, or this link<br /><br /><a href="https://www.raspberrypi.com/software" target="_blank">https://www.raspberrypi.com/software</a><br /><br /></div><div>Click the "Windows" download button and download "Imager.exe" to your local workstation's temp or download folder (2023: Version 1.7.5).<br /></div><div></div><p><br />3. In Downloads, locate "imager.exe"<br /><br />Right-Mouse-Click and choose "Run as Administrator"</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-_FH8_milI7VS-YMfKss6yn7sC2cTiuonI-vxT2esiA6nhGfljouGw8VVgL0QFdCWtEcpXgIN5NyLRrNDi7CJJhamx1uBX4mUk3SB7MEYVe9J9HTQJt4SeT2aYPVxg_EJJHzekDyvOHLppX0Hb378mV-cCw_B0x62zb0_V_33X-QFHqAe3IS0nOvMhY35/s679/2023_09_WebServer_RaspberryPiInstallMenu.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="329" data-original-width="679" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-_FH8_milI7VS-YMfKss6yn7sC2cTiuonI-vxT2esiA6nhGfljouGw8VVgL0QFdCWtEcpXgIN5NyLRrNDi7CJJhamx1uBX4mUk3SB7MEYVe9J9HTQJt4SeT2aYPVxg_EJJHzekDyvOHLppX0Hb378mV-cCw_B0x62zb0_V_33X-QFHqAe3IS0nOvMhY35/s320/2023_09_WebServer_RaspberryPiInstallMenu.png" width="320" /></a></div><br /><p>In the menu<br />Select your Raspberry Pi hardware version (3, 4, etc.)<br />Select the top Operating System, "Raspberry Pi OS"<br />Choose storage: (selecting the 16/32GB card, already inserted) -- be sure to choose the SD card and not your C: drive.<br /><br />4. Click Next.<br /><br />When prompted for "OS Customization", click "Edit"<br /><br />[x] Set HostName: <span style="background-color: #fcff01;">keyliner.local</span> <br />(replacing keyliner with your domain name) and it is helpful to append the word 'dot-local'. <br /><br />[x] Username: <br />Change to "admini"; recommended*<br />Set a new password. Write this down.<br /><br />Optionally set Wireless (these can be set later)<br /><br />[x] Enable SSH *Use password authentication<br /><br />[x] Set your location (United States, etc.)</p>Click "Write"<br /><br /><div>
The program paints the new image on the SD card. You may see a message to Insert the SD card; ignore it. <br /><br />Once copied, close the program and eject the SD card.<br />
<br /><br />5. Insert the Micro-SD card into the Raspberry Pi's card-slot.<br />
<ul><li><i>The SD-card installs "up-side-down," into the board's slot</i></li><li><i>Push until it subtly clicks in place </i></li></ul>
<br />
6. Connect the keyboard and monitor:<br />
<ul><li>Plug-in the HDMI cable to the TV or computer monitor (I used my TV).<br /></li><li>Connect a USB Keyboard to the Pi's USB ports (borrow from your desktop; can be wireless)</li></ul>
<ul><li>Connect a USB Mouse (can be wireless) <i><br /> </i></li><li>For the initial setup, use either a wired or wireless
NETWORK connection. Wired is preferred. <br /><br />For a wired RJ45/Cat5 cable: If near the main router, connect an RJ45 network cable to
any open port on any router. (Do not plug into the router's "uplink"
port; instead plug into one of the 4 or 8 port areas). Connect the other end to the Pi's RJ45 port. <br /><br />If wireless, continue, then later steps configure the wireless network. <br /></li></ul>
<ul><li>
Connect the USB 2.5a power-supply to the Pi, usually supplied in the Pi-kit<i> (any 2.5a micro-USB cell phone charger will work). Do the power last.<br /></i></li></ul>
<i><br /></i>
The Raspberry Pi will boot (visible on TV or monitor). <i>You may need to switch the INPUT to find the HDMI port.</i><br />
<br /><div style="margin-left: 40px; text-align: left;"><i>Black
Screen: I had troubles, when partway through the install, the TV said
"signal not found." The TV was routed through a stereo, and the stereo
would go into power-save mode. Rebooting the stereo returned the TV's
Pi image.</i><br /></div>
<br />---------------------------------------------------------------------------<br />
<span style="background-color: white;"><span style="font-size: large;"><b>Raspberry Pi Operating System Setup</b></span></span><br />
---------------------------------------------------------------------------<br /><br />When the Pi first-time boots it arrives at the Linux desktop, using the admini account. </div><div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>7. Set a <u>static</u> (fixed) IP address, e.g. 192.168.100<span style="background-color: #fcff01;">.245</span>, with these steps: <br /><br />a. From the desktop's far-right, top menu bar, look for an 'up-down' arrow icon, illustrated.<br /><br /><div style="margin-left: 40px; text-align: left;">Right-click the icon<br />Select "Wired and Wireless Settings"<br />Select "Interface" and in the second pull-down, choose "Etho0" (Ethernet zero - Wired)</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPJ4podxawGAtZCxRpEtE36EFwJaUTk8sPkddKCBC3_n2zvmuhx43q8i1dlSPo2R2sDLb049-hSPMoC8NRCPLM183RmCz0kJ0BxixbNW4amczaxX8KBdedGo4xt7PXv6-7ipde1sqoQBpQhbZHuZg933jlJzmF-yfT0uNhBwcUcs1RmliMt5h03u2fP9W5/s594/2023_09_WebserverWirelessIcon.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="533" data-original-width="594" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPJ4podxawGAtZCxRpEtE36EFwJaUTk8sPkddKCBC3_n2zvmuhx43q8i1dlSPo2R2sDLb049-hSPMoC8NRCPLM183RmCz0kJ0BxixbNW4amczaxX8KBdedGo4xt7PXv6-7ipde1sqoQBpQhbZHuZg933jlJzmF-yfT0uNhBwcUcs1RmliMt5h03u2fP9W5/s320/2023_09_WebserverWirelessIcon.png" width="320" /></a></div><div></div><br /></div><div><div style="margin-left: 40px; text-align: left;">Note: <i>Initial setup can be done wireless-ly. Follow the prompts for the wifi wireless connection, with the SSID broadcast name, password, etc., steps not detailed here. But later, you must change to a wired access. </i><i>If using wireless, set <u>both</u> the wireless <u>and</u> the wired-side's IP addresses to .245. </i><i> </i></div><br /></div><div>b. In the IPV4 address, type "192.168.100.<span style="background-color: #fcff01;">245</span>" (use your address; no quotes).<br /> <br /><div style="margin-left: 40px; text-align: left;">Other settings can remain blank and will auto-default<br />Close the window</div></div><br /><div>c. From the top-left Raspberry menu, reboot the server<br /><br /><br />8. After reboot: Confirm you can see the Internet:<br /><br />Login to the Pi's desktop, again as "admini". <br />From the desktop, launch the chromium browser (see the top Start Menu). <br />Confirm you can see the Internet (open Google.com or something).<br /></div><div></div><div></div><div><br />9. Patch the OS<br /><br />In the top, left-side menu, near the Raspberry Start icon, locate the "<span style="background-color: #cccccc;">Terminal</span>" icon. <br />This opens to a DOS-like screen. <br />Update the Pi's OS with these case-sensitive commands:<br />
<span style="font-size: small;"><br /><span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update<br /></span><span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white; color: #222222;">sudo apt-get upgrade -y</span></span></span><br />
<br /><i>where "sudo" means "super user do".</i><br /><br /><br /><b><u>Remote Administration Testing</u>:</b><br /><br />A. Test Putty (a remote terminal program)<br /> <br />From your local Windows workstation, launch "putty.exe" (previously installed).<br /><br />In the Host Name or IP Address, type "<span style="font-family: courier;">keyliner.local</span>" (your machine's network name, from the install above. The '.local' appendage is optional and recommended).<br /><br />You will be prompted, "This is a new connection. Do you trust it?"<br />Login using "admini" and the password (case-sensitive)<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdtQgqOrwfNkc0xLE6Ar7XD1AzSSyHhmioGNMysYXcZY0F_zDL3LLXwUj5E9phxzjMxjQZZxm-EzBMc-HMEIA9OgXoJY2EC-ZERjDj_9vYBFT_Ou88TJab2okW2SkUdp_XanO7jXspkKWCd6j61R1COqODOdUeiENwL7Yq9d9H8ZxFCO_WGB9pLeKtlFxz/s679/2023_09_WebServerPuttyLogin.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="435" data-original-width="679" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdtQgqOrwfNkc0xLE6Ar7XD1AzSSyHhmioGNMysYXcZY0F_zDL3LLXwUj5E9phxzjMxjQZZxm-EzBMc-HMEIA9OgXoJY2EC-ZERjDj_9vYBFT_Ou88TJab2okW2SkUdp_XanO7jXspkKWCd6j61R1COqODOdUeiENwL7Yq9d9H8ZxFCO_WGB9pLeKtlFxz/s320/2023_09_WebServerPuttyLogin.png" width="320" /></a></div><br />This confirms the administration program. Close the DOS box.<br /><i>This same "Terminal" window is available on the server's desktop; see top-left menu, "Terminal"</i>.<br /><br /><br />B. Enable and Test VNC</div><div><br /></div><div>VNC is a remote desktop (which is different than the Terminal).<br />First, enable the VNC service by logging into the server (using Putty, or from the server's desktop "Terminal" program). Login as "admini".<br /><br />1) At the command prompt, type <br /><span style="font-family: courier;"> <b>sudo raspi-config</b><br /></span><br />2) From the DOS-like menu, select "Interface Options"; <br /><br />Select 'Enable VNC' (not illustrated). <br />Press Esc a few times to save the changes, <br />then close the (putty) terminal window<br /><br />3) Continue from your local workstation: Launch the previously-installed Windows application "VNC" (Real VNC)<br /><br />Select the small link, "<u>Use RealVNC without signing in</u>"<br />(<i>You do not need to register or login to their website to use this program</i>.)<br /><br />4) Create a new connection by typing "192.168.100.245" <br /><br />Accept "<i>VNC Server not recognized...do you trust this...</i>"<br />Confirm you can see the desktop. Wiggle the mouse, browse, etc..<br />Close VNC<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBV8RMiszHscXqe_J_0a9dXpicyIWBmmmHzsnnoc73uW70_Efp-W2ciagIayUizjd6vBZpc16Y6rI8_igDaR4W4OtDi2sXkPdy2GjyLBQ-QPO580ik8DHPL_7Hw0wQc8JHeir-KXjiWj1YNmn0-Rg9X0TevMBardom21FQ1AdPJKPw2GOcmqeEsdJdA1H3/s714/2023_09_WebServerRVNCLogin.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="484" data-original-width="714" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBV8RMiszHscXqe_J_0a9dXpicyIWBmmmHzsnnoc73uW70_Efp-W2ciagIayUizjd6vBZpc16Y6rI8_igDaR4W4OtDi2sXkPdy2GjyLBQ-QPO580ik8DHPL_7Hw0wQc8JHeir-KXjiWj1YNmn0-Rg9X0TevMBardom21FQ1AdPJKPw2GOcmqeEsdJdA1H3/s320/2023_09_WebServerRVNCLogin.png" width="320" /></a></div><br /><i>VNC
seems to have a bug and will not connect a second time using the same configuration. To reload the desktop, delete the .245
connection and rebuild each time needed. Unclear how to resolve this or what I am doing wrong</i>. My expert friend says use a different program than VNC, but VNC seemed the easiest to install. <br /><br /><div style="margin-left: 40px; text-align: left;">I have not revisited this problem. See this keyliner article for other details: </div></div><div><div style="margin-left: 40px; text-align: left;"><a href="https://keyliner.blogspot.com/2023/08/vncviewer-timed-out-waiting-for-response.html" target="_blank">https://keyliner.blogspot.com/2023/08/vncviewer-timed-out-waiting-for-response.html</a></div><br /></div><p><br /><b>Woo-Hoo!</b><br />Congratulations. The Raspberry Pi's Operating System is installed and ready for the web server.<br /><br /></p><p style="margin-left: 40px; text-align: left;">As an aside, the server's domain name and other settings can be changed with this menu:<br />From a Terminal or Putty window: <br /><span style="font-family: courier;">sudo raspi-config<br /></span><br /></p><p style="text-align: left;">---------------------------------------------------------------------------</p><p style="text-align: left;"><span style="background-color: white;"><span style="font-size: large;"><b>Installing Apache2 Webserver</b></span></span><br />
---------------------------------------------------------------------------<br /><br />1. From either your workstation's Putty program, VNC, or from the server's terminal window, login as "admini", and install the "Apache2 webserver" with this case-sensitive command:<br /><b><br /><span style="font-family: courier;">sudo apt-get install apache2 -y</span></b><br /><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1hV5P_X-Aj2SUR0L4zPAmp8TZuHWO9JXYVcXe535AHw8gJ0vTR_1F7JlwfoZmFSi2ukO-jE3RvtVvrH5SEbMq-7Y5i1HQWw1xOpDCSIDQRGMafVGlxuhxfjlO5hgHBr1cT3CX3fF9Aoehwy9byZ-nF_aQis20lmyQR_UHDUAY9FZbyPOT2oLPmx-WKW2M/s661/2023_09_WebServerPutty1.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="337" data-original-width="661" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1hV5P_X-Aj2SUR0L4zPAmp8TZuHWO9JXYVcXe535AHw8gJ0vTR_1F7JlwfoZmFSi2ukO-jE3RvtVvrH5SEbMq-7Y5i1HQWw1xOpDCSIDQRGMafVGlxuhxfjlO5hgHBr1cT3CX3fF9Aoehwy9byZ-nF_aQis20lmyQR_UHDUAY9FZbyPOT2oLPmx-WKW2M/s320/2023_09_WebServerPutty1.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><p><br /><br />2. Optionally install PHP<br /><br /><span style="font-family: courier;">sudo install php libapache2-mod-php -y</span></p><p>PHP is a server-based programming language that some webpages can use.<br /><br /><br />3. Optionally, and not particularly recommended, install mySQL database engine:<br /><br /><span style="font-family: courier;">sudo apt-get install mariadb-server<br />sudo mysql_secure_installation<br />sudo apt install php-mysql<br /></span></p><p style="margin-left: 40px; text-align: left;"><i>I did not install the SQL database. But if this webserver is going to run billing software, credit-card software, etc., this is probably needed</i>.<br /></p><p><br />4. Restart Apache for the optional installs. (There is no prompt or indication that the restart happened. Give the box about a minute after the restart.):<br /><br /><span style="font-family: courier;"><b>sudo service apache2 restart</b></span> <br /></p><br /><p>5. From the same Terminal window, create a recommended "root" account using a <br />"Switch User" to 'root' command. Do not use this account for normal administration. Be gentle here.<br /><br /><span style="font-family: courier;">sudo su root</span> <br /><br />This is a one-time setup: <br />Assign a password to the root account; note irregular spelling<br /><span style="font-family: courier;">sudo passwd</span> <br /><br />Write the root password down (I cheated and made this password the same as my admini account)<br />Leave this terminal window open for later steps.<br /><br /><br />6. Optionally, and why-not? Build a new personal user-id:<br />(a user name for your personal login. Flattered if you use my name.)<br /><br /><span style="font-family: courier;">sudo adduser traywolf</span> <br />
<br /><br />7. Make a small security change<br /></p><p>While still root: From a Terminal window (Putty or server desktop), change the owner of the future webpage's html folder:<br /><br /><span style="font-family: courier;">sudo chown admini /var/www/html</span><br /></p><p></p><p></p><p></p><p><br />8. Return to the admini account with this switch-user command:<br /><br /><span style="font-family: courier;">sudo su admini</span><br /><br /><br /><br /><b><u>Initial Webserver test</u>:</b><br /><br />A. From the Pi's desktop (using either the server's desktop or VNC from your workstation), open the Chromium browser. Test with this <br /><br />URL: <span style="font-family: courier;"><b>http://localhost</b><br /><br /></span><i><span style="font-family: inherit;">The default "debian" webpage displays, illustrated.</span><span style="font-family: inherit;"><br /></span></i></p><p style="margin-left: 40px; text-align: left;">(Remember, if using VNC you may need to delete and re-build the connection icon each time you remote-control the desktop. A bug.)<br /></p><p>B. Second test: From your local workstation's desktop (in the same subnet/network), open any browser and type this case-sensitive URL:<br /><br />URL: <span style="font-family: courier;">http://keyliner.local/index.html</span><br /><br />*This site is not yet encrypted (https). The browser will probably prompt "this site is not safe." Click <u>Advanced</u> options, and "Open anyway" (steps vary by browser). <br /><br />The "Debian (Linux brand) default page should display. As of this writing, the default page looks similar to this:<br />
</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmM9h928Wq1b4DFgNlk_h4TNLsVZ63CYEPjBklD7xdXfSx_haLpMf_wrAjbtUaNPMcL-jYuxKobR8JeUl1uGjmfOgGi9H3_kaIO2buUfFRVzYTh3RKUv0DQDGZADpe8vha4rAm_bcKTWamXw8pJXkNIPMpGK3hMhk9TW31eDYmplRW7A5RzbAOKPNtJU_U/s292/2023_09_WebServerDefaultDebianPage.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="291" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmM9h928Wq1b4DFgNlk_h4TNLsVZ63CYEPjBklD7xdXfSx_haLpMf_wrAjbtUaNPMcL-jYuxKobR8JeUl1uGjmfOgGi9H3_kaIO2buUfFRVzYTh3RKUv0DQDGZADpe8vha4rAm_bcKTWamXw8pJXkNIPMpGK3hMhk9TW31eDYmplRW7A5RzbAOKPNtJU_U/s1600/2023_09_WebServerDefaultDebianPage.png" width="291" /></a></div><br /><p>
</p><p><b><u>Setup the FTP Services</u></b><br />
</p><p>sFTP (FileZilla) is used for uploading images and html files to the server. I recommend FileZilla (installed above). Treat the sftp program like a file-explorer window that can move files back and forth between your workstation and the server.</p>a. From your local Windows workstation, launch FileZilla.<p>b. In top-menu, "Site Manager" (the 3-sail icon, upper-left, just underneath the word "File"):<br /><br />c. Create a new host - a new "my site"<br /><br />Protocol: <span style="background-color: #fcff01;">sftp - SSH file transfer protocol</span> (required)<br />Host: keyliner.local (your domain name, or simply "keyliner")<br />Login Type: "Ask for password"<br />User: admini (note irregular spelling)<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Lm8e5Qj61FXfS5ecQ1Q6XoCvGPU41v8I5ZqkJ1CEf4pToDuyfYDBttFvAuYaiPRebr2sjHtuj_XjufL4-rPvjWrt2uUB33Qb4EzfQ6qnWfYJTU3G1L_PMf9MqgYtvOS_8EtOouu_a7pZur7SUljCjis7JHzBeZ89w-Q6GnNbRiF-BO1eXhkZdvzaLE8M/s681/2023_09_WebServerFileZilla.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="307" data-original-width="681" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Lm8e5Qj61FXfS5ecQ1Q6XoCvGPU41v8I5ZqkJ1CEf4pToDuyfYDBttFvAuYaiPRebr2sjHtuj_XjufL4-rPvjWrt2uUB33Qb4EzfQ6qnWfYJTU3G1L_PMf9MqgYtvOS_8EtOouu_a7pZur7SUljCjis7JHzBeZ89w-Q6GnNbRiF-BO1eXhkZdvzaLE8M/s320/2023_09_WebServerFileZilla.png" width="320" /></a></div><p>d. Click "Connect" and type the admini password<br /></p><p style="margin-left: 40px; text-align: left;">The connection is made.<br />The panel has two vertical halves. <br />The left-half is your workstation.<br /><br />The right-half is the server, showing a "tree-view" on top, and a "detail view" on the bottom.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfOYPmYAEdc2A5J3c9kU63tvAf4U-OWjDUr3-oeyCbTXu9hZBF9N_BycN8iONXMqU8dDR99Bw713ofKU1kPMUL0FQPqgeQ9OK_3Y1sPi5rttUBL5TMueDjKRCTUd0ijf9TBj_cy47Jf51jk2FEbzmIUNzN2tXw1Jgt7uVn8gmIVFFnUU9Cu8-lK9G41W7O/s1000/2023_09_WebserverFileZilla.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="639" data-original-width="1000" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfOYPmYAEdc2A5J3c9kU63tvAf4U-OWjDUr3-oeyCbTXu9hZBF9N_BycN8iONXMqU8dDR99Bw713ofKU1kPMUL0FQPqgeQ9OK_3Y1sPi5rttUBL5TMueDjKRCTUd0ijf9TBj_cy47Jf51jk2FEbzmIUNzN2tXw1Jgt7uVn8gmIVFFnUU9Cu8-lK9G41W7O/s320/2023_09_WebserverFileZilla.png" width="320" /></a></div><p>e. On the right-half (the server's side)<br /><br />Tunnel up the tree, arriving at the top-most folder<br /><span> </span>Tunnel down, locating folder "var"<br /><span> </span><span> </span>Tunnel to "\var\www\html" (3 folders deep).<br /><br />f. Click and drag the file "index.html" <i>from</i> the server side <i>to</i> a temp folder (or desktop) on your C: drive -- do this by dragging the file from the right-side to the left -- "detail-side to detail-side". Note: "One file transferred." This is a COPY. (Try to remember the folder you dropped the file into <g>).<br /></p><p>- This confirms your rights, with the bonus of positioning a needed html file for later updates.</p><p>sftp testing complete. Close FileZilla.<br /><br /><u>Possible problem</u><br />Along the top menu bar you can launch an ad-hoc connection. These will fail because it is missing the SSH protocol.<br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyLS07qQ7jSk5NROSKfdtjkbRIhgJ5H9JgR_Uouq_C2YK-sb7XTFWDOOTRsbx3y6QD6GfXl8y_4tn2S8M_tbuokxkeJJ_VeP4SgsRm9-ZISENGhan0IPel3L4ju-IICTrM3o2TbB91HDNkxpdqc0rqJZCD5i4V8iiLnbGDtVMArm9K2JP2Sicv3TXcG5t8/s1000/2023_09_WebserverFileZillaAdhoc.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="321" data-original-width="1000" height="129" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyLS07qQ7jSk5NROSKfdtjkbRIhgJ5H9JgR_Uouq_C2YK-sb7XTFWDOOTRsbx3y6QD6GfXl8y_4tn2S8M_tbuokxkeJJ_VeP4SgsRm9-ZISENGhan0IPel3L4ju-IICTrM3o2TbB91HDNkxpdqc0rqJZCD5i4V8iiLnbGDtVMArm9K2JP2Sicv3TXcG5t8/w400-h129/2023_09_WebserverFileZillaAdhoc.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger image<br /></td></tr></tbody></table><p><br /><br /><b><u>Grant VNC Rights</u>:</b><br /></p><p>If you installed VNC, grant user rights to use VNC<br /><br />From the server's desktop or from Putty/VNC (logged in as admini)<br /><br />Look on the top title-bar. On the far-Right, Right-mouse-click the "Rvnc" icon (near the Wireless/Wired network settings)<br /><br />Select "Options"<br />Select "Users and Permissions"<br />"Add"<br />add user traywolf (your named account)</p><p><br /><b><u>Build a WebEditors Group</u></b></p><p>From the server's desktop (or using your desktop's Putty), open a "Terminal" window (see top title-bar "Terminal" icon). Type these
commands, granting a second, non-administrative account rights to the
html directories:<br /><br />a. Start by switching to the root account. <br /><br /><span style="font-family: courier;"><b>sudo su root</b></span></p><p><span style="font-family: inherit;"><br />b. Then, continue with these commands: <br />where all are case-sensitive commands <br />where "<b>webeditors</b>" is a made-up name for new group.<br /></span><span style="font-family: courier;"><br />sudo addgroup <b>webeditors</b></span> <br /><span style="font-family: courier;">sudo adduser traywolf <b>webeditors</b><br />sudo adduser admini <b>webeditors</b></span><br /><span style="font-family: courier;">sudo chgrp -R <b>webeditors</b> /var/www/html</span> <br /><span style="font-family: courier;">sudo chmod -R g+rw /var/www/html<br /><br />sudo chmod -R a+rx /var/www/html</span><span style="font-family: inherit;"> (grants all users read)</span><span style="font-family: courier;"><br /></span><br />Leave the terminal window open for the next step.<br /><br /><br />c. Similarly, do these rights changes, while still at the su root login:<br /><br /><span style="font-family: courier;">sudo chown admini /etc/apache2/sites-available<br />sudo chgrp -R <b>webeditors</b> /etc/apache2/sites-available<br />sudo chmod -R g+rw /etc/apache2/sites-available<br /></span><br />Close the terminal window<br /><br /><br /><b><u>Edit the 000-default.config File</u>:</b><br /><br />Apache/Linux tightly locked some of these files, keeping them ReadOnly, even though some rights were granted above, apparently incorrectly. Until I figure this out, here is a work-around:<br /><br />1. From your Windows workstation, use FileZilla and login as described above.<br /><br />2. On the right-nav (server-side), tunnel to top folder, then down to: "<b>etc</b>"<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSiaXksNy5oVhf381gGTZs1SwluuQ8M8I94Q3I-XzxS09Oxhdfbgv_8Ze9WXtASSX4-WgIloDB7Out2Z65FN4nZIPrdSDrgqVGQGJhuE53Jq1fu4FPHmG2ZuooRs9y6JB165zMXBAe_ylzNpXFzlSZX4wmHEeGPujlVunTf22pl4rggFnTk91rEe5lspAB/s221/2023_09_WebServerEtcFolder.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="221" data-original-width="171" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSiaXksNy5oVhf381gGTZs1SwluuQ8M8I94Q3I-XzxS09Oxhdfbgv_8Ze9WXtASSX4-WgIloDB7Out2Z65FN4nZIPrdSDrgqVGQGJhuE53Jq1fu4FPHmG2ZuooRs9y6JB165zMXBAe_ylzNpXFzlSZX4wmHEeGPujlVunTf22pl4rggFnTk91rEe5lspAB/w155-h200/2023_09_WebServerEtcFolder.png" width="155" /></a></div><p><br />3. Tunnel to subfolder: "<b>/etc/apache2/<u>sites-available</u></b>"<br /></p><p style="margin-left: 40px; text-align: left;"><i>Be sure this is the "sites-available" and not the simlarly-named "sites-enabled"</i>.<br /></p><p><br />4. Click and drag file "<b>000-default.conf</b>" <br /></p><p style="margin-left: 40px; text-align: left;"><i>from</i> the Server side <i>to</i> a temp or desktop folder on the C: drive<br />(drag the file from the right-side panel to the left-side panel using the same steps as earlier)<br /><br /></p><p style="text-align: left;">5. On your local drive, use Notepad to edit the config file, setting your site's name and other values:<br /></p><p style="margin-left: 40px; text-align: left;">Using Windows Notepad, File-Open/edit the C: temp file: <b>000-default.conf<br /></b>Start, run, Notepad. <br /><br />Important: When doing the File Open, <span style="background-color: #cccccc;">select *.* "All Files"</span><br /><br />Add these<b> </b>highlighted statements to the file (some #comments not displayed in the interest of space). This will be the first of two separate edits in this file:<br /><br /><span style="font-family: courier; font-size: small;"><VirtualHost *:80><br /> # The ServerName directive sets the request scheme, hostname<br /> # and port that the server uses to identify itself. <br /> ServerAdmin webmaster@localhost<br /> DocumentRoot /var/www/html<br /> <span style="background-color: #fcff01;">ServerName keyliner.com</span><br /> <span style="background-color: #fcff01;">ServerAlias www.keyliner.com</span><br /> <span style="background-color: #fcff01;">#<span>Redirect permanent / https://keyliner.com/</span></span><br /> ErrorLog ${APACHE_LOG_DIR}/error.log<br /> CustomLog ${APACHE_LOG_DIR}/access.log combined<br /> <br /> RewriteEngine on<br /> RewriteCond %{SERVER_NAME} = <span style="background-color: #fcff01;">keyliner.com</span><br /> RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI}<br /> [END,NE,R=permanent]<br /></VirtualHost><br /># vim: syntax=apache ts=4 sw=4 sts=4 sr noet</span><span style="font-size: x-small;"><br /></span><br /><br />* Notepad-close and save the file, saving to the same temp C: location</p><p style="margin-left: 40px; text-align: left;">(<i>If creating this file by hand, when saving to notepad, save-as "000-default.conf" -- using quotes in the name. This prevents Notepad from saving as 000-default.conf.txt.</i>)</p><p style="margin-left: 40px; text-align: left;">The file has a commented/hash-mark #Redirect statement. This cannot be enabled until after the ssl cert is applied; plus more statements are needed. This file will be re-edited in a moment, after an initial test.<br /></p><p><br />6. Using FileZilla, copy (drag) the edited file <u>back</u> to the server.<br /><br />Drag file (<b>C:\...\ 000-default.conf</b> - with today's modified date) <br /><i>from</i> FileZilla's left-side (C: drive), dragging from detail side to detail/right side:<br /><br /><i>Drag to folder</i> "/etc/apache2/<u>sites-available</u>"<br /><br />Allow overwrite.<br />If it does not prompt to overwrite, you are at the wrong folder.<br /><br /><br />7. Edit the site's main landing page - "index.html" by copying the file locally for edit:<br /></p><p>Again, with FileZilla<br /><br />a. On the server-side (right-side tree), tunnel up to the top of the server's tree, locating the "/var" folder.<br /> <br />b. Tunnel to folder "<span style="background-color: #fcff01;">/var/www/html</span>". <br /><br />c. Drag "/var/www/html/<b>index.html</b>" <u><i>from</i></u> the server <u><i>to</i></u> your local drive, any temp folder. If prompted, allow overwrite (from a previous test step).<br /></p><p>d. Using Notepad, "File-Open" the local copy for editing. <br /></p><p style="margin-left: 80px; text-align: left;">Details: Using your local Windows workstation. open Notepad.exe<br />File, Open (Select <span style="background-color: #cccccc;">*.* All Files</span>)<br />Open the C: download/temp folder, opening: <u>'index.html'</u> <br /><br /></p><p style="margin-left: 40px; text-align: left;">This is a busy file. If you are like me, you
are not an html-wizard. Don't worry. Snoop-around the
complicated-looking file and make editing changes to your heart's
desire. Remove sections that bother you, etc..<br /></p><p style="margin-left: 80px; text-align: left;"><br />Make various cosmetic changes to the webpage 'index.html' -- changing
text to your domain's name, and other visual things. Because this is for an initial test, do not worry about the page being ugly and do not worry about making horrible mistakes. Keep your changes simple because you have other fish to fry -- this is just for a test. Consider making a backup if you doubt your
skills. <br /><br />At the very least, make these two recommended changes:<br /><br />1) Change the top-banner's domain's name from "Debian Default Page" to your domain's name -- this is cosmetic text. <br /><br />2) Near the top of the file, look for a <title> tag. This is the name that appears in the browser's open tabs. Change to show your domain's name: <br /><span style="background-color: #cccccc; font-family: courier;"><b><br /><title></b>keyliner.com<b></title></b></span><br /><br />3) Other optional changes. The default page has a lot of unneeded sections. Remove them by locating their opening and closing "<div> and </div> tags, and deleting everything between, including the tags. <br /><br /></p><p style="text-align: left;">e. Save the (notepad) file to your C: drive.<br /><br /><br />8. Using FileZilla, drag the updated "index.html" <br /><i><br />drag from</i> the c: temp folder, <br /><i>back to</i> the server's <b>/var/www/html</b> folder<br /><br /> -- clicking and dragging the file from the "detail side" to the "detail side". Allow overwrite.</p><p><br />9. Restart Apache (or reboot the Pi)<br /><br />From a terminal window:<br /><b><span style="font-family: courier;">sudo service apache2 restart</span> </b><br /><br />(<i>there are no prompts or indications, which is kindof lame. It only takes a few seconds but they could have said something on the restart, but they didn't...</i>)<br /><br /><br /><b><u>Local Testing</u></b>:<br /><br />View your new website from Chromium: <br /><br />From the server's desktop, launch a browser (Chromium) <br />URL: <span style="font-family: courier;">http://keyliner.com</span></p><p></p><p>Note your editing changes:<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHBgs9Zf7PyJS7bZwvsoNbxhwAF7uquZ1E5WXtJNJEdbG8x18Ly3-4G3Q3YDYHdt3du0cbOM_fIG0bTiMNKfazXsYITercVxBI1nr22v15zJa7Uyk59zyeNYRWqbjRpaK4ECGr4u-5xCsnkNbnRfCh575VR4k-hW2Dfm5VdhFjIAov3VurLiUC-iqdBoVT/s835/2023_09_WebserverFinalHTML.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="457" data-original-width="835" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHBgs9Zf7PyJS7bZwvsoNbxhwAF7uquZ1E5WXtJNJEdbG8x18Ly3-4G3Q3YDYHdt3du0cbOM_fIG0bTiMNKfazXsYITercVxBI1nr22v15zJa7Uyk59zyeNYRWqbjRpaK4ECGr4u-5xCsnkNbnRfCh575VR4k-hW2Dfm5VdhFjIAov3VurLiUC-iqdBoVT/w400-h219/2023_09_WebserverFinalHTML.png" width="400" /></a></div><p><i>The site is visible locally, but not yet on the Internet. Because the server lives inside your firewall, it is not (yet) exposed to the outside</i>.<br /></p><p><br />---------------------------------------------------------------------------<br />
<span style="background-color: white;"><span style="font-size: large;"><b>Exposing the Pi to the Internet</b></span></span><br />
---------------------------------------------------------------------------<br /><br />Allow Internet traffic on Port 80 (http) and Port 443 (https) to get past your firewall and arrive at the new server. Do this by "punching holes" in your router. If this sounds scary, do not worry. The steps are straight-forward and are safe.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9aBfeZI3asT7cfi_-TkwvtYBz3mlWToks4Yz8c4m8yFOBTDWspOGRrjRacbUljCHPd9RlrOlULiQR416DmVj2wc9ReOjfpG6pOHTdLGpjqWb-uFELiC77mRHzdIj7bZeE8KPTSjfHzON6KLKszwhH5fwEGTyg8CI_cqwzVWRQL_kEMnq8QICBciprfNFN/s131/2023_09_WebServer_WirelessRouter.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="88" data-original-width="131" height="88" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9aBfeZI3asT7cfi_-TkwvtYBz3mlWToks4Yz8c4m8yFOBTDWspOGRrjRacbUljCHPd9RlrOlULiQR416DmVj2wc9ReOjfpG6pOHTdLGpjqWb-uFELiC77mRHzdIj7bZeE8KPTSjfHzON6KLKszwhH5fwEGTyg8CI_cqwzVWRQL_kEMnq8QICBciprfNFN/s1600/2023_09_WebServer_WirelessRouter.png" width="131" /></a></div><br /><br /><div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2NvUY85oMMqpHmvDnDv1KzPJD27m3m3c1i9ENcGWZjrHhat80ApmFqYk2R_7m7iq4v0nojJ2BitREVSq5K0daRtmzeHYiNTBjgwiHfnxwCAkb6ytTQyfCGf8NzSzd7KvwkusCGPKmI_f9/s1600/000.002_Warning.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="37" data-original-width="40" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2NvUY85oMMqpHmvDnDv1KzPJD27m3m3c1i9ENcGWZjrHhat80ApmFqYk2R_7m7iq4v0nojJ2BitREVSq5K0daRtmzeHYiNTBjgwiHfnxwCAkb6ytTQyfCGf8NzSzd7KvwkusCGPKmI_f9/s1600/000.002_Warning.png" /></a></div></div><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><div style="text-align: left;">
You must be able to login to your router's admin screens. If not, consider this <a href="http://keyliner.blogspot.com/2013/01/reset-linksys-wireless-router-password.html" target="_blank">keyliner article</a>, and <a href="http://keyliner.blogspot.com/2012/06/linksys-ea2700-router-first-time-setup.html" target="_blank">this one</a>. (The person who setup your original network may be able to
help with this password. If all is lost, you can reset the router to factory defaults and start over from scratch.) </div></blockquote></blockquote><p><br />A. Login to your home router: Open a browser and type the router's IP address (192.168.100.1). Login using "admin" (not admini), and the router's password (see prerequisites) -- each router manufacturer is slightly different, but all are similar. Illustrated here is a NetGear router.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR_lWAU7Ajffu3hV9s0T7j6wRYvMtKtcukiqZn1Ukth2wCDnlivkrMrHgCOv2DUc9iE4rq_waueCJIgE48QKg-vjaAfhHPUFu5LPXe5Nib4IODqXC1PPhq3xdrQmZLUgmgdzNPHWPi4U5DDGKT1l62Ubu4x9WxO8n3-47voDdyf0owslnkIgju7euWZBgx/s580/2023_09_WebServerRouterLogin.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="324" data-original-width="580" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR_lWAU7Ajffu3hV9s0T7j6wRYvMtKtcukiqZn1Ukth2wCDnlivkrMrHgCOv2DUc9iE4rq_waueCJIgE48QKg-vjaAfhHPUFu5LPXe5Nib4IODqXC1PPhq3xdrQmZLUgmgdzNPHWPi4U5DDGKT1l62Ubu4x9WxO8n3-47voDdyf0owslnkIgju7euWZBgx/s320/2023_09_WebServerRouterLogin.png" width="320" /></a></div><p>B. Select menu "Advanced Setup" (different brand routers have different menus)<br />C. Select "<u>Port Forwarding/Port Triggering</u>" </p><p>D. You will be changing two ports.<br /><br /><b>Step 1: Port 80 http</b><br /><br />In the (Netgear router's) '<b><u>PortForwarding</u></b>' section:<br /> <br />Use the pull-down menu and change the "Service Name" from ftp to "<span style="color: red;">http</span>" (port 80).<br /><br />Add the Pi's IP Address: 192.168.100.<span style="background-color: #fcff01;">245</span> (the pi's '<u>internal</u>' address)<br /><u>Save</u> the changes.<br /><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvUwXvljPgoEFSU66amNoCT9m3Ic-0g2XerhXDZIHk_eqaOZwDMQPq9Hli1CHLR6x22S55BVA7s_jYVdyN5ZtJFIJunuHM-ThJX-lTPK3vkrjaNfjHouVa12FLEWtJGG4Ha9ZELLvq3iOXnNSuntXvAarScg-_EN_6k8IKGh573VBDSpZhjGY1urFZPP_D/s995/2023_09_WebServerNetGearCustom2.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="532" data-original-width="995" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvUwXvljPgoEFSU66amNoCT9m3Ic-0g2XerhXDZIHk_eqaOZwDMQPq9Hli1CHLR6x22S55BVA7s_jYVdyN5ZtJFIJunuHM-ThJX-lTPK3vkrjaNfjHouVa12FLEWtJGG4Ha9ZELLvq3iOXnNSuntXvAarScg-_EN_6k8IKGh573VBDSpZhjGY1urFZPP_D/w400-h214/2023_09_WebServerNetGearCustom2.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view</td></tr></tbody></table><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><p><b>Step 2: Punch a second hole in the 'Custom Service' section...</b><br /><br />Again, in the same general area, select or confirm: <br />"Port Forwarding/Port Triggering" (Netgear)<br />Click "+<u>Add Custom Service</u>" <br /><br />(see button illustrated above. I have no idea why this sub-menu is so different than the http://80 menu -- seems weird to me. "It is what it is.")<br /><br class="Apple-interchange-newline" /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw4WdbKdUJaKiiiOLm1viPozkWDwFg-TrZp5yZJFZnQ0_kPbqxRmyRPpX0VF2NL-0pnIjdTrvzZz6SwWdsfl--lbmid7ra9T4ck-Lqu5lFkEy06Cae22TkX1B4Csj2P-6rRPWls8feWpIv-Fuwi2J7O2Tjw-NBAGyYbUDV8udZUv-CY_M8nMYaUIBc15gY/s969/2023_WebServerNetGearCustom.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="419" data-original-width="969" height="173" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw4WdbKdUJaKiiiOLm1viPozkWDwFg-TrZp5yZJFZnQ0_kPbqxRmyRPpX0VF2NL-0pnIjdTrvzZz6SwWdsfl--lbmid7ra9T4ck-Lqu5lFkEy06Cae22TkX1B4Csj2P-6rRPWls8feWpIv-Fuwi2J7O2Tjw-NBAGyYbUDV8udZUv-CY_M8nMYaUIBc15gY/w400-h173/2023_WebServerNetGearCustom.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Example Netgear Custom Service</td></tr></tbody></table><p>In the top field, type a Service Name: "https" (this is a cosmetic, invented name)<br />Select: TCP/UDP<br />External Port Range: 443-443 (with hyphens)<br />Internal Port Range: 443-443<br />Set the Internal IP Address: 192.168.100.<span style="background-color: #fcff01;">245</span> (again, the pi's <u>internal</u> address)<br /><br />Click "Apply"/Save</p><br />E. Close the router screens.<br /><br /><i>If you mess this up, nothing will break in your home network, but you may not be able to reach the Pi webserver. Seriously, as scary as this looks, it is low risk. Notice how the ftp port 22 is not allowed past your firewall. Your FTP ports are safe and are not exposed to the outside</i>. <br /><br /><i>See later for a comment about using fixed IP addresses like this</i>.<br /><p></p><p>---------------------------------------------------------------------------<br />
<span style="background-color: white;"><span style="font-size: large;"><b>Pointing your Domain to your Server</b></span></span><br />
---------------------------------------------------------------------------<br /></p><p>Getting close to being done-done!<br /><br />The domain provider (GoDaddy) needs to know your external-facing IP Address. <br /> Change something called an "A-record." </p></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN7Rp7oyivqbUsKINKJCecQsDlY1qO2KJXMa7scSg9ShoEvQAvKl360g9Eu4Ojs98KEFvvqefTE8TrDEg_xTCfslC8X4yKCx_h4wuGCulVlRXPZ9eVO6Pdy_nYdSBO3hdK2wa295ZAdjDIL3eRc-Z8diL0uPq8H4ervCyy_pIn4EH3u9Gg6i3inYL8eBh-/s71/2023_09_WebServer_DetourSign.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="71" data-original-width="69" height="71" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN7Rp7oyivqbUsKINKJCecQsDlY1qO2KJXMa7scSg9ShoEvQAvKl360g9Eu4Ojs98KEFvvqefTE8TrDEg_xTCfslC8X4yKCx_h4wuGCulVlRXPZ9eVO6Pdy_nYdSBO3hdK2wa295ZAdjDIL3eRc-Z8diL0uPq8H4ervCyy_pIn4EH3u9Gg6i3inYL8eBh-/s1600/2023_09_WebServer_DetourSign.png" width="69" /></a></div><p>From your domain provider's administration pages, login to your domain (<i>How to do this varies by provider, but all are similar. You will be editing the "A-record"</i>.) </p></div><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><div><p style="text-align: left;">! <i>This assumes you are not hosting a webpage on their server and are not paying a monthly hosting fee for that website. If yes, you may want to cancel that cost because the Pi-server is taking over that need. </i> </p></div></blockquote></blockquote></blockquote></blockquote><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><div><p style="text-align: left;">(<i>The domain provider is the company that holds your domain address, keyliner.com. And this company is likely different than your ISP/Internet provider.</i>)</p></div></blockquote></blockquote></blockquote></blockquote><div><p>Example Godaddy steps:<br /><br />a. Once logged in, locate "<u>Manage Domains</u>" -- find your domain (keyliner.com)<br />b. Select the "[DNS]" tab<br />c. Edit the A-Record (A "type")</p><p><br />d. In the "Data" field, type your <span style="background-color: #fce5cd;">external-facing</span> IP Address. <i>My address is 96.19.200.6. Your address will be different</i>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsmUcPK-0HY4mWpTpKMW6QixPq_pHN-Me1Bm_cGAXVugZcQI0_6Rh6-WBbmzIAXqG8LO_nrtbmBQz-BXS-yQjCNBZcnYXfpA1tQ3YzNkDlQ4UP5v9wnoX2dpz6uE_VHYkwr4cW2YB3OqJDrT-ltpV3XyLY7kTiKNyBkax4UMLgVC7278s2EcOagO7GOCbX/s913/2023_09_WebServerDomainARecord.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="334" data-original-width="913" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsmUcPK-0HY4mWpTpKMW6QixPq_pHN-Me1Bm_cGAXVugZcQI0_6Rh6-WBbmzIAXqG8LO_nrtbmBQz-BXS-yQjCNBZcnYXfpA1tQ3YzNkDlQ4UP5v9wnoX2dpz6uE_VHYkwr4cW2YB3OqJDrT-ltpV3XyLY7kTiKNyBkax4UMLgVC7278s2EcOagO7GOCbX/w640-h234/2023_09_WebServerDomainARecord.png" width="640" /></a></div><p>This is the external-facing IP address found in this article's prerequisites (from your workstation, Google "what is my IP"). </p><p><br /><b>Caution</b>:<br /><br />In the A-Record:<br />Do not type the Pi's internal address.<br />Do not type the router's dot-one address<br /></p><p style="margin-left: 40px; text-align: left;">This is your <span style="background-color: #fce5cd;">external-facing</span> IP Address and your address will be different
than mine. This address may change with a router reboot. If it changes, the A-Record needs to be changed. At some cost you can purchase a static IP from your ISP (this is not your Domain provider).<br /></p><p style="margin-left: 40px; text-align: left;"><i>For this project, you are not using a "301 Redirect" or "Forwarding with masking". All you need is a simple A-Record change.<br /></i><br /> </p><p style="text-align: left;"><b>Test the Domain:<br /></b>----------------------<br /></p><p style="text-align: left;">"A-Record" changes take time to propagate through the inter-web.<br /><br />a. Confirm propagation: </p><p style="text-align: left;">After making the (Godaddy) changes, use your Windows workstation and browse to <br /></p><p style="margin-left: 40px; text-align: left;"><span style="background-color: white; font-family: courier;"><b>https://dnschecker.org</b></span><br /><br /></p><p style="text-align: left;">b. Type your Domain ("keyliner.com") and see the progress world-wide. Godaddy says it take anywhere from an hour to 48 hours. My experience has been 10 minutes.<br /></p><p style="text-align: left;"><br />c. Test from the "outside"<br /><br />Once propagated, test the domain from the "outside". <br />You cannot properly test your new page from within your home network. <br /><br />Consider trying this: From your cellphone, turn off WiFi (and use only Cellular data for your connection -- steps not detailed here).<br /><br />From your phone, browse to <b>http://keyliner.com</b><br /><br />If the page loads, and you can see your attractively-edited index.html, then success! You may be prompted "this site is unsafe (http:)"; accept the risks by clicking "Advanced" and "Allow anyway".<br /><br />d. Consider calling a friend and asking them to browse to your website. Warn them the site is unencrypted. Or browse from a work PC or a work-VM. This proves the firewall and A-Record are setup properly.<br /><br />You could claim success and stop the project here. But it is best to do another step.<br /><br /></p><p>-----------------------------------------------------------<br />
<span style="background-color: white;"><span style="font-size: large;"><b>https ssl encryption (Port 443)</b></span></span><br />
-----------------------------------------------------------<br /><br /><img border="0" data-original-height="120" data-original-width="214" height="120" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOYJ3ojSXOfeiwN4FyBUP0aeIu1wgEYXRvb9OSmdVOi4ZGtrjRKb7O9zM76fPbkNrpi7jkKeeNGDchtdi9We8q0EQ9br3LkLlsT1E7txdxOubNPZ7oBuStCZj4-czGSzX50eWseyYlMNgIk5uC8fMC5Q4Ri2sQAaGRefga5i_8azRo4qjuz3LO-O8AA7Bf/s1600/2023_09_WebServerSSLIcon.png" style="color: #0000ee; text-align: center;" width="214" /><br /><br />Nobody wants an unencrypted website. From EFF (Electronic Frontier Foundation), and an organization called "letsEncrypt.com", get a free ssl certificate. Apply this to your site and your URL will switch to "http<span style="background-color: #04ff00;">s</span>://", giving it the coveted "lock" icon.</p><p style="margin-left: 40px; text-align: left;">The ssl cert encrypts the site's traffic. Encryption does not mean you are a good or bad guy; it just means the traffic can't be snooped. You want this. For reference, see: <a href="https://letsencrypt.org/getting-started" target="_blank">https://letsencrypt.org/getting-started</a> <br /></p><p style="text-align: left;"><b><u>Steps</u></b>:<br /><br />1. Confirm your domain is visible to the outside world as port 80/http or these steps will fail. <br /><i>You tested on your cellphone, or from the office, right</i>?</p><p style="text-align: left;"><br />2. Install "snapd" on the Pi.<br /><br />On the Pi server's desktop or from a putty terminal window, install "snapd" - this is needed by the soon-to-be-installed CertBot. <br /><br />From a Putty, or a Terminal session, login as "admini" and type these case-sensitive commands:<br /> <br /><span style="font-family: courier;">sudo apt update<br />sudo apt install snapd<br />sudo reboot<br /></span> <br />3. On reboot, re-launch the terminal window and re-connect as "admini". <br /><br /><i>Note these commands use "snap", not "snapd"</i>:<br /> <br /><span style="font-family: courier;">sudo snap install core<br />sudo snap refresh core</span><br /> <br /><br />4. From the same terminal window, continue with this cleanup:<br /><br />un-install any pre-installed CertBots (there are likely none)<br /><span style="font-family: courier;">sudo apt-get remove certbot</span></p><p><br />5. Continue with the CertBot install, again using the word "snap":<br /><br /><i></i></p><div class="separator" style="clear: both; text-align: center;"><i><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBaacpCL0rCIN24wWvA_JB62Xc13RiSCUPocsISRqNAT5yVquLzgnLj6k68ijvoSohmUbmVCg-Z7vNL_XeDc1q8ZGxVU0YYS5WEc_1J5Llb_4OihO-OaesUfokCuz0LVAFN_Jz9QmrHWy-0yo_w_XJX1OOGe341NqZcALNY7CsoGFqyf2HytNKxRacShN_/s105/2023_09_WebServer_CertBot.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="94" data-original-width="105" height="94" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBaacpCL0rCIN24wWvA_JB62Xc13RiSCUPocsISRqNAT5yVquLzgnLj6k68ijvoSohmUbmVCg-Z7vNL_XeDc1q8ZGxVU0YYS5WEc_1J5Llb_4OihO-OaesUfokCuz0LVAFN_Jz9QmrHWy-0yo_w_XJX1OOGe341NqZcALNY7CsoGFqyf2HytNKxRacShN_/s1600/2023_09_WebServer_CertBot.png" width="105" /></a></i></div><i>Note double and single hyphens<br /> Note leading slashes<br />Note the irregular usr spelling<br />Note "<span style="font-family: courier;">ln</span>" = lower-case el-N, not "1" (one)<br />Note "apache", not "apache2", and again, double-hyphens</i><br /><p></p><p><span style="font-family: courier;">sudo snap install --classic certbot</span> <br /><span style="font-family: courier;">sudo ln -s /snap/bin/certbot /usr/bin/certbot</span> </p><p>followed by:<br /><span style="font-family: courier;">sudo certbot --apache</span><br /><br /></p><p style="margin-left: 40px; text-align: left;"><span style="background-color: #fcff01;">Important 1</span>:<br />When prompted for your email address, type a real (reliable) email address for notifications. The new cert expires and must be renewed -- you want to know this is happening. No junk email accounts here. <i>LetsEncrypt and EFF Foundation are legitimate companies.</i><br /><br />! Write down the email address you used, label as "Cert Email Notifications".<br /><br />Answer "Y" (capital Y) for License/terms of service<br />Answer "Y" or "N" for the EFF Newsletter. <br /><i>The EFF organization is legitimate and I marked "Y" - they send interesting newsletters</i>.<br /><br /><span style="background-color: #fcff01;">Important 2</span>:<br />When prompted "Enter the domain name(s) you would like a certificate, comma-separated", </p><p style="margin-left: 40px; text-align: left;">type "<b>keyliner.com, www.keyliner.com</b>" </p><p style="margin-left: 40px; text-align: left;">(Notice the comma. Obviously, use your own domain. No @-sign, no quotes.)<br /><br />note: When I first did this, I just used "keyliner.com" (without the "www"). I later had to revisit the <span style="font-family: courier;">certbot --apache</span> step and add the second domain. If you have other webservers, they can share this same certificate by adding them to the same comma-list. <br /></p><p style="margin-left: 80px; text-align: left;">No need to review, but the cert bot wrote a log file here:<br />see file <span style="font-family: courier;">/var/log/letsencrypt/letsencrypt.log</span><br /><br /></p><p style="text-align: left;"><span style="background-color: #f4cccc;">Possible CERT problem</span>:<br />"Certbot failed to authenticate. The Certificate Authority reported these problems:<br />Domain: keyliner.com<br />Type: Unauthorized<br />detail: 76.223.105.230: Invalid response from http://keyliner.com/.well-known/acme-challenge.... 404<br /><br />Likely solutions: <br />Did you punch a hole in your router for ports 80 and 443? <- I screwed this up, forgetting 443. <br />Did you build your (Godaddy) A-Record properly? <br />Unlikely, did your external-facing IP address change while building the Cert?<br /></p><p></p><p></p><p></p><p><br /><b>6. Test the renewal</b>:<br />Test the renewal with the dry-run command. <br /><br /><span style="background-color: #04ff00; font-family: courier;">sudo certbot renew --dry-run</span><br /></p><p style="margin-left: 40px; text-align: left;">A drawback to the free LetsEncrypt's ssl certs is they expire every 90 days, where most certs last for a year or two. Renewing is easy, but it is another nuisance to contend with. If you house
your domain with them, they auto-renew, otherwise, you have to manually run the command. I suppose this is a way to drive business. As they say, "no such thing as a free lunch."</p><p style="margin-left: 40px; text-align: left;"><i>Best-practice does say the cert should be changed more frequently than yearly, so I do understand that point of view.</i><br /></p><p style="margin-left: 40px; text-align: left;">7. The Cert is not quite enough. One more edit is needed, telling non-encrypted traffic to switch over to https. Force <b>"www</b>.keyliner.com" and "<b>http</b>://keyliner.com" to re-route to the encrypted side.</p><p> <br />Using the changes below, intercept all calls to "<b>http</b>://keyliner.com" and "<b>www</b>.keyliner.com," redirecting to https: (ssl port 443). Do this by re-editing Apache's 000-default.conf file. This is the second edit to this file.<br /><br />a. Re-edit "000-default.conf:<br /><br />Using FileZilla, re-drag this file <i>from the</i> server to a temp location on your C: drive, overwriting previous copies as needed, or if the last-changes are still current, re-edit your local copy: <br /><br />drag <i>from</i><br /><span style="font-family: courier;"><b>/etc/apache2/sites-enabled/000-default.conf </b></span> <br /><br /><i>to</i> a working folder on your C: drive.<br /><br />b. Using Windows Notepad, (re) edit the file with a <br />File, Open, <br />Change the file-type to All Files (*.*). <br /><br />c. <span style="background-color: #f4cccc;">Un-comment</span> the 'Redirect Permanent' statement by removing the #hash-sign.<br /><br />d. Add (type) a <span style="background-color: #f4cccc;"><span>new</span> block of code</span> near the bottom of the file. This is the new Port 443 section. <i>Add these lines after the closing /VirutalHost tag, which is just above the last #vim statement at the end of the file</i>.<br /><br /><u>Illustrated</u>:<br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJQBJAxuZZQPCdqze2W2CMFVC8OCusVXa1lrT3NVurw6MQSYpgwupWA7soQqWetQ6evz04jcwG6H4B3R3NysuRnFz3BWNdXffWOwK897RyjgVHmGAuzGtpAQYObBCCFE8rLrsBiNDDBKkJnV2wI8MD40URBDJU1_M9LuYJaJEkO7xZuUQDZdWU5eVyGOMn/s899/2023_09_configIllustrated.pg.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="899" data-original-width="732" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJQBJAxuZZQPCdqze2W2CMFVC8OCusVXa1lrT3NVurw6MQSYpgwupWA7soQqWetQ6evz04jcwG6H4B3R3NysuRnFz3BWNdXffWOwK897RyjgVHmGAuzGtpAQYObBCCFE8rLrsBiNDDBKkJnV2wI8MD40URBDJU1_M9LuYJaJEkO7xZuUQDZdWU5eVyGOMn/s320/2023_09_configIllustrated.pg.png" width="261" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view or see text</td></tr></tbody></table><p><u>As text</u>: </p><p><span style="font-family: courier; font-size: small;"><VirtualHost *:80><br /> # The ServerName directive sets the request scheme, hostname<br /> # and port that the server uses to identify itself. <br /><br /> ServerAdmin webmaster@localhost<br /> DocumentRoot /var/www/html<br /> <span style="background-color: #fcff01;">ServerName keyliner.com<br /></span> <span style="background-color: #fcff01;">ServerAlias www.keyliner.com</span><br /> <span style="background-color: #ea9999;">Redirect permanent / https://keyliner.com/</span><br /> ErrorLog ${APACHE_LOG_DIR}/error.log<br /> CustomLog ${APACHE_LOG_DIR}/access.log combined<br /> RewriteEngine on<br /> RewriteCond %{SERVER_NAME} = <span style="background-color: #fcff01;">keyliner.com</span><br /> RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]<br /> <br /></VirtualHost><br /><br /><span style="background-color: #ea9999;"><b><span><VirtualHost *:443> ServerName keyliner.com<br /> ServerAlias www.keyliner.com<br /> Protocols h2 http/1.1<br /><br /> <If "%{HTTP_HOST} == 'www.keyliner.com'"><br /> Redirect permanent / https://keyliner.com/<br /> </If><br /> # SSL Configuration<br /><br /> # Other Apache Configuration<br /></VirtualHost></span></b></span><br /># vim: syntax=apache ts=4 sw=4 sts=4 sr noet</span><span style="font-size: small;"><br /></span></p><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><p>e. Save the Notepad file! Close Notepad.<br /> <br /><br />f. Use FileZilla to re-post (drag) the file <i>back to</i> the server. Again, drag the file from the left-hand detail-side to the server's right-hand detail-side. Destination:<br /><br />Drag from C: drive to:<br /><span style="font-family: courier;"><b>/etc/apache2/sites-enabled/000-default.conf</b></span> <br /><br /><br />g. Restart Apache (there are no prompts or indications):</p><p style="margin-left: 40px; text-align: left;">From a terminal window:<br /><span style="font-family: courier;"><b>sudo service apache2 restart</b></span> <br /><br /><br /></p><p style="text-align: left;"><b><u>Testing the Cert</u>:</b> <br /><br />Re-test the website. Re-test from a local workstation, and then from the outside. You may need to clear browser cache.<br /><br />A. With your local Windows workstation browser, try all three different URL's:<br /><br />http<span style="background-color: #04ff00;">s</span>://keyliner.com (note the "s"). Confirm encryption; see below<br />http://keyliner.com Confirm https by looking at the URL-bar:<br />www.keyliner.com Confirm https:<br /></p><p style="text-align: left;"><br />B. Optionally: Assuming you arrived as https://, investigate the cert:<br /><br />In a browser, open your new https site. <br />Click the "lock" icon near the URL (Firefox; other browsers similar).<br />Tunnel into "More information", and "View Certificate". <br />Various goodies, including the all-important <u>expiration date</u>.<br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz44o51CQWQ5wc3LjMrjVVPrhPMVsxRjcZ2pPRBCaIf3LzSFQ3ea2qH_mCXZH3Nxa0zYsa8jeV5nAM7JN41CLl71SvLQHKiX44PrKbiE86MW1pfm0ZB6aCNh3MeeV7ktT2VJeXjisW8V5D3Stu_3sZR5MWQPbZePueuRXl8YrXXem6_2MeAQvt9rbxheq_/s1080/2023_09_WebServerLockIcon.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="446" data-original-width="1080" height="165" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz44o51CQWQ5wc3LjMrjVVPrhPMVsxRjcZ2pPRBCaIf3LzSFQ3ea2qH_mCXZH3Nxa0zYsa8jeV5nAM7JN41CLl71SvLQHKiX44PrKbiE86MW1pfm0ZB6aCNh3MeeV7ktT2VJeXjisW8V5D3Stu_3sZR5MWQPbZePueuRXl8YrXXem6_2MeAQvt9rbxheq_/w400-h165/2023_09_WebServerLockIcon.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><p><b><u>Renewing the Cert</u></b>:<br /><br />"LetsEncrypt's" free ssl cert expires in every 3 months, ostensibly for security reasons. <i>Add a reminder in your phone's calendar to renew the cert.</i> </p><p style="margin-left: 160px; text-align: left;">My piddly webpage just doesn't care about all this security, but regardless, you must renew four times per year. <br /></p><p>When the cert is near expiration, you will get an email:<br />From a putty/terminal window, use: <span style="background-color: #04ff00; font-family: courier;">sudo certbot renew</span></p><p><br />---------------------------------------------------------<br /><b><span style="font-size: large;">Final Hardware Steps</span></b><br />---------------------------------------------------------<br /><br />After the initial setup, the Pi can run unattended, and can be managed remotely using Putty, VNC, and FileZilla. The Pi becomes an appliance and no longer needs a keyboard, mouse, or monitor.<br /><br /><b>Final steps:</b><br />Shut-down the Pi<br />Unplug all the goodies<br />Move the Pi to its forever home, usually near the router<br />Plug in the ethernet cable<br />Plug in the power<br /><br />The Pi boots (silently) and automatically starts the webserver.<br />From any workstation (internal or external) or cellphone, browse to your site to confirm your wiring is good and the page loads.<br /></p><p style="margin-left: 80px; text-align: left;">If you have failures here, check the wiring and their blinky lights. With VNC, check the up-down/eth0 icon in the upper right menu and confirm the network settings. From the Linux desktop, open the Chromium browser and browse to Google. If Google works, the problem will be with the Domain provider.<br /></p><p><br />For fun: In my home wiring closet, you can see two Raspberry Pies, one for a webserver and a second unrelated Pi for a DNS Sinkhole (keyliner article: <a href="https://keyliner.blogspot.com/2018/01/network-wide-blocking-of-ads-tracking.html" target="_blank">pi-hole</a>).<br /><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_-Ze8UcfbO-qsJA5oGMyr8ZwVAY8Y10YReiAWVHk4_e4QHE9Jo7tosl5vNhEwMgQU-xy8AxNqvK1gzAgmDkn3EEqY2nwsN4WcfV7DWEhfi2C1pIKjvZee0uRBtXM4gL3dtE1uw-5OwEHzmGDkE5ef6aoJZiVhz86S8C52AMumbNlOeovyTa3U_6wnvXCK/s1124/2023_09_WebServerWiringCloset.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1124" data-original-width="600" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_-Ze8UcfbO-qsJA5oGMyr8ZwVAY8Y10YReiAWVHk4_e4QHE9Jo7tosl5vNhEwMgQU-xy8AxNqvK1gzAgmDkn3EEqY2nwsN4WcfV7DWEhfi2C1pIKjvZee0uRBtXM4gL3dtE1uw-5OwEHzmGDkE5ef6aoJZiVhz86S8C52AMumbNlOeovyTa3U_6wnvXCK/s320/2023_09_WebServerWiringCloset.jpg" width="171" /></a></div><p><br />---------------------------------------------------------<br /><b><span style="font-size: large;">You are done-done!</span></b><br />---------------------------------------------------------<br /><br />The webserver is complete and in production. <br /><br />Final thoughts. <br />If you are cheap like me, you did not buy a static IP address from your ISP. This means you need to keep an eye on your home-router's external-facing IP Address. <br /><br />From any workstation, periodically check your external facing IP ("what is my ip") and see if the address has changed. Or just see if your page loads. If the page is not found, likely the external IP address changed. If changed, modify your Domain's "A-Record" (at Godaddy), and wait for propagation. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj27bgjZpjb6PgqIE6zfYj4KJRklMm_5ZgduGfWBzNrvVll4WYXCegO-u7eDbl4OaeoP5hO0jUSQ_WDUrUD_TPNDwOVOzg_r4ix4VtTkz_wGy07abMDChV2jkxNRMGk-vMA_HqT-zfioJHbPcT5n4kNFIOjcCCxvAQFl9Ng_Yp4CqS2OhnYPexmsjzkE7aQ/s206/000.012_KeyIcon.tif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="203" data-original-width="206" height="71" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj27bgjZpjb6PgqIE6zfYj4KJRklMm_5ZgduGfWBzNrvVll4WYXCegO-u7eDbl4OaeoP5hO0jUSQ_WDUrUD_TPNDwOVOzg_r4ix4VtTkz_wGy07abMDChV2jkxNRMGk-vMA_HqT-zfioJHbPcT5n4kNFIOjcCCxvAQFl9Ng_Yp4CqS2OhnYPexmsjzkE7aQ/w72-h71/000.012_KeyIcon.tif" width="72" /></a></div><p>The domain's A-Record points to your ISP's <span style="background-color: #fce5cd;">external address</span> - which can change!<br />The ssl Cert is tied to the Pi's <u>internal</u> address (192.168.100<span style="background-color: #fcff01;">.245</span>) - unlikely to change. <br /><br /><br /></p><p>If you replace your router, say with a different brand, it may start at a different subnet, such as 10.10.1.1, etc.. Rather than rebuild the world, tell the new router to use the same "192.168(.100).1" address as before. This way all the other devices in your house don't need to be told about the new IP address, and you won't have to re-build the cert. If you do change your internal IP Address scheme, see LetsEncrypt.com for details.<br /> <br />Document your good work. <span style="background-color: #fcff01;"><span style="background-color: white;">This stuff is too hard to figure out later.</span></span><br /> <br /><span style="background-color: #fcff01;">Record in writing, these things:<br /><br /><span style="background-color: white;"><span style="font-family: courier;">Main Router IP Address (.1)<br />_________________<br />(Netgear wireless)<br /><br />Main Router Admin Password:<br />_________________<br /><br /><br />Your Domain Name:<br />_________________<br />(keyliner.com)<br /><br />Domain Provider Login<br />_________________<br />(Godaddy.com, etc.)<br /><br />Domain Provider Password:<br />_________________<br /><br /><br />Raspberry Pi internal IP Address (.245): <br /></span></span></span><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;">_________________</span></span></span></p><p><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;">External-facing IP Address: (likely will change)<br />_________________<br />(Google "what is my IP)</span></span></span></p><p><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;"><br />Linux "admini" password / Terminal / VNC: <br /></span></span></span><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;">_________________</span></span></span><br /><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;">(or "pi" password)<br /><br />"root" password: <br /></span></span></span><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;">_________________<br /></span></span></span><br /><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;"><br />your local "traywolf" password: <br /></span></span></span><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;">_________________<br /></span></span></span><br /><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;"><br />Cert First Renewal Date</span>:<br /></span></span><span style="background-color: #fcff01;"><span style="background-color: white;"><span style="font-family: courier;">_________________<br />(renews quarterly: sudo certbot renew)<br /><br />Cert Email Notification Address used:<br />_________________<br />(from LetsEncrypt.com)<br /></span></span></span><br /><span style="background-color: #fcff01;"><span style="background-color: white;"><br />Print this file:<br /> </span></span><span style="font-family: courier;">/etc/apache2/sites-enabled/000-default.conf </span><br /><span style="background-color: #fcff01;"><span style="background-color: white;"> <br />This article's permanent link: <br /> </span></span><span><span class="w4txWc oJeWuf" id="c37" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/">https://keyliner.blogspot.com/2023/09/install-raspberry-pi-webserver-step-by.html<br /></span></span></span><br /><span style="background-color: #fcff01;"><span style="background-color: white;">Store a copy of these notes on your OneDrive or GDrive. <br /><br />Make backups of the Configuration files, and backup the index.html, as well as any graphics you may have added to the page. </span></span><br /> <br /> <br /><u>Next Goals</u>:<br />The default Apache 'index.html' page is beyond ugly. Your next task should be to build a prettier main landing page. </p><p style="margin-left: 120px; text-align: left;"><i>Not knowing html, and not being a good graphics designer, I spent hours building a new index.html page -- spending far more time on this than on building the original server</i>! And even after this, my <a href="https://keyliner.com" target="_blank">keyliner page</a> (which is different than this blog) still looks like a Jr.High student's first webpage. Since this is my <u>first-ever</u> "real" web page, forgive the artistry. The page meets my goals. </p><p style="margin-left: 120px; text-align: left;">A benefit of your own server is no practical limits on how large, how many pages, or how many graphics you load. If you exceed the 32gb available on the internal drive, you could add a secondary external USB disk.</p><p><i><br /></i>I used these tools to build the page.<br />I started with a WordPerfect table (or blech, Word), added graphics, then saved as html. The code was not good. Abandoning that, I next used PaintShopPro, drawing a large multi-part image, and then overlayed an "ImageMap" with clickable hot-spots (a feature of PaintShopPro). I put this code in the "index.html" file. <br /><br />My page is low-tech but it works well-enough. <br /></p></div><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: medium; margin: 0px 0px 0px 40px; padding: 0px;"><div style="text-align: left;">It would help to have a real web development software, one that writes the html for you. If you had such a creature, you could upload it directly to this server. My friend, Doug, has such software. I hope he leaves a comment here telling us-all what it is.</div></blockquote></blockquote></blockquote><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZez3ZBzjx9AfJ_8O9KCIbrTNbfERaMDMWIIXJ1A0IOW4m-rc8VLUxdxKhXqGnVjLusFzL6qjQRQL9Vkpwm7ojcQ6bsZUOfQ4VMwrCVDiu_CICB5bJTf0Z5pAwVsxLH6Y4fjtjYfsZXEUCm1dDHbEQDxjy9J-ccpW5OB_T7klBT63lwkYTEtsU-49PxEvR/s691/2023_09_WebServerMyFirstPage.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="479" data-original-width="691" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZez3ZBzjx9AfJ_8O9KCIbrTNbfERaMDMWIIXJ1A0IOW4m-rc8VLUxdxKhXqGnVjLusFzL6qjQRQL9Vkpwm7ojcQ6bsZUOfQ4VMwrCVDiu_CICB5bJTf0Z5pAwVsxLH6Y4fjtjYfsZXEUCm1dDHbEQDxjy9J-ccpW5OB_T7klBT63lwkYTEtsU-49PxEvR/w400-h278/2023_09_WebServerMyFirstPage.png" width="400" /></a></div><p><br /><span style="background-color: #f4cccc;"> 2022.0919 - Known issue: Graphics not displaying</span> - solved:<br />When the new graphics on the landing page (index.html) were tested on the local workstation, it worked perfectly. But once uploaded to the server, the graphics did not resolve, with file-not-found. (index.html can be saved on the local C: drive. From a browser, type url: "file://path/index.html" to test (no quotes).)<br /></p><p>Contrary to many articles on the Internet, this was not a rights problem. There is nothing wrong with your server or its setup, and this is not a problem with "relative" vs "fixed paths."<br /><br />The problem was filenames are case-sensitive in Linux, both in the html code and in the actual filename. In Windows, my filenames had mixed case; in HTML, all were typed with lower-case. I changed the Windows filenames to lower-case and re-ftp'd them to the server, fixing the problem.<br /><br />img src="<span style="background-color: #fcff01;">I</span>ndex<span style="background-color: #fcff01;">I</span>mages/keyliner<span style="background-color: #fcff01;">T</span>op<span style="background-color: #fcff01;">B</span>anner-810.png is not the same as<br />img src="indeximages/keylinertopbanner-810.png<br /><br />full description of the problem in this article, and it shows how to rename in Windows:<br /><span><span class="w4txWc oJeWuf" id="c149" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><a href="https://keyliner.blogspot.com/2023/09/problem-graphics-not-displaying-on.html">https://keyliner.blogspot.com/2023/09/problem-graphics-not-displaying-on.html</a></span></span></span><br /><br />For your reference, my "indexl.html" file, which uses an ImageMap is shown below. This was generated by my photo-editor.<br /></p><p>Finally, <br />The Netscape logo at the top of this article is a small jest. Hope it brought back fond memories.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie0IUXdpg10fbTO1X4U2J2a_KVj2A836cMPkQ7RWBVOwBABwL5qbddrJmIMS2GHoiWd2XXGjbfi1tL9XrccbRb0JAZn6gLXzDDZjeuL2yd0ylTGOXQcaC0WLaHCo4860naor3hTIduM8IKatPsDSlqcHPi4QD3JbSvK7lxGD5YK2o7MXSpSRoGKrr88Urs/s410/2023_09_WebServerDomain12Dollars.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="410" data-original-width="262" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie0IUXdpg10fbTO1X4U2J2a_KVj2A836cMPkQ7RWBVOwBABwL5qbddrJmIMS2GHoiWd2XXGjbfi1tL9XrccbRb0JAZn6gLXzDDZjeuL2yd0ylTGOXQcaC0WLaHCo4860naor3hTIduM8IKatPsDSlqcHPi4QD3JbSvK7lxGD5YK2o7MXSpSRoGKrr88Urs/s320/2023_09_WebServerDomain12Dollars.png" width="204" /></a></div><p></p><p><span style="color: #666666;">2024.02 Update - the server has been running for 5 months, with no downtime -- not even an A-Record change. Flawless.<br /><br />For reference: keyliner.com's "index.html" file:<br /><br /><span style="font-family: courier;"><span style="font-size: xx-small;"><html><br /><head><br /><meta name="Author" content=""><br /><meta name="Generator" content="PaintShop Pro"><br /><title> </title><br /></head><br /><body><br /><br /><img name="TopMenuImageMap0" src="TopMenuImageMap.png" width="483" height="1179" border="0" usemap="#TopMenuImageMap" alt="" /><br /><br /><map name="TopMenuImageMap"><br /><area shape="rect" coords="14,106,178,359" href="https://keyliner.blogspot.com/2024/01/citystateparse-parse-single-line.html" alt=""><br /><area shape="rect" coords="182,108,328,360" href="https://imageliner.blogspot.com" alt=""><br /><area shape="rect" coords="333,90,479,331" href="https://cookliner.blogspot.com" alt=""><br /><area shape="rect" coords="301,374,455,617" href="https://keyliner.blogspot.com/2020/04/war-and-peace-programming-in-c.html" alt=""><br /><area shape="rect" coords="66,449,287,534" href="https://www.amazon.com/dp/B09QZW6RML?binding=kindle_edition" alt="War and Peace Programming on Amazon"><br /><area shape="rect" coords="15,674,167,873" href="https://keyliner.blogspot.com/2023/09/install-raspberry-pi-webserver-step-by.html" alt=""><br /><area shape="rect" coords="171,673,319,873" href="https://keyliner.blogspot.com/2022/06/device-id-asset-tag-management.html" alt=""><br /><area shape="rect" coords="323,673,480,872" href="https://keyliner.blogspot.com/2021/11/windows-11-tuning.html" alt=""><br /><area shape="rect" coords="18,1101,131,1126" href="https://keyliner.com/keylinerContact.html" alt=""><br /><area shape="rect" coords="19,1133,254,1163" href="https://drive.google.com/drive/folders/0B9DmF5P2DykTUzJPd2NYYnhFUDQ?resourcekey=0-1We2On5MtfBv4R5Nbdcqug" alt=""><br /><area shape="rect" coords="15,874,167,1080" href="https://keyliner.blogspot.com/2023/11/is-cheap-celeron-pc-good-enough-for.html" alt=""><br /><area shape="rect" coords="172,876,322,1080" href="https://www.amazon.com/Adventures-WordPerfect-Writing-Books/dp/B0CRZD2QPR" alt=""><br /></map><br /><br /></body><br /></html></span></span><br /><br /><br /></span>Related articles:<br />Ad-blocking with a Pi-Hole<br /><a href="https://keyliner.blogspot.com/2018/01/network-wide-blocking-of-ads-tracking.html" target="_blank">https://keyliner.blogspot.com/2018/01/network-wide-blocking-of-ads-tracking.html</a></p><p></p><p></p><p></p><p></p><p></p><p></p><p>DeviceID - Inventory tag showing current IP and external IP. This is a keyliner-developed program and is free for download. Write this program yourself using my book, "<a href="https://www.amazon.com/dp/B09QZW6RML?binding=kindle_edition" target="_blank">War and Peace Programming</a>" - Amazon.<br /><br /><a href="https://keyliner.blogspot.com/2022/06/device-id-asset-tag-management.html" target="_blank">https://keyliner.blogspot.com/2022/06/device-id-asset-tag-management.html</a><br /><br />-end</p></div>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-85845119302717549652023-09-05T02:16:00.003+01:002023-11-20T03:17:33.686+00:00Problem - Graphics not displaying on Apache Webpage<p>Problem - Graphics not displaying on Apache Webpage<br />Problem - Graphics not resolving on web page<br />Problem - Images not displaying on page<br /><br /><u>Symptoms</u>:<br /><br />When the page is opened locally on Windows, all works properly.<br />But once uploaded to the server, graphics show as text or as 'images not found.' <br />html code <img src="filename"> tags look good and work locally<br />Graphics can be in the root folder or in a subfolder<br /><br />Assumes this is a Linux webserver, running Apache2<br />My system happens to be a <a href="https://keyliner.blogspot.com/2023/09/install-raspberry-pi-webserver-step-by.html" target="_blank">Raspberry Pi</a>.<br /><br /><u>Solution - Use relative paths</u>:<br /><br />This is not a rights problem, especially if the html and graphics are loaded in /var/www/html (a standard, default folder for webpages).<br /><br />I stored my images in a subfolder. "indeximagesfolder". <br />If using a subfolder, the html tags must use a relative path. Do not use a leading slash, do not use a fully-qualified path (such as /var/www/html/indeximagefolder/filename.ext<br /><br />example, showing a subfolder, with no leading slash, and no fully-qualified path. This is a proper relative path:<br /><span style="font-family: courier;"><img src="indeximagesfolder/keylinertopbanner-810.png"></span><br /><br />If your images are in the root folder, the same folder as index.html:<br /><span style="font-family: courier;">img src="keylinertopbanner-810.png"</span></p><p><br /><u>Solution - Case-sensitive file names</u>:<br /><br />It took two days to figure out the real problem. On Linux servers, filenames are case-sensitive, both in the html code and in the actual filename. With Linux, most use lower-case filenames but on Windows, the original filename is typically mixed case.</p><p><span style="font-family: courier;"><img src="<span style="background-color: #fcff01;">I</span>ndex<span style="background-color: #fcff01;">I</span>mages/keyliner<span style="background-color: #fcff01;">T</span>op<span style="background-color: #fcff01;">B</span>anner-810.png"></span> is not the same as<br /><span style="font-family: courier;"><img src="indeximages/keylinertopbanner-810.png"></span><br /><br />Make the Windows filenames all lowercased. Windows will not rename a file if you change nothing but the case (if you try, it ignores the rename, thinking the file's name didn't really change). Instead, rename the file with a dummy character "xindeximages/keyliner.....", press Enter, then rename a second time with the desired casing. <br /><br />Confirm the html code is the same case, including folder names.<br />Then re-load to the server.<br /><br />Other keyliner articles:<br />Build a personal webserver and save hosting fees.<br /><a href="https://keyliner.blogspot.com/2023/09/install-raspberry-pi-webserver-step-by.html">https://keyliner.blogspot.com/2023/09/install-raspberry-pi-webserver-step-by.html</a><br /><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-29018913414101170302023-09-02T04:04:00.003+01:002023-11-20T03:19:22.835+00:00Procedure - Apache2 redirect www and http:// to https://<p>Procedure - Apache2 Redirect www and http:// to https://<br />Procedure - Forward www traffic to https <br />Procedure - Forward http traffic to https<br /><br /><u>Issue</u>:<br />When browsing to a site using "www" or "http", the site stays on http (port 80), even though the site has an ssl certificate applied and https (port 443) is active.<br /><br />You want the website traffic to auto-forward, redirect to https: (encrypted).<br /></p><p></p><p></p><p></p><p></p><p><u>Assumptions</u>:<br />* The SSL Certificate is applied and functioning.<br />* https://<site>.com works properly</p><p><b>This article was written and tested on</b><br />Raspberry Pi OS (2023)<br />Server Build 2023-04-02<br />Apache2 Version 2.4.56 (Raspbian)<br /><br />(Confirm Apache version: Use terminal command: <span style="font-family: courier;">Apache2 -v</span> )<br /><i>See bottom of this file for other operating systems, other versions.</i><br /><br /><u>Solution</u>:<br />Edit existing file: <span style="font-family: courier;">/etc/apache2/sites-enabled/000-default.conf</span><br />using these steps:<br /><br />a. Using FileZilla (or other ftp client), drag /etc/apache2/sites-enabled/000-default.conf
to a temp location on your C: drive. <br /><br />b. Use Notepad to edit the file,
making these highlighted changes. <br />Replace "keyliner.com" with your domain's address.<br />Add a new <VirtualHost *:443> section.<br /><br /><span style="font-family: courier; font-size: x-small;"><VirtualHost *:80><br /> # The ServerName directive sets the request scheme, hostname and<br /> # port that the server uses to identify itself. <br /><br /> ServerAdmin webmaster@localhost<br /> DocumentRoot /var/www/html<br /> <b><span style="background-color: #fcff01;">ServerName keyliner.com<br /></span> <span style="background-color: #fcff01;">ServerAlias www.keyliner.com</span><br /> <span style="background-color: #ffa400;">Redirect permanent / https://keyliner.com/</span></b><br /><br /> ErrorLog ${APACHE_LOG_DIR}/error.log<br /> CustomLog ${APACHE_LOG_DIR}/access.log combined<br /><br /> RewriteEngine on<br /> RewriteCond %{SERVER_NAME} = <span style="background-color: #fcff01;">keyliner.com</span><br /> RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]<br /></VirtualHost><br /><span style="background-color: #fcff01;"><b><br /><VirtualHost *:443><br /> ServerName keyliner.com<br /> ServerAlias www.keyliner.com<br /><br /> Protocols h2 http/1.1<br /><br /> <If "%{HTTP_HOST} == 'www.keyliner.com'"><br /> Redirect permanent / https://keyliner.com/<br /> </If><br /><br /> # SSL Configuration<br /><br /> # Other Apache Configuration<br /><br /></VirtualHost></b></span><br /><br /># vim: syntax=apache ts=4 sw=4 sts=4 sr noet</span><span style="font-size: x-small;"><br /></span><br />c. Use FileZilla and replace the server's version with the new edits.</p><p><br /><u>Other Linux, Other Apache Versions</u><br /><br /><i>This was a wild-goose chase to figure this article out. Hopefully, these hints are helpful for those of you using different software than I.</i><br /><br /><b>.htaccess</b><br />Old versions of Apache used this file: <br /><span style="font-family: courier;">/opt/bitnami/APPNAME/.htaccess</span><br /><span style="font-family: courier;"><br /># Redirect only a specific domain:<br />RewriteEngine On<br />RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]<br />RewriteCond %{SERVER_PORT} 80<br />RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]</span><br /></p><p>This is *not* recommended. <br />It introduces overhead to all webpage loads and is not frowned on in all cases. However, many current articles still point this direction.<br /><br /><br /><b>httpd.conf</b><br />Apparently some versions of Apache / or other versions of Linux recommend using an httpd.conf file. Be aware this file does not exist, and is not used by the new Raspberry Pi OS.<br /><br />Debian (older?), and Ubuntu<br />File: <span style="font-family: courier;">/etc/apache2/sites-available/httpd.conf</span><br /><br />RedHat, Fedora, and CentOS<br />File: <span style="font-family: courier;">/etc/httpd/conf.d</span><br /></p><p>For each, use the same file as the 000-default.conf, shown above, including the<br /> <span style="font-family: courier; font-size: x-small;"><b><span style="background-color: #ffa400;">Redirect permanent / https://keyliner.com/<br />And the <VirtualHost *:443> section<br /></span></b></span></p><p>Another article said "Ubunto does not use httpd.conf, instead, use apache2.conf" - keyliner was not able to confirm this.<br /><br /><br />References:<br /><i>See this keyliner article for how I build a new webserver from scratch.<br /><br /> The article includes how to install the OS, Install Apache, punch holes through your firewall, how to get and apply an ssl cert, and how to tell your Domain Provider about your new site. Step-by-step instructions.<br /><br /></i><a href="https://keyliner.blogspot.com/2023/09/install-raspberry-pi-webserver-step-by.html" target="_blank">https://keyliner.blogspot.com/2023/09/install-raspberry-pi-webserver-step-by.html</a> )</p><p><i></i></p><p><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-26474833537985500242023-08-30T14:15:00.010+01:002023-11-20T03:22:15.631+00:00VNCViewer Timed out waiting for a response<p>Problem - VNC Viewer Timed Out waiting for a response from the host computer<br />Problem - VNCViewer client not responding</p><p>Windows 11 client, and a Raspberry Pi.<br /><br />Article under construction. Here are my notes.<br />An imperfect solution is listed below.<br />Consideration #3 has helped a lot of people, but was not a solution for my problem.<br /></p><p><b><u>Symptoms</u>: </b> <br />Desktop computer attempting to reach a VNC Server (in my case a Raspberry PI, acting as a server) gets ~ error<br /><br />VNC Viewer 'worked before' or has worked "occasionally", or works one-time.<br /><br />The host computer (the server) is operational and VNC is installed properly<br />The server is ping-able<br />VNC services are running<br /><br />Waking the host-server (from sleep) did not solve the problem<br />Some sites recommended plugging in a monitor, keyboard, and mouse; nope; did not help<br /><br /><b><u>Diagnostics</u>:</b><br /><br />Confirm the service is running on the server:<br />From a remote SSH desktop connection (Putty.exe), run this console command:<br /><br /><span style="font-family: courier;">sudo systemctl status vncserver-x11-serviced.service<br /></span><span style="font-family: inherit;">(then ctrl-C to cancel/close the command)<br /></span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Eifxc8VzYDgtXsxwNJfxPNbL4xcyqAprEag046RgI3zsundM-hBKtfKHYTr6EdyNQX8NU-_DPfgnAXXfLF_i6WwJ9HGyfhrr1acr_tT-jkY9q-VlsO43hi_ozUiXBYIHxszxaDHRfnEVOge9nSehVmV38lvwdtKtsV8qOx1bcvktEjbZOlN_GfIW_9rd/s661/2023_08_VNCViewer-ServiceRunning.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="420" data-original-width="661" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Eifxc8VzYDgtXsxwNJfxPNbL4xcyqAprEag046RgI3zsundM-hBKtfKHYTr6EdyNQX8NU-_DPfgnAXXfLF_i6WwJ9HGyfhrr1acr_tT-jkY9q-VlsO43hi_ozUiXBYIHxszxaDHRfnEVOge9nSehVmV38lvwdtKtsV8qOx1bcvktEjbZOlN_GfIW_9rd/s320/2023_08_VNCViewer-ServiceRunning.png" width="320" /></a></div><br /><p><br />Look for:<br />"Active (running) since <date>" (green)<br />"<i>Started VNC Server in Service Mode daemon</i>" and<br /> "<i>ServerManager: Server started.</i>"<br /><br />* You may see: "<i>ConsoleDisplay: Cannot find a running X server on vtl</i>"<br />Other web articles suggest VNC will not operate without a monitor plugged-in and active. Nonsense. Many Raspberry pi's are "headless" -- without a monitor or keyboard. Adding a monitor, keyboard, and mouse is not the solution to this problem. This idea can be ignored.<br /></p><p style="margin-left: 40px; text-align: left;"><span style="color: #666666;">Assuming VNC was installed properly; services started, IP Address
ping-able, and all that nonsense, it can't be a problem with the server
or with the VNC Server Services not running. It can't be a problem with
ports, firewall rules, or other configuration -- after all, it worked
before</span>...<br /><br /></p><p></p><p></p><p><b><u>Poor Solution</u>:</b><br /><br />This is a less-than perfect solution.<br /><br />1. From the Windows VNC Viewer Client, delete the Connection icon to your server<br /> (e.g. "keyliner.local") <i>-- this is the connection that worked before, but does not now</i>.<br /><br />2. Rebuild the connection from scratch.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBV8RMiszHscXqe_J_0a9dXpicyIWBmmmHzsnnoc73uW70_Efp-W2ciagIayUizjd6vBZpc16Y6rI8_igDaR4W4OtDi2sXkPdy2GjyLBQ-QPO580ik8DHPL_7Hw0wQc8JHeir-KXjiWj1YNmn0-Rg9X0TevMBardom21FQ1AdPJKPw2GOcmqeEsdJdA1H3/s714/2023_09_WebServerRVNCLogin.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="484" data-original-width="714" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBV8RMiszHscXqe_J_0a9dXpicyIWBmmmHzsnnoc73uW70_Efp-W2ciagIayUizjd6vBZpc16Y6rI8_igDaR4W4OtDi2sXkPdy2GjyLBQ-QPO580ik8DHPL_7Hw0wQc8JHeir-KXjiWj1YNmn0-Rg9X0TevMBardom21FQ1AdPJKPw2GOcmqeEsdJdA1H3/s320/2023_09_WebServerRVNCLogin.png" width="320" /></a></div><p><br />This is asinine and indicates a possible problem in C:\Users\<you>\appdata\local\RealVNC folder<br /><br />But after hours and hours of research, a proper solution was not found.<br /><b><u></u></b><br /><br /><b><u>Considerations</u>:</b><br /><br />1. Be sure to upgrade VNC and other services on the Server's desktop:<br /><br />Even a new install, with a new distro, VNC needs to be updated. From a terminal/console command window (putty.exe), or from the Raspberry pi's Terminal (console), <br /><br />type <span style="font-family: courier;">sudo apt update</span><br />type <span style="font-family: courier;">sudo apt upgrade</span><br /></p><p>(I noted the VNC service was updated during this patch cycle)<br /><br />2. Some articles recommend forcing a manual screen resolution<br /><br />From a terminal/console command window (putty.exe), or from the Raspberry pi's Terminal (console), <br />type <span style="font-family: courier;">sudo raspi-config</span><br />Select "Display Options"<br />Set "D5 VNC Resolution" to a fixed setting, such as 1280x1024<span> -- anything smaller than your Windows client's native desktop size.<br /><br />This does not fix this immediate problem, contrary to other web articles. However, setting a predictable resolution seems a good idea.</span><br /></p><p><br />3. Many have reported a bug in the Raspberry PI operating system, where a "headless" pi (one without a keyboard/mouse) does not generate a 'cached random-number pool' of some type. <span style="background-color: white;">(<span>However, my pi has a keyboard and mouse installed (at least temporarily) and this did not help. I discounted this idea.</span>)</span> <br /><br />To solve this random-number problem, some sites suggest installing a program called "haveged". Reportedly, this fixed VNC for many users, but it did not resolve the issue for me. Regardless, here are the full details and credit in this article:<br /><a href="https://forums.raspberrypi.com//viewtopic.php?f=28&t=230779&p=1413648#p1413648">https://forums.raspberrypi.com//viewtopic.php?f=28&t=230779&p=1413648#p1413648</a><br /><br />Not-recommended steps:<br /><span style="font-family: courier;">sudo apt-get install haveged<br />sudo update-rc.d haveged defaults</span><br /><br />(to uninstall):<br /><span style="font-family: courier;">sudo apt remove haveged</span>, <br />followed by <span style="font-family: courier;">sudo apt-get --purge remove haveged</span> )<br /></p><p><br /><b><u>Bad-to-Worse Solution</u>:</b></p><p>Start a new VNC session: <br /><br />This is not necessarily a good idea, but will work (one) time per boot -- starting a second
virtual desktop on the server -- a second copy, separate from the
already-running service. This seems a poor solution. In any case, from the terminal/console window, type this command, launching a second VM (desktop)<br /><br /><span style="font-family: courier;">vncserver</span><br /><br />Test
by launching the client's copy of VNC and make the VNC connection.
This should should work, but once you disconnect the client's VNC, you will not be able to make a second connection without
rebooting the pi server. Spinning-up a second instance of a VNC server masks the underlying problem.<br /><b><u><br /><br /></u></b>Other notes<b><u><br /><br />Installation</u></b><br /><br /><b>Starting and confirming the VNC Service on the Raspberry pi server:</b><br />Assuming VNC was not started or installed on your raspberry pi server, and assuming SSH was installed...<br /><br />a. Using Putty.exe on a Windows box (remote console)<br /> (Download from: <a href="https://www.putty.org">https://www.putty.org</a>)<br /><br /> Launch and connect to your server, from the local network (e.g. my server: "keyliner.local")<br /> Login as admini<br /> and the SSH password: <br /> <br />b. Type this command: <span style="font-family: courier;">sudo raspi-config</span><br /><br />c. Select menu choice "Interfacing Options"<br /> Select menu choice I3: "VNC" Enable/disable; enable the service.<br /><br />d. The Windows VNC Viewer (client) can be launched in either a local,
non-logged-in mode (recommended) or with a "cloud" (internet) account.
Both exhibit the same problem and I see little reason to build the
RealVNC "cloud" account.<br /><br />I have recommended bypassing the cloud login:<br /><br />On your (Windows) workstation, download and install a VNC Viewer client.<br /> Download: <a href="https://www.realvnc.com/en/connect/download/viewer/">https://www.realvnc.com/en/connect/download/viewer/</a><br /> Select Standalone EXE x64 Installer<br /><br /> On startup, note the link: "<span style="background-color: #fcff01;"><u>Use RealVNC Viewer without signing in</u></span>"<br /> (assuming a local network, not over the Internet)<br /><br /> Connect to your server's name: e.g. "keyliner.local"<br /><br /><br /><b>In Case Needed: To Start the VNC Service:</b><br /><br />As an alternative to <span style="font-family: courier;">raspi-config</span>, from the remote console:<br /><br />a. <span style="font-family: courier;">sudo systemctl start vncserver-x11-serviced.service</span><br /> (where x11 is x-one-one. There is no console response to this command)<br /></p><p>To Enable VNC Service at next boot, and for every boot:<br />a. <span style="font-family: courier;">sudo systemctl enable vncserver-x11-serviced.service</span><br /><br /><br />Resources:<br />Article on everything about VNC on Raspberry pi:<br /><a href="https://help.realvnc.com/hc/en-us/articles/360002249917-VNC-Connect-and-Raspberry-Pi#creating-and-remoting-a-virtual-desktop-0-8">https://help.realvnc.com/hc/en-us/articles/360002249917-VNC-Connect-and-Raspberry-Pi#creating-and-remoting-a-virtual-desktop-0-8</a><br /></p><p>-end</p><p><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-33554537078380503972023-08-21T12:54:00.020+01:002023-10-25T14:32:40.388+01:00Device ID Asset Tag Management<p>DeviceID is a computer-tagging program that shows the machine's current IP Address, device name, user, and network status. In the background, an inventory is written to a local report and optionally to a server, which the helpdesk will appreciate. The program sits unobtrusively in the upper-right corner and periodically checks network conditions. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib6x80EchiPEVtVMopDT9RgIupk1Kg87WbrMVrU-l07fPP97GztKa975jp4V5FSon30sAQxlmVH3JmZYpnYEJYXM4MDr-hiAm_BHK9V0PoiveuuAn3Fya6Pvs-Zsr94Eoeb2Hvlh1OD7UytvZtmmS6wwAalrfnQpvmmozt-Ro-qXsV4D0xyLM60ocS-A/s806/001_DeviceIDOnMonitorLarge.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="502" data-original-width="806" height="249" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib6x80EchiPEVtVMopDT9RgIupk1Kg87WbrMVrU-l07fPP97GztKa975jp4V5FSon30sAQxlmVH3JmZYpnYEJYXM4MDr-hiAm_BHK9V0PoiveuuAn3Fya6Pvs-Zsr94Eoeb2Hvlh1OD7UytvZtmmS6wwAalrfnQpvmmozt-Ro-qXsV4D0xyLM60ocS-A/w400-h249/001_DeviceIDOnMonitorLarge.png" width="400" /></a></div><br /><p>Network status checks both internal and external IP addresses, confirming the machine can see the Internet. Settings are adjustable and every object on this small panel is double-clickable, giving different reports, different features. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIx3A1VHOoxDNbMFPx13mmqKQD-kj5HPVVpTnYg75sHjAsNtfK3Lxt4PeUaspOXVYi2mvb_NTU2aes5W-0N8vwuFBgD06WZzcevsmIU_cktE35sZ8tclK04nXBwO5syWrDJkeT_8AcRt8B4exTp7f9Bp5aV_jpr-Zqsqq_Ul14i-0Nra0n9NCcGsXP5w/s1000/002_DeviceID_Illustrated.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="356" data-original-width="1000" height="229" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIx3A1VHOoxDNbMFPx13mmqKQD-kj5HPVVpTnYg75sHjAsNtfK3Lxt4PeUaspOXVYi2mvb_NTU2aes5W-0N8vwuFBgD06WZzcevsmIU_cktE35sZ8tclK04nXBwO5syWrDJkeT_8AcRt8B4exTp7f9Bp5aV_jpr-Zqsqq_Ul14i-0Nra0n9NCcGsXP5w/w640-h229/002_DeviceID_Illustrated.png" width="640" /></a></div><p>Behind the scenes, DeviceID tracks an inventory of the hardware, free-disk space, OS
settings, recent logins, and other interesting goodies. If the report is allowed to live on a central
server/share, the helpdesk can view
activity, even if the user's machine is offline. Inventory is tracked
through simple ASCII files; no database required.<br /><br />Free to download and use for all personal, commercial, and governmental use. <br />* No registration<br />* No nagware<br />* No spying <br />* DeviceID does not call back to the mothership<br /><br /></p><p style="margin-left: 120px; text-align: left;"></p><p></p><p><span style="font-size: large;"><b>Features:</b></span><br /></p><ul style="text-align: left;"><li>Network status is periodically tested against internal (company) and external (Google) sites. Red-green, yellow flags show the current status.<br /><br /></li><li>An inventory report shows the OS version, free-disk, memory, installed printers, CPU, the last 10 logins, etc..<span style="background-color: white;"><br /><br /></span></li><li>Reminds users to reboot every (x) days. Configurable from a central location. <br /><br /></li><li>From a central server, the program can optionally run scheduled tasks, installation, and other routines. <br /><div style="margin-left: 120px;">This is not meant to replace a full-featured software installation server, but could be handy for a smaller business.<br /></div><br /></li><li>From a central server, emergency messages can be sent. Alerts, such as "Database maintenance today at noon." <br /></li></ul><p><span style="font-weight: bold;">
</span></p><p><span style="font-weight: bold;"></span></p><p style="margin-left: 160px; text-align: left;"><span style="background-color: white;"><span>Although
this is a long article, and it seems complicated, it really only takes a
minute to set up. The advanced features can be ignored. </span></span>Although designed for small to medium-sized businesses, the program is
useful on standalone machines. I run this program on my home
network, mainly for IP and network status.<span style="background-color: white;"><span> <br /><br /></span></span></p><p><span style="font-weight: bold;"><span style="font-size: 180%;">Downloading and Installing:</span></span>
<br />
</p><div style="margin-left: 40px; text-align: left;">Here are the fast installation instructions where the program can be run directly from the Downloads directory. It needs a minor installation step. </div><div style="margin-left: 40px; text-align: left;"> </div><div style="margin-left: 40px; text-align: left;">To install, download the .exe and place in any temp folder on
your hard disk. <br /><br /></div><div style="margin-left: 40px; text-align: left;"> </div><div style="text-align: left;"><b>A. Download Link</b>:<br /></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">From Keyliner's public GDrive, click this link and download to a local temp or download directory. <b><i>Do not download directly into ProgramFiles</i>.</b> <br /></p></div><div style="margin-left: 40px; text-align: left;"><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s45/DownloadIcon_Small.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="45" data-original-width="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s0/DownloadIcon_Small.png" /></a></div><p>Download Link: Version 1.30 (New, 2023.10)<br />File Link: <a href="https://drive.google.com/file/d/15Zm2oH5SYqUZ4kbevsp3_gT2KUZw0eyJ/view?usp=sharing">DeviceID.exe</a> - contains standalone .exe.<br /><br /></p><div class="separator" style="clear: both; text-align: center;">
</div><p>
</p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">deviceID.exe MD5 check:<i><br /></i></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;"><i><span style="font-family: courier;">a5-d6-6b-f7-37-97-30-68-a4-1f-34-17-f6-25-24-c3</span><br /></i></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">SHA-256:<br /><span style="font-size: x-small;">d93b32d976492870ab99559b2378c3e11fc21c3f6295b3e1409eac68d7bd1d50</span><br /><br />When downloading, different browsers behave differently. <br />You will be prompted the file cannot be scanned. Click "Download anyway"<br /></p></div><div style="margin-left: 40px; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s498/2021-05-DirectoryPulseCantScan.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="123" data-original-width="498" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s320/2021-05-DirectoryPulseCantScan.png" width="320" /></a></div></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">Microsoft Edge:<br />Prompts "DeviceID.exe" was blocked because it could harm your device (it is an .exe from the Internet). <br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">"Click See More" and allow the download. <br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">With Microsoft Edge, the downloaded file appears in your Downloads directory with a random name, such as "<span style="background-color: #04ff00;">Unconfirmed 780359.crdownloaded</span>" (name varies). Use File Explorer to <b>rename</b> the file to "DeviceID.exe".<br /><br /></p></div><div style="text-align: left;"><p style="text-align: left;"><b>B. Mark the program as safe-to-run</b>:<br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;"><i>(This step may not be needed if downloaded by Edge and you clicked "More / Download Anyway")</i><br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">Using File Explorer, right-mouse-click the downloaded (and re-named) .exe <br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">Select "Properties"<br />Check [x] Unblock. <i>This removes the "mark of the web."</i> </p></div><div style="margin-left: 40px; text-align: left;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s615/2021-05-DirectoryPulseMarkOfWeb.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="615" data-original-width="604" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s320/2021-05-DirectoryPulseMarkOfWeb.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"> Click for larger view<br /></td></tr></tbody></table></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">* Only do this if you trust
keyliner *and* only if downloaded from keyliner's public GDrive. <br /></p></div><div style="margin-left: 40px; text-align: left;"><p style="text-align: left;">If
"Unblock" is not visible, it has already been unlocked (by Microsoft
Edge). <br />Once [x] Unblocked is clicked, this security menu disappears. <br /><br /></p></div><div style="text-align: left;"><b>C. For a first-time run, launch with a setup switch</b><br /></div><div style="margin-left: 40px; text-align: left;">Click "Start" and immediately type the word "Run" (enter). A dialog opens.<br /><br />From the Run box, use File Explorer to click and drag the downloaded "deviceID.exe" program into the run box (illustrated below). Append a "<span style="font-family: courier;">/setup</span>" switch and allow the program to run: <b> <br /></b><b>DeviceID.exe /setup</b><b> <br /></b></div><div style="margin-left: 40px; text-align: left;"><b><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNQc2aQOcSafirfz_RwqK8xv6vD0Q835Namc8HAGlKiWiKNqbk2kFjnueIgRyMHPX1HJSI7P6iToQ7rkJ0CHeUpbv_9bxO4eK7Zw0g2Rn0RAr7R0N50Dk452F-fM1Skn2xNMMm9QPXJWreV_dDXwcp-gylhzx3dS0V3E104xCbJtM80CJOpRBoCWYDNPQ3/s405/2022-00-DeviceIDRun.png" style="margin-left: 1em; margin-right: 1em;"><br /></a><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq4pdc6cVRzHrnaBrDUEZNHA7WUwB4kZc7ZaJbKm_6O-rFgdycTB-DJl6_HU7egbCc8wntlxV3zOEOiw48oD9m-h1ht548VWE_7m9tLEpYChwXmhBNZcum1mh1TvbiBbVm6czN2qc5c89Sl0MwbHivHoHG1UiEMsrcZ4ZlDMIwcDDMiSIvW9heLvmREA/s428/DeviceIDSetupRun.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="229" data-original-width="428" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq4pdc6cVRzHrnaBrDUEZNHA7WUwB4kZc7ZaJbKm_6O-rFgdycTB-DJl6_HU7egbCc8wntlxV3zOEOiw48oD9m-h1ht548VWE_7m9tLEpYChwXmhBNZcum1mh1TvbiBbVm6czN2qc5c89Sl0MwbHivHoHG1UiEMsrcZ4ZlDMIwcDDMiSIvW9heLvmREA/s320/DeviceIDSetupRun.png" width="320" /></a></div></div><br /></b></div><div style="margin-left: 40px; text-align: left;"></div><div style="margin-left: 40px; text-align: left;"></div><div style="margin-left: 40px; text-align: left;"><div style="margin-left: 40px; text-align: left;">Since keyliner cannot afford a signing certificate,
you will be prompted that the file is not safe (being downloaded from
the internet). Click "more information" and allow the program to run.<br /><br /></div>Choose "[x] Server simulation"<br />Click "ok"<br /><br /><i>This writes two INI control files to the same directory. For the initial test, they can be ignored. Details below</i>.<br /><br /><br /></div><div style="text-align: left;"><b>D. From the same directory, re-launch DeviceID.exe (without the /setup switch)</b><br /><div style="margin-left: 40px; text-align: left;">The program should be running.<br />See panel in the upper-right corner of the primary monitor.<br /></div></div><div style="margin-left: 40px; text-align: left;"> <br /><br /></div><div style="text-align: left;">Details:<br />/setup builds two .ini files, both stored in the local directory. <br />The
default settings will run as-is, which is good enough for initial
testing: <br /></div><div style="margin-left: 40px; text-align: left;"><br />C:\downloads\DeviceID<u>Local</u>.ini (where the .exe was stored)<br />C:\downloads\DeviceID<u>Server</u>.ini <br /><br /><br /></div><div style="text-align: left;"><i>Using Notepad, you can edit the ini files to see what they are up-to. <br /></i></div><div style="margin-left: 40px; text-align: left;"><i><br />The <b>local</b> ini points to the server file and to an optional user-specific 'reminders' file (a calendar). The
<b>Server</b> ini describes shared network resources, messages, etc, and is intended to live on a shared, centralized server. The server file contains global settings, a place to put messages, and other settings. </i><br /><br /><br /></div><span style="font-size: large;"><u>For a more professional installation</u>:</span><div style="text-align: left;"><br />To install the program 'more properly,' follow these slightly more advanced steps. Use these steps for a more formal installation.<br /></div><div style="margin-left: 40px; text-align: left;"><br /></div><span style="font-size: medium;"><b>Setup</b></span><p><b>1. Server Share Setup<br /><br /></b>If using a central server (typical for a business, but not for a home user), make a
dedicated server folder, typically a server share (It helps
to pre-build these directories, but DeviceID will attempt to create
them, provided your account has rights). If not using a server, select option [x] ServerSimulation.<br /><br />For example:<br /></p><p style="margin-left: 40px; text-align: left;">P:\Software\Util\DeviceID\wsConfig //A server share<br /> (use any path - system .ini files live here)<br /><br />P:\Software\Util\DeviceID\wsInventory <br /> (workstation inventory reports live here)<br /></p><p>Set end-user rights: <br />If using [x] ServerSimulation, ignore this step.<b><br /></b>Set all users to "Read-only" rights to the top-level "util\DeviceID" folder, cascading down. <br />Set all users to "Change" rights at the wsInventory. <br /><b><br /><br />2. Complete the initial download, described above. <br /></b></p><p style="margin-left: 40px; text-align: left;">Place the .exe in a temporary working folder (download folder is fine)<br /></p><p><b>3. From the download directory, temporarily, launch the program using the /setup switch</b><br /><br />a. Click Start, type the word "Run". Launch the Windows "Run" app.<br />b. In the small Run box, use File Explorer and drag "DeviceID.exe" into the box. (Or browse)<br />c. In the RUN dialog, after the .exe, type {space} <b><span style="font-family: courier;">/setup</span></b><br />d. Click OK and allow it to run<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq4pdc6cVRzHrnaBrDUEZNHA7WUwB4kZc7ZaJbKm_6O-rFgdycTB-DJl6_HU7egbCc8wntlxV3zOEOiw48oD9m-h1ht548VWE_7m9tLEpYChwXmhBNZcum1mh1TvbiBbVm6czN2qc5c89Sl0MwbHivHoHG1UiEMsrcZ4ZlDMIwcDDMiSIvW9heLvmREA/s428/DeviceIDSetupRun.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="229" data-original-width="428" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq4pdc6cVRzHrnaBrDUEZNHA7WUwB4kZc7ZaJbKm_6O-rFgdycTB-DJl6_HU7egbCc8wntlxV3zOEOiw48oD9m-h1ht548VWE_7m9tLEpYChwXmhBNZcum1mh1TvbiBbVm6czN2qc5c89Sl0MwbHivHoHG1UiEMsrcZ4ZlDMIwcDDMiSIvW9heLvmREA/s320/DeviceIDSetupRun.png" width="320" /></a></div><p></p><p></p><p><b>4. Build Default Settings and Folders</b></p><p>From the Setup panel, which opens after typing /setup:<br />Browse to a server folder (P:\software\util\DeviceID) where the Inventory and ServerConfig files can roost - this is typically a server share. <br /></p><p>From the setup screen:<br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEDLI6YhFZMFQYVkwmwF-lW7gLBnL6EU7rIfXK1j1xzNgjWepcxVn4VtSfpSDaDJShQ0nOWtcriDH9cDS4RdLvnfGZumZeUjd0DaC44qu4B1_9YtXSBJg5vtPNsRLSzAE0v-4PV5sDn22Wei7695_YUULlSiC84LHU5My1x8Ubt7q9OO2T-Dm9oN53tw/s760/SetupDirectoryBuild.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="321" data-original-width="760" height="169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEDLI6YhFZMFQYVkwmwF-lW7gLBnL6EU7rIfXK1j1xzNgjWepcxVn4VtSfpSDaDJShQ0nOWtcriDH9cDS4RdLvnfGZumZeUjd0DaC44qu4B1_9YtXSBJg5vtPNsRLSzAE0v-4PV5sDn22Wei7695_YUULlSiC84LHU5My1x8Ubt7q9OO2T-Dm9oN53tw/w400-h169/SetupDirectoryBuild.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger size<br /></td></tr></tbody></table><p>Ideally, this folder should be pre-built. If not, DeviceID attempts to create the directories, provided your account has rights. If you don't have rights, it will still record that path in the ini-control files, assuming you will fix the missing path later.<br /> <br />If testing on a stand-alone workstation, or if testing without using a server, check <span style="background-color: #ffa400;"><br />[ ] SeverSimulation</span> (recommended if you just want to play with the program and not make a commitment -- see C:\Temp\ServerSimulation\DeviceID). <br /></p>Click button "<span style="background-color: #04ff00;">Build ini Files</span>"<br /><p><b><br />5. Results</b><br /><br /><u>New Directories</u>:<br /><br />a. C:\Users\(you)\prefs\DeviceID for workstation and user-specific data<br />b. C:\temp\ServerSimulation\DeviceID<br />c. C:\Temp\ServerSimulation\DeviceID\WSConfig (all users have READ only rights)<br />d. C:\Temp\ServerSimulation\DeviceID\WSInventory (all users need Create/overwrite rights)</p><p><u>New INI files are built</u>:<br /><br />File and folder schematic:<br /></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhtunMpImFwWIrgJ9nmH2tuAVNmbl0YK9f_CPm8vMdzeC8WjF1Qtppi-OqoBJCaa3WEgNLknvSdXTk8s06gYOGahCKSCdEPebT35dteeWO9G1GbP4I15maRTVdVWA5qCUfZvpdTmb279FMpGFKljUmvu3_e5fEd8dPxAwK30cy58Sh54alu5bzUnCXlfLL/s810/FileSchematics.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="439" data-original-width="810" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhtunMpImFwWIrgJ9nmH2tuAVNmbl0YK9f_CPm8vMdzeC8WjF1Qtppi-OqoBJCaa3WEgNLknvSdXTk8s06gYOGahCKSCdEPebT35dteeWO9G1GbP4I15maRTVdVWA5qCUfZvpdTmb279FMpGFKljUmvu3_e5fEd8dPxAwK30cy58Sh54alu5bzUnCXlfLL/w400-h216/FileSchematics.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><p><b>DeviceIDLocal.ini</b><br /><br />Distribute the .exe and this INI file to any workstation. <br />Typically copied to C:\program files\Util or location of your choosing, placing both files in the same directory. For testing, these can be in the TEMP folder.<br />The .INI contains a pointer to the server's config file.<br /><br />(<i>End-users are not expected to have rights to edit the INI file and this is why ProgramFiles is a good choice.</i>)</p><p><b>DeviceIDServer.INI</b><br /></p><p style="margin-left: 40px; text-align: left;">(This second INI file is a server file. For testing, it can also be in the TEMP\ServerSimulation folder) <br /><br />The first INI file (DeviceIDLocal) tells the workstation where to find the server's INI file. The server INI file contains all the settings you want the workstations to share. Plus other server-administration settings, such as global messages, etc.<br /></p><p>Both INI files are editable with notepad and you are invited to explore. <br /></p><p>Next, position the program and icon as-if it were in production. (This is a continuation of the "more professional install steps)<br /><br /><br /><b>5. Create a Program folder to hold the program</b>:</p><p></p><p>For the local user, end-user workstation:<br /><br />a. With File Explorer, open folder C:\Program Files, <br />b. Create a subfolder <span style="font-family: courier;">C:\Program Files\Util <span style="font-family: inherit;">(for example)<br /></span></span></p><p style="text-align: left;"></p><p></p><p>c. Copy the program file:<br /><br />Copy "DeviceID.exe" to C:\Program Files\util<br />Copy "DeviceIDLocal.ini" to C:\Program Files\util<br /></p><div style="margin-left: 160px; text-align: left;"><i>Do the copy as a <u>two-step</u>,
copying from the download folder into Program Files. Windows security
will not let you download directly into Program Files (technically, you
will not be able to remove the "mark of the web" if downloaded directly
into Program Files).</i></div><p style="margin-left: 160px; text-align: left;"><i>DeviceID<u>Local</u>.INI is purposely in C:\Program Files. Reason: Most end-users (should not) have administrative rights and won't be able to edit the file. This is by design. This forces their connection to the server-share.</i></p><p style="text-align: left;"><i></i></p><p></p><p></p><p></p><p><b>6. Position the Server Control file</b><br /><br />If using a server<br />Copy DeviceIDServer.ini to P:\software\util\DeviceID\wsConfig<br /><br />If not using a server ([x] ServerSimulation), leave the folders and files as-is in the C:\Temp folder.<br />(See DeviceIDLocal.ini for the location being used)<br /></p><p><br /><b>7. Optional: Create a Start Menu Tile</b>:<br /></p><p style="margin-left: 40px; text-align: left;">Using File Explorer, in C:\Program Files\util <br />Right-mouse-click the executable and "Pin to Start"<br /><br /><i>Auto-launch steps below</i>.</p><p><br /><b>8. Auto Launching:</b><br /></p><p></p><p></p><p></p><p>Allow DeviceID to auto-launch at boot. Place a shortcut in the workstation's "Startup" folder. Optionally, put the program in a login script (not recommended because the program will not run off-network; it is better to run at the workstation level): <br /></p><p>a. Using File Explorer, tunnel to <br />C:\Users\<you>\AppData\Roaming\Microsoft\Windows\StartMenu\Programs\Startup</p>b. In the Startup folder, right mouse click a blank area on the detail side, "create shortcut".<br />Set the path to C:\program files\util\DeviceID.exe<br /><br /><br /><p style="text-align: left;"></p><p></p><p></p><span style="font-size: large;"></span><p></p><p></p><p><span style="font-size: large;">Testing</span><br /><br />With setup complete, and assuming the ServerSimulation (or server directory), <br /><br />- Confirm DeviceIDLocal.ini is in the same directory as the .exe. <br />- Use File Explorer to double-click the .exe, which launches the program. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIx3A1VHOoxDNbMFPx13mmqKQD-kj5HPVVpTnYg75sHjAsNtfK3Lxt4PeUaspOXVYi2mvb_NTU2aes5W-0N8vwuFBgD06WZzcevsmIU_cktE35sZ8tclK04nXBwO5syWrDJkeT_8AcRt8B4exTp7f9Bp5aV_jpr-Zqsqq_Ul14i-0Nra0n9NCcGsXP5w/s1000/002_DeviceID_Illustrated.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="356" data-original-width="1000" height="229" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIx3A1VHOoxDNbMFPx13mmqKQD-kj5HPVVpTnYg75sHjAsNtfK3Lxt4PeUaspOXVYi2mvb_NTU2aes5W-0N8vwuFBgD06WZzcevsmIU_cktE35sZ8tclK04nXBwO5syWrDJkeT_8AcRt8B4exTp7f9Bp5aV_jpr-Zqsqq_Ul14i-0Nra0n9NCcGsXP5w/w640-h229/002_DeviceID_Illustrated.png" width="640" /></a></div><p>Expected results:</p><p style="margin-left: 40px; text-align: left;">a. Program loads in upper-right corner, Network Status = (green)<br /></p><p style="margin-left: 40px; text-align: left;">b. Folder C:\Users\<you>\Prefs\DeviceID has an inventory report. On my computer this is called "Oscar.txt", where Oscar is my workstation's Name.<br /></p><p style="margin-left: 40px; text-align: left;">c. Using FileExplorer, see folder C:\temp\ServerSimulation\DeviceID\WSInventory for the server version of this same inventory report. Useful for helpdesk research.<br /></p><p style="margin-left: 40px; text-align: left;">d. On the running program, double-click the workstation's name for small report.<br /></p><p style="margin-left: 40px; text-align: left;">e. On the running program, double-click the word "DeviceID" for full workstation report</p><p style="margin-left: 40px; text-align: left;">f. Optionally: On the running program, double-click your user-id. Allow it to build a reminder file, such as "Bob's birthday on 08/22". </p><p style="margin-left: 40px; text-align: left;">g. Hover mouse over IP Address to see the external-facing IP address. <br /></p><p><br /><span style="font-size: large;">Off Network Workstations</span><br /><br />If the workstation is off network (and it can't detect the Server.ini), the program disables all server-related activity. The local intranet test site temporarily changes to the nearest router, detected automatically (e.g. 192.168.1.1).<br /><br />The External Test Site temporarily defaults to www.google.com, in case your default pingable server was different (these preferences are on DeviceIDServer.ini). Colored status indicators continue to work.<br /><br />The local inventory is still written to C:\Users\<user>\prefs<br />The server inventory is skipped.<br /></p><br /><p>For Documentation: Generated INI files:<br /><br /><span style="font-size: large;">Example Local.ini </span><br /></p><p><span style="font-size: x-small;"><span style="font-family: courier;">(at each workstation)<br /><br />;DeviceID Local INI Control File<br />;Directs DeviceID to the ServerControlFile; must be in current DeviceID.exe directory<br />;Position-dependent file; do not change structure or line counts<br /><br />ServerControlFile = C:\temp\ServerSimulation\DeviceID\WSconfig<br /> \<span style="background-color: #fcff01;">DeviceIDServer.INI</span><br />LocalReminderFile = C:\users\<username>\prefs\DeviceID<br /> \DeviceID_Reminder.ini<br />WorkstationOffsiteFlag = N<br />LocalDisableRebootNagSW = N<br />LocalDisableRunEventsSW = N<br />LocalHorizontalOffsetPixels = 0<br />LocalVerticalOffsetPixels = 0</span></span><br /></p><p><br /><span style="font-size: large;">Example Server.ini</span><br /><br />(At the server's WSConfig folder)<br /><br /><span style="font-size: xx-small;"><span style="font-family: courier;">;DeviceID<br />;ServerControlFile DeviceIDServer.INI; Do not delete<br />;Note: Workstations have a local file that points to this file<br />;Example location: \\Server\Share\Util\DeviceID\Config\DeviceIDServer.INI<br /><br />[General]<br /><span style="background-color: #fcff01;">ServerInventoryDirectory</span> = C:\Data\proj\util\DeviceID\serverSimulation\DeviceID\WSInventory<br />DefaultLocalReminderINI = C:\Users\<username>\prefs\DeviceID\DeviceID_Reminder.ini<br />ActiveDirectoryLDAPPath = cn=prod,dc=mycompany,dc=com<br />DefaultHomeDataDirectory = H:\Data<br />PhysicalLocation = Main Campus<br /><br />InternalTestSite = <br />ExternalTestSite = www.google.com<br />ExternalIPAddressTestSite = https://api.ipify.org ;Shows external-facing IP address<br /><br />RebootNagWarningDaysYellow = 5<br />RebootNagPromptDaysRed = 7<br /><br />[Launch Run Events]<br />;This event can be set to run on program launch. This is a one-time event per launch.<br />RunAtLaunch = N<br />RunAtLaunchCommand = <br />RunAtLaunchParameter = <br />RunAtLaunchMarkerFileName = <br /><br />[Emergency Run Events]<br />;Run these events in an Emergency with an optional user prompt<br />;Caution: RunLine is and can be called multiple times; manage duplicate runs with Run Once Marker Filename<br />;When used, Usually RunAtLaunch=Y, RunAtHourlyCycle=Y, with marker filename, for fastest results<br />EmergencyRunAtLaunch = N<br />EmergencyRunAtHourlyCycle = N<br />EmergencyPromptMessageHeader = Important Message:<br />EmergencyPromptMessageLine1 = This is an example emergency message<br />EmergencyRunCommand = notepad.exe<br />EmergencyRunParameter = <br />EmergencyRunMarkerFileName = </span></span><br /></p><p><br /></p><p><u>Set an example emergency message</u>:<br /><br />Optionally: The program can connect to a server to show simulated company-wide messages or to run company-wide programs.<br /><br />With your copy of DeviceID <u>still running</u>,<br /></p><p style="margin-left: 40px; text-align: left;">Edit C:\Temp\ServerSimulation\DeviceID\WSConfig\DeviceID<u>Server</u>.ini<br /></p><p style="margin-left: 40px; text-align: left;">- Set "EmergencyRunAtLaunch = N (no need for this test)<br />- Set "EmergencyRunAtHourlyCycle = Y <br />- Set "EmergencyPromptMessageLine1 = "Database maintenance tonight"</p><p style="margin-left: 40px; text-align: left;">Leave all other Emergency fields blank. Save the file.<br />Results: After roughly an hour, and then bugged every hour after that, users will see the database maintenance message.<br /></p><p style="margin-left: 40px; text-align: left;">Edit the file again. <br /><br />Set "EmergencyRunMarkerFileName" to something like: <br />2023.0828-DatabaseMaint.txt (any made-up name). <br />Save the file.<br /></p><p style="margin-left: 40px; text-align: left;">Results: After another hour, the user is bugged once, then never again <br /></p><p style="margin-left: 40px; text-align: left;">Marker files are stored per workstation. See C:\Users\<you>\prefs\DeviceID. <br />Delete the marker file and they will be nagged again. <br />Recommend using unique marker file names with any Emergency Run. <br />Only one Emergency allowed at-a-time.<br /><br />The hour delay is to keep the server from being overwhelmed if everyone logs in at 8:00am and the delay is randomized.<br /></p><br /><span style="font-size: medium;">Testing Comments</span><br /><br />Because
of the ServerSimulation, WSInventory will only have one workstation --
yours. In real life, all workstation writes to this directory. Fifty
workstations = fifty files. <p><br /><br />I would appreciate hearing about your experiences with this program.<br /><br />Version History:<br />1.10 Initial Release<br />1.11 Generates inventory report on demand, not just at launch. Double-click label. Ping testing less aggressive if all "green". <br />1.20 Added External-facing IP Address reporting. Click once, then hover on displayed IP Address.<br />1.30 Added OneDrive backup for Reminder.INI file; Reminders now move across machines via OneDrive. If OneDrive not available, feature disables.<br /></p><p><br /><b>Related Keyliner Programs</b><br /><a href="http://keyliner.blogspot.com/2022/02/midy5-md5-checksum-finder.html" target="_blank">Midy5 Checksum finder</a><br /><a href="http://keyliner.blogspot.com/2021/05/directorypulse-keyliner-backup-software.html" target="_blank">Directory Pulse Disk Management<br /><br /></a>The program is a free keyliner-developed application, with no
registration, no sign-in, no ads, and does not call the mothership. <span style="background-color: white;">Write this program yourself! This started out as a Student project in my book <a href="https://www.amazon.com/War-Peace-Programming-Instructor-Workbook-ebook/dp/B09QZZPPY9/ref=sr_1_5?crid=35F7JOMBN5UE8&keywords=war+and+peace+programming&qid=1656549821&sprefix=war+and+peace+programming%2Caps%2C135&sr=8-5" target="_blank">War and Peace Programming Volume 6</a> (Visual Studio C#) - Project 5. </span> </p><p></p><p><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-53173448138766520342023-08-14T19:19:00.001+01:002023-08-14T19:19:25.833+01:00Error - Thunderbird - Your message was sent but a copy was not placed in your sent folder<p> Error - Thunderbird - Your message was sent but a copy was not placed in your sent folder<br /><br />"Your message was sent but a copy was not placed in your sent folder (Sent) due to network or file access errors. You can retry or save the message locally to a local folders/Sent."<br /><br />Plus: "Status: Copy failed"<br /><br /><u>Problem</u>:<br />When sending an outbound email<br />Likely, you had just recently completed other Outbound SMTP email changes or the message you are trying to send was previously written before SMTP changes were completed.<br /><br /><u>Solution</u>:<br /><br />At least for me, the solution was to close and re-open the Thunderbird client. <br />Then re-compose a new test message. <br /><br />(and, I am assuming you are using IMAP, where message are synced to the client and to the server - recommended.)<br /><br />This fixed my problem.<br />Other articles recommended rebuilding folders, going into the Thunderbird's settings and changing how Outbound emails are stored (storing them locally), turning off Oauth2, turning off TLS, and other nonsense.<br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-8852294310013975572023-08-14T19:11:00.005+01:002023-08-14T19:25:25.360+01:00Error - Thunderbird SMTP login to server smtp.office.365.com failed<p>Error - SMTP login to server smtp.office.365.com failed<br />Error - Unable to authenticate to Outgoing server (SMTP) smtp.office.365.com. Check the password and verify the 'Authentication method' in 'Account Settings | Outgoing server (SMTP)<br /><br />Summary: <br />A change is required in a default O365 setting.<br />This example uses GoDaddy, which is hosting my O365 email. Your email provider will have similar steps.<br /><br />(<i>O365 / Office.com will not host your email directly, they always go through a third-party</i>)<br />Note: O365 has been renamed to "Microsoft 365". <i>Microsoft has a branding problem</i>.<br /><br /><u>Symptoms</u>:<br />Thunderbird email client (version 115 and newer) displays ~ messages.<br />Receiving emails is not a problem. <br />Error appears only when sending.<br /><br />This can happen with other email clients, other email providers. <br />The email client must be capable of logging into O365 new OAuth2 authentication methods (with Mozilla Thunderbird, version 85 or newer). <br /><br /><u>Solution</u>:<br /><br />Assuming you are using IMAP email.<br />Assuming you are using GoDaddy.com (suspect other email providers follow similar steps)<br /><br /><b>Confirm these SMTP email settings</b>: <br /><br />Likely already correct:<br /><br />A. In Thunderbird, "Account Settings", "Server Settings"<br /><br /> Confirm: Server Name: outlook.office365.com Port 993<br /> Confirm: Connection Security: SSL/TLS<br /> Confirm: Authentication method: OAuth2</p><p>B. In "Account Settings", "Outgoing Server (SMTP)"<br /> <br /> "Edit"<br /> Confirm server name: smtp.office365.com <br /> Port 587<br /> Connection Security: STARTTLS<br /> Authentication method: OAuth2<br /><br /> Note: By design, with OAuth2, there is not a typed password<br /><br /><b>Change this O365 Email setting</b>:<br /><br />1. Login to GoDaddy<br />2. At the Email Dashboard, in "Account Information", click "Advanced Settings"<br /><br />3. Enable (turn on) "SMTP Authentication"<br /><br />4. Important: Wait (apx 24 hrs) before this change takes effect. Yes, you must wait.<br /><br />5. Testing: The next day, open Thunderbird: Send a test email.<br /><br /><br />Other sites, other articles, recommend turning off SSL/TLS. No. Don't do that. Others recommend using a user-ID/password for the SMTP login (turning off OAuth2). No, don't do that either. While these workarounds will solve the problem, they miss the point -- fixing the symptoms, and causing other security problems.<br /><br />You will not need an Windows app password, as suggested by other sites. <br /><br />I would appreciate comments on how to do this with other, non-GoDaddy email providers.<br /><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-51837197350017167202023-03-28T15:30:00.003+01:002023-03-28T16:33:38.235+01:00Microsoft Mouse and Keyboard - the feature you are trying to use - mkc.msi<p>When trying to open the Keyboard control panel: Microsoft mouse and keyboard center errors with: "<i>The feature you are trying to use is on a network resource that is unavailable</i>" mkc.msi
</p><p><b><u>Symptoms</u>:<br /></b><br />* Error message prompts for file - "\c7db78a79ae04ddc6fb8d1cbcf7e3a2e\MouseKeyboardCenter\setup64\mkc.msi" mkc.msi<br /><br />* Dialog cannot be dismissed.<br />* Control panel does not open<br />* You may or may not be using a Microsoft keyboard (immaterial)<br /><br /><u><b>Solution</b></u>:<br /><br />A. If you cannot dismiss the error message:<br /><br /> 1. press Ctrl-Alt-Del, and open Task Manager.<br /> 2. In the top section of running programs, locate one named "Windows Host" <br /> - it will stand out as an unusual program. <br /> 3. End the Task. The error dialog should go away<br /><br />Steps:<br /><br />1. Using the Control Panel, uninstall "Windows Mouse and Keyboard Center"<br /> <i>This is safe to uninstall at any time</i>. <br /><br /> a. Click the Start Menu, immediately start typing "Control Panel". Launch.<br /> b. Open Programs and Features<br /> c. Uninstall "Microsoft Mouse and Keyboard Center"<br /><br /> If prompted to reboot, do so.<br /><br />2. Using File Explorer, manually create a folder to hold future install files.<br /> For example, I use: <b>C:\Data\downloads\hardware\msmouse</b><br /></p><p style="margin-left: 40px; text-align: left;">(this will be a permanent folder. Although this is a keyboard problem, it is also tied to mouse drivers. Do this even if you use a Logitech mouse or keyboard.)<br /></p><p>3. Google "Microsoft Mouse and Keyboard Center"<br /> Find the download. Most people should select the x64 version.<br /> As of 2023.03: this link:<br /></p><p style="margin-left: 40px; text-align: left;">https://support.microsoft.com/en-us/topic/mouse-and-keyboard-center-download-f5b10905-7887-eedb-2f1c-d0737a36a3b2</p><p> Download and <u>begin</u> the install -- but do not complete the install; just start it. <br /> The goal: Steal the installation files before the install automatically deletes them.<br /><br />4. Open File-Explorer. Tunnel to the root of the C: drive.<br /><br /> Expect to see a new folder with today's date-time stamp.<br /> The folder will be named with a GUID (numeric-like name)<br /> For instance, mine was named 40307277773f4ca416 (this is a GUID)<br /><br /> a. While leaving the installation program running, open the folder<br /> b. Tunnel to subfolder "mousekeyboardcenter", open folder "setup64"<br /> c. <u>Copy</u> the contents of this folder: 2 subfolders, one file, which includes mkc.msi<br /> d. Paste into <b>C:\Data\Downloads\Hardware\MSMouse</b> (folder built in step 3)<br /><br /> e. Return to the in-progress install <br /> Allow the install to continue normally.<br /> Reboot if prompted.<br /><br />5. Once the install is complete,<br /> Click Start. <br /> Immediately begin typing "Keyboard" (Keyboard Control Panel)<br /> Launch the Control Panel<br /><br />6. When prompted for the ~ missing file, browse to <br /> <b> C:\Data\Downloads\Hardware\MSMouse</b> -- selecting the MSMouse folder<br /> Click OK<br /><br />Problem should be resolved.<br />The folder <b>C:\Data\Downloads\Hardware\MSMouse</b> must be kept.<br /></p><p><br /><u>Why this problem occurred</u>?<br /><br />I have a theory. First off, this is a plain and simple bug. <br />Recently I adjusted the keyboard keys "repeat" rate, setting the rate as slow as possible in order to debug a keyboard problem I was having. And, at the same time, I had also re-installed Logitech's GHub (which is a fairly buggy program to begin with). I suspect these are related events, with no firm solution to the original problem. <br /><br />The steps here are a workaround.<br /><br /><b><u>Other thoughts</u></b><br /><br />It would be better to put the "msMouse" (mkc.msi) setup files in a folder, such as C:\Windows\drivers (a user-created, more protected folder), making it safe from accidental deletes in C:\Data\Downloads. But security is too tight for most users to create a folder in this area.<br /><br />Finally, I did not try to manually install the mkc.msi. I suspect it installed when the control panel was first pointed to this area. I have not researched this further.</p><p><br /><br /><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-77650798375949567232023-02-19T22:53:00.003+00:002023-02-20T03:54:25.528+00:00Windows Event ID 10 EnhancedStorage-ehStorTcgDrv PCI and SM Bus Drivers<p><b>Windows Event ID 10 EnhancedStorage-ehStorTcgDrv PCI Driver, SM Bus Driver</b><br /><br /><u>Symptoms</u>:<br />Windows System Event Viewer error. ID 10<br />Windows Device Manager will have 2 PCI devices in a yellow-warning state.<br />PCI Driver<br />SMBus SM Buss Driver<br /></p><p><br /><u>Diagnostics</u>:<br />This may be helpful in identifying the failed device, then again, it may not. Most of the time this step will uselessly-suggest new drivers from the vendor:<br /><br />A. Start, Run, "Control Panel"<br />B. Right-Mouse-Click "Device Manager", run as Administrator<br /><br />C. Locate the failed device; Right-Mouse-Click, "Properties"<br /><br />D. Select the [Details] tab<br /><br />Change to "Hardware Ids"<br />Copy this hardware ID and google the results<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIj-duAz2Ta90KRK443c4PjWbzPY4meReXTxpyb-JyyIiXe7ai_NG8JBWFGLWlBYbu30tRJQzO3_zwawAMPMAsg7OXev9K3QEm4nmMzMuSeMwDEB2jwWQvI07-sx4AEeNO8BLvrw5aBsGlbEsdq7Titg65v81KuqqKH62sJPzpGoi9w_9uSOrwpNa80Q/s661/2023_Event10_DeviceID.tif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="325" data-original-width="661" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIj-duAz2Ta90KRK443c4PjWbzPY4meReXTxpyb-JyyIiXe7ai_NG8JBWFGLWlBYbu30tRJQzO3_zwawAMPMAsg7OXev9K3QEm4nmMzMuSeMwDEB2jwWQvI07-sx4AEeNO8BLvrw5aBsGlbEsdq7Titg65v81KuqqKH62sJPzpGoi9w_9uSOrwpNa80Q/w400-h196/2023_Event10_DeviceID.tif" width="400" /></a></div><p><u>Possible Solution</u>:<br /><br />Provided new drivers are available from Microsoft, there is no harm in trying this step:<br /><br />1. Start, run, "CMD"; launch as Administrator.<br /><br />2. Type this command at the DOS prompt:</p><p><span style="font-family: courier;">msdt.exe -id DeviceDiagnostic </span><br /><br />(a hardware troubleshooter)<br />if Microsoft drivers are found, they will install and will probably need a reboot.<br /><br /><br /><u>Likely Solution: Motherboard Manufacturer</u><br /><br />This problem is really a motherboard manufacturer problem.<br />Go to the vendor's support site and download Chipset Drivers.<br /> While there, update the BIOS to the latest version.<br /><br /><b>There may be more than one Chipset Driver</b>:<br />In my case, with an Asus Prime Z790-P motherboard, the main download page had a download link for "Chipset" (Intel SerialIO Software for Windows 10 64-bit & Win11 64-bit WHQL). This was all that was on the download page.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPb_yFbPNv9Y_ka6VO3UXI_tpFOZ7v6-Wc8_mxypomsrcXLysm2fJwCs7F3V7M1jvVgsWVvkQcAQFSuqH1w9zkKS9tSw6Qkgm9ECPtloA42tlCKyO36iv4NO1fC1b6gsupu0tcNv4S6RBlpVOnEj1CxSQftfiqHqr8Y-5EebeO2S0HXBAfBGwrv7ljsg/s721/2023_02_EventID2-Asus.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="174" data-original-width="721" height="77" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPb_yFbPNv9Y_ka6VO3UXI_tpFOZ7v6-Wc8_mxypomsrcXLysm2fJwCs7F3V7M1jvVgsWVvkQcAQFSuqH1w9zkKS9tSw6Qkgm9ECPtloA42tlCKyO36iv4NO1fC1b6gsupu0tcNv4S6RBlpVOnEj1CxSQftfiqHqr8Y-5EebeO2S0HXBAfBGwrv7ljsg/s320/2023_02_EventID2-Asus.png" width="320" /></a></div><p>Not entirely evident was the "See All Downloads" link -- which was expected to be older versions of the driver, but what it really was other required drivers.<br /><br />In particular, also download these vendor drivers:<br />a) Intel_Serial_IO Software WHQL (Serial IO)<br />b) Chipset_Intel_TP (Intel TP)<br />c) Intel GNA_Driver (GNA)<br />d) Intel MEI 64-bit <br /><br />(At least for my Asus, separately download each driver dot-ZIP to an individual folder. Expand the .ZIP to another separate folder. Run each Setup program as "Administrator."</p><p>Your vendor drivers may be different.<br /><br />This fixed the missing PCI device drivers.<br /><br /><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-27471183630429118322023-02-15T05:56:00.004+00:002023-02-17T04:43:41.342+00:00Greenshot Screen Capture - The best<p>Utility: Greenshot Screen Capture<br /><span style="font-size: x-small;"><span style="color: #999999;">
Original article: 2017. Updated for Windows 11</span></span><br /></p><div class="separator" style="clear: both; text-align: right;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlfXrdbgQTsGQQcp-SYxXII0tDL-iuTPC8vN2XP4IID8rDi6i8-BX0cJ6XpRbVxcUL6YqswJRX9HEeN4IceJf7T49AXy_ySO9gH_ffBMZsX4B16YnoiUbVdXENBAhZB8SuSX0V8GQI1DfHu1h3KS0zak2KOlVHCQ_-Fq7yPC62WYgNQz4zGOLr-xLJJA/s660/2017_GreenShotBanner.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="64" data-original-width="660" height="39" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlfXrdbgQTsGQQcp-SYxXII0tDL-iuTPC8vN2XP4IID8rDi6i8-BX0cJ6XpRbVxcUL6YqswJRX9HEeN4IceJf7T49AXy_ySO9gH_ffBMZsX4B16YnoiUbVdXENBAhZB8SuSX0V8GQI1DfHu1h3KS0zak2KOlVHCQ_-Fq7yPC62WYgNQz4zGOLr-xLJJA/w400-h39/2017_GreenShotBanner.png" width="400" /></a></div><br /><div class="separator" style="clear: both; text-align: center;">
</div>
When I need screenshot illustrations for this blog or for documentation, I use a snipping utility called Greenshot. This is similar to Windows Snip tool, but Greenshot is more capable and
more elegant. *Everyone* who has used this program loves it. <br />
<br />
Greenshot is free, with no advertisements, no registration, no nagging, no-strings-attached utility. The authors ask for small and deserved donation. <br />
<br /><br />
<a href="http://getgreenshot.org/downloads/">http://getgreenshot.org/downloads/</a><br />
<br />
<br />
<b>How it works:</b><br />
<br />
After installing and setting keystroke preferences, note the "Greenshot" icon in the System Tray, meaning the program is running and waiting. <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvS-AmRGJXutm74rTPhv7uazN98x3aZ-tLEnFurWhqxxHlEr6umTDd6UuPFTUCxU_75eQzj3I5FXzN52m_AqxZDiYJma-tHW3VcEqoukCC06lprMz5mh0cF1t-yRUj6gpKztZYYp4RIdRh0wnv04LLCnz4UtmZDITbYQiCvsRM2FeFRYMLDs87_bQdOw/s355/2020-00-GreenshotSystemTray.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="152" data-original-width="355" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvS-AmRGJXutm74rTPhv7uazN98x3aZ-tLEnFurWhqxxHlEr6umTDd6UuPFTUCxU_75eQzj3I5FXzN52m_AqxZDiYJma-tHW3VcEqoukCC06lprMz5mh0cF1t-yRUj6gpKztZYYp4RIdRh0wnv04LLCnz4UtmZDITbYQiCvsRM2FeFRYMLDs87_bQdOw/s320/2020-00-GreenshotSystemTray.png" width="320" /></a></div><br />Press the keyboard's Print Screen key and
draw a box around the part of the screen to capture. (Other keystrokes can capture the entire screen, the same area as last time, etc., as well as other options too boring to list here.)
For example, her is a screenshot of Windows Explorer. Notice the size, in pixels. Optionally capture the mouse pointer, magnify, draw, etc.. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv-qStcrqOhDkM8KBsS36ipS-ACSefg_P51CZ6CA6LpoRmqc7ebnIuD_BHJLENjmpYZsSsyJnO-LMeEee_3d5p3VsdWZPtq-2l3G1MMu4mMwtJAu9B3CjgybVdONGGbZLmrO5sTeLIkN-o/s1600/2017_GreenShotPrintScreen.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="531" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv-qStcrqOhDkM8KBsS36ipS-ACSefg_P51CZ6CA6LpoRmqc7ebnIuD_BHJLENjmpYZsSsyJnO-LMeEee_3d5p3VsdWZPtq-2l3G1MMu4mMwtJAu9B3CjgybVdONGGbZLmrO5sTeLIkN-o/s400/2017_GreenShotPrintScreen.png" width="400" /></a></div>
<br />
Then it prompts for a save location, or you can set a default, such as "Open in Image Editor":<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAcQurAsG3-x8WqLk9wwqLkpFnhNAhx5KE1KeiqTh1rynsBI7Tnz49QFh3QnzKK4fpE_Rxsti_TVb3jWp_R1qMoeJqAQUWgZUU4G52xg2_M_nZzMHcBCtHEBZ8ee7_GSMswJdcgQisn2-q/s1600/2017_GreenShotOptions.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="181" data-original-width="357" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAcQurAsG3-x8WqLk9wwqLkpFnhNAhx5KE1KeiqTh1rynsBI7Tnz49QFh3QnzKK4fpE_Rxsti_TVb3jWp_R1qMoeJqAQUWgZUU4G52xg2_M_nZzMHcBCtHEBZ8ee7_GSMswJdcgQisn2-q/s320/2017_GreenShotOptions.png" width="320" /></a></div>
<br />
"Open in Image Editor" is my favorite destination -- This is slightly misnamed. By default, it opens in a small Greenshot editor -- not in your photo editor. From here, you can annotate, draw objects, obfuscate, or move the mouse-cursor. Then from the ribbon bar, manually copy to the the clipboard or save as a file.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirOmhV5p9pqitdsWXPSPWvJL_yl1Hvs_6femJis7nkHFyH7YT1_Dee1enzUUDZenyWE8DhtNXsXdQQN4kikw60imhU3f3L4JE-urlisnegiBuvDrFwihr6hDC2UA8NSN3UCVvyD4-DG2IJ/s1600/2017_GreenShotImageEditor.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="327" data-original-width="389" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirOmhV5p9pqitdsWXPSPWvJL_yl1Hvs_6femJis7nkHFyH7YT1_Dee1enzUUDZenyWE8DhtNXsXdQQN4kikw60imhU3f3L4JE-urlisnegiBuvDrFwihr6hDC2UA8NSN3UCVvyD4-DG2IJ/s320/2017_GreenShotImageEditor.png" width="320" /></a></div>
<br />
"Open in Image Editor" opens a new window with each Print Screen, acting like multiple clipboards and I might have a dozen of these open. I copy the image to the Windows clipboard and manually paste into my graphics editing programs or word processor. This helps keep the work organized.<br />
<br />The Image Editor even has click-to-place counter graphics! Oh, my heart, be still! <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL-rJRcrw4r4OUZNi-B3gQZGWieMESA5WrivQCa5qAfbGOdcIx3FW12jgLoxXEGCNRpnFzTteiYdcoWPEI7XWcMx9C0ExLcPq529h4FIKNfDXOPbS6EsC_onvIkl6YpqSrNPHZQCc2HiGa/s1600/2017_GreenShotCounters.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="733" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL-rJRcrw4r4OUZNi-B3gQZGWieMESA5WrivQCa5qAfbGOdcIx3FW12jgLoxXEGCNRpnFzTteiYdcoWPEI7XWcMx9C0ExLcPq529h4FIKNfDXOPbS6EsC_onvIkl6YpqSrNPHZQCc2HiGa/s400/2017_GreenShotCounters.png" width="400" /></a></div><br />
Optionally, Greenshot can write a numbered file (file001.png, 002.png, etc), a feature I do not use, but understand its usefulness.<br />
<br /><br />
<b>One-time Installation Preferences:</b><br />
<br />When the program first launches, it invariably has a warning about the PrintScreen keystroke being intercepted. <br /><br />Disable Windows's default PrintScreen keystroke:<br /><br />1. Go to Windows Settings (the Gear icon), "Accessibility", "Keyboard" (or just search "keyboard")<br />2. [ ] (uncheck) "Use Print Screen to open snipping"<br /><br />3. Then, in the System tray, right-mouse-click on the Greenshot icon and select "Preferences"<br /><br />Set the Capture Region key to "Print Scrn" - to this by placing the cursor in the field and pressing the keyboard's PrntScrn key.<br />
<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT83VaN-pi8R9pPHsPWyO-EdnWDIiqppyaCvJ_2IWBKxIRcoisol6F0wwh7YxSXti8y5-BJ_xrFWbrTBTYwqxQLmNjBRFCgz8WddPV8zHeL4ZIcIgCeAkn4GelCEUzuzDuoRUYxLw_S0uaWI0vwQI9ddFVvenviCzn1ws3w2KMoNgXmBZxRZbcjilumw/s718/2020-00-GreenshotPrtScrn.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="718" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT83VaN-pi8R9pPHsPWyO-EdnWDIiqppyaCvJ_2IWBKxIRcoisol6F0wwh7YxSXti8y5-BJ_xrFWbrTBTYwqxQLmNjBRFCgz8WddPV8zHeL4ZIcIgCeAkn4GelCEUzuzDuoRUYxLw_S0uaWI0vwQI9ddFVvenviCzn1ws3w2KMoNgXmBZxRZbcjilumw/w400-h268/2020-00-GreenshotPrtScrn.png" width="400" /></a></div><br />4. In the Capture menu, [ ] Show Magnifier (uncheck)<br /><br />5. Recommended: <br /><br />In the Destination tab, change the default Output Destinations to "Open in Image
Editor". This gives me multiple clipboard functionality. Leave all unchecked to be be prompted each time.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT352yJu0xhljNaobLLyKaMKzFVjHOfAC1q7CFJm8L6TQALgjU-UFCSmVt3LzE-9GZ1CYpthNys2L6nP_poHmduOXAi4Idli21R7wAsLbLSZUA52eDqleJPHRZDi3KUxLHd78XyDtBhbYG/s1600/2017_GreenShotImageDefaults.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="261" data-original-width="398" height="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT352yJu0xhljNaobLLyKaMKzFVjHOfAC1q7CFJm8L6TQALgjU-UFCSmVt3LzE-9GZ1CYpthNys2L6nP_poHmduOXAi4Idli21R7wAsLbLSZUA52eDqleJPHRZDi3KUxLHd78XyDtBhbYG/s320/2017_GreenShotImageDefaults.png" width="320" /></a></div>
<br />In older versions of Windows, you may find the PrintScreen key does not work on all screens (pressing PrintScreen does not activate the highlight). Consider these steps:<br />
<br />
A. From the System Tray, select the Greenshot icon, Preferences. In the General tab, set the program to not [ ] Launch Greenshot on startup.<br />
<br />B. Then, from the Start Menu, type the letters, "Greenshot". When the program is found, other-mouse-click the icon and "Pin to Start"<br /><br />C. Launch the program manually by "other-mouse-clicking" the Greenshot desktop tile, choose "More" and then "Run as Administrator". This will need to be done after each reboot. <i>Greenshot's FAQ explains the reasoning behind this</i>.<br />
<br /><br /><br />
Cautions:<br />
<br />Download the utility from the Vendor's site (link at the top of this article); do not download from SourceForge or other sites because many have re-packaged it around banner ads and other nefarious stuff. <br />
<br />
Other comments:<br />
<br />
This is an open-source project and the source code is available for the curious. There is a good FAQ section on the website. Donate five or ten bucks to help the developers.<br />
<br />
<br />
Related Links:<br />
<a href="http://getgreenshot.org/downloads/">http://getgreenshot.org/downloads/</a><br />
<br />
My favorite graphics/photo editor: Corel Paintshop Pro - used for all illustrations here.<br />
<br />traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com1tag:blogger.com,1999:blog-1585105787473796476.post-69191805546671931352022-12-18T19:29:00.013+00:002023-10-20T13:29:29.203+01:00Twitter to Mastodon<p>I've recently moved from Twitter to Mastodon. Here are observations on how to make the switch. <br /><br /><b><u>The Design</u>:</b><br /></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinJnDai-9GmjxLxa9NGCVw5EJnXJWGWnRGQrrFd2EnhiLAFPzpmfLTNqRXym8rCdeLbbrOATmO49b12hRHWRUWZBspYl_FwV4rVr6B62tIVG0lVOpsmUy5z0HJQj4R68AgCGQcdMWeOrBFuexPgjvdSTVVe49a4YNAenPqSQArYiVeYAhXYx_oQ1bvTQ/s289/2022-12-MastodonBannerMed.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="171" data-original-width="289" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinJnDai-9GmjxLxa9NGCVw5EJnXJWGWnRGQrrFd2EnhiLAFPzpmfLTNqRXym8rCdeLbbrOATmO49b12hRHWRUWZBspYl_FwV4rVr6B62tIVG0lVOpsmUy5z0HJQj4R68AgCGQcdMWeOrBFuexPgjvdSTVVe49a4YNAenPqSQArYiVeYAhXYx_oQ1bvTQ/s1600/2022-12-MastodonBannerMed.png" width="289" /></a></div><br />1. Mastodon is made up of thousands of independent "Instances," each of which tries to target a particular goal or topic. <br /><br />For example, I joined "<b>techhub.social</b>"<br /><br />Others:<br /><i>mastodon.sdf.org</i> is a general-purpose "social" Instance<br /><br /><i>mastodon.online</i> is another general-purpose "social" Instance<br /><br />You can find instances dealing with design, art, programming languages, AWS, anime, math, etc.. Photography seems popular in the posts I orbit. See the <a href="https://joinmastodon.org/servers" target="_blank">Mastodon.org's main landing page</a> for other suggested instances. <br /><p></p><p style="margin-left: 40px; text-align: left;">It is interesting that my favorite instance is not <br />(<span style="font-family: courier;">techhub.social.<u>org</u></span>) or <br />(<span style="font-family: courier;">techhub.<u>com</u></span>) or even <br />(<span style="font-family: courier;">techhub.<u>mastodon</u>.org</span>). <br /><br />It is "techhub<span style="background-color: #04ff00;"><span style="font-family: courier;">.social</span></span>", where ".social" is the domain that administrator chose. .com, .org are common.<br /></p><p><br />2. In practice, Instances are not that focused on their topic, regardless of their name. </p><p style="margin-left: 40px; text-align: left;">For example, my instance (techhub) seems to mostly have photographs. Mastodon.sdf.org seems to have more political and sports postings. <i>Why is this? I have no idea</i>.<br /></p><p style="margin-left: 40px; text-align: left;">You can post on any topic within your chosen instance, and people in other Instances can see your posts. </p><p>3. <span style="background-color: #fff2cc;">No need to join multiple Instances</span>. <br /></p><p style="margin-left: 40px; text-align: left;">Content is "Federated" and you can see posts from other Instances.<br /></p><p style="margin-left: 40px; text-align: left;">Contrary to what others say, it does not particularly matter which Instance you join. Find one with interests or people you like, with the understanding the posts are all-over-the-place. Mostly what the Instance does is filter your "local" timeline (thread). You can flip into the broader "Federated" timeline with a click.<br /><br /></p><p style="text-align: left;"><b>4. Finding an Instance on <a href="https://joinmastodon.org/servers" target="_blank">Mastodon's home page</a> is hard. </b><br /><br />If none of the suggested Instances on Mastodon's landing page meet your fancy, I'm not sure how to find others. <br /></p><p>5. Instances are run by volunteers, and they host the program on their own computers, cloud-computers, Raspberry Pi's, etc. <br /></p><p style="margin-left: 40px; text-align: left;">The owner of that instance pays for the internet-pipe, domain-names, disks, etc., usually out of their own pocket. They may quietly, and often unobtrusively, ask for a donation. Often, Instances post their finances, showing expenses and income. See their "about" page. <i>Because there are no advertisements, send your admin a few dollars every quarter. It is worth keeping this non-commercial</i>. (Update: They now appear to use Patreon for donations).<br /></p><p>6. Instances are moderated by the Instance owner (the admin) and each Instance has its own rules on the content they allow. When you join the Instance, click the "About" link to see their policies and "codes of conduct." In general, don't be a jerk, don't do anything illegal or immoral.<br /></p><p style="margin-left: 40px; text-align: left;">If you later decide you don't like your Instance, you can easily move to another instance, taking all of your posts (tweets/toots), followers, and followings with you.</p><br /><p><b><u>In Practice - day-to-day stuff</u>:</b></p><p style="text-align: left;">A. Mastodon has a mobile-client on Android and Apple. As of 2022-12, all admit the mobile apps are not as good as the web-browser.<br /><br /></p><p style="text-align: left;"><span style="background-color: #04ff00;">B. Don't login using www.Mastodon.org! Use your Instance's login.</span><br /></p><p style="margin-left: 40px; text-align: left;">This took me the longest time to understand this. </p><p style="margin-left: 40px; text-align: left;"><b>From Mastodon.org's main landing page, there is no place to login</b>! <br /></p><p style="margin-left: 40px; text-align: left;"><u>Instead, login to your Instance's Domain Name</u>.<br />For example:<br /></p><p style="margin-left: 40px; text-align: left;">techhub.social's login is: <b><span style="color: #0b5394;">https://techhub.social/auth/sign_in </span></b><br />mastodon.sdf's login is: <b><span style="color: #0b5394;">https://mastodon.sdf.org/public/local</span></b><br /></p><p style="margin-left: 40px; text-align: left;"><i>Each Instance seems to have their own style of login URL</i>. <br /><br />Notice they do not have "mastodon.org" in the URL!<br /><br /><i><Gasp!> <br /></i></p><p style="margin-left: 80px; text-align: left;"><i>sdf's login page looks identical to techhub's login page. And Techhub's login won't work on sdf's identical-looking login page. Dang, this is hard to figure out when you are new</i>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTL0AKH26_VpxYPP61X8Ha98t-cy2FDrnigbBjdXGLvOFnHKNo6eD9_Islyn3BJ5Cad2Ol1AsD0MZcXIO3tbPu-MD3XPIs6rbLJI2LbuFNBOm7MXL7OboMmZSVzkrkc3fXA4LBQM_3PLOrGRjSywrjLNJZghrmSPxu0sUj6R4ucjPImO59V8rcfsz1gA/s928/2022-12-MastodonLoginPageTechHub.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="462" data-original-width="928" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTL0AKH26_VpxYPP61X8Ha98t-cy2FDrnigbBjdXGLvOFnHKNo6eD9_Islyn3BJ5Cad2Ol1AsD0MZcXIO3tbPu-MD3XPIs6rbLJI2LbuFNBOm7MXL7OboMmZSVzkrkc3fXA4LBQM_3PLOrGRjSywrjLNJZghrmSPxu0sUj6R4ucjPImO59V8rcfsz1gA/w400-h199/2022-12-MastodonLoginPageTechHub.png" width="400" /></a></div><div style="margin-left: 40px; text-align: left;"><br /></Gasp!><br /></div><p style="text-align: left;">C. Login with the <u>email address</u> that you built the account with. <br /></p><p style="margin-left: 40px; text-align: left;">Be sure you are on the right URL. <br />Each Instance's login page looks identical.</p><p style="margin-left: 40px; text-align: left;"> </p><p style="text-align: left;">D. <span style="background-color: #04ff00;">Your account name is different than your login name</span> (see your Profile)<br /></p><p style="margin-left: 40px; text-align: left;">For example, my account name on techhub is: @traywolf@techhub.social<br /><br />-Do not login using the @-account. <br />-The @-name is what you give other people so they can follow you! <br />-Login using your email address.<br /><br />Why the complexity? It keeps your email address hidden.<br /></p><p><br />E. Each Instance has its own list of Account/Login Names -- never does one instance meet another. <br /></p><p style="margin-left: 40px; text-align: left;">If you join more than one Instance, each has its own account list, own passwords, etc..<br />You can use the same email address on each instance, but...<br />Instances do not share logins. Passwords do not sync.<br />Each Instance's Login is stand-alone.<br /><br />"traywolf" on one Instance is completely different than "traywolf" on another. <br />On another instance, you may find your UserID is already taken (johnSmith). <br /><br />Again, there is no need to have accounts on more than one Instance.<br /></p><p style="margin-left: 40px; text-align: left;"><span style="background-color: #fff2cc;">If this seems weird, consider email: "johnSmith@yahoo.com" and "johnSmith@gmail.com" are two separate creatures; could be two different people; could be the same person. Mastodon is the same.</span><br /></p><p style="text-align: left;"><br /></p><p style="text-align: left;">F. Your "timeline" (the threads you read and follow) is not curated. There is no algorithm to move certain posts to the front. "Things you are interested in" do not magically show first in your reading list (which is different than how Twitter behaves). <br /><br />If you take no action, it is linear. Last-post-in shows at the top.<br /><br />G. Use #hashtags<br /></p><p style="margin-left: 40px; text-align: left;">If you see an article or topic you like, click the #HashTag that might be typed in the post's text (if the person used hashtags) -- this lets you see other posts with the same hashtag. If you like the topic, click "Follow Hashtag", illustrated in upper-right of the posting:<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP2HZ4qLhFdFDsWP3EZdZ-4alkDe57NIsgFIVkWw4Z-ub1emsUWYIHiZem38lL_vqxt7XfUemzwkYLCNwUa5OO3S5495ZX4LKaRuKZ2TQ4Gvdnvf3-yxXhKkXYihe4ngtz06E1GRrEjCRClqS7Vee05WASGMcMOBMF22z6ap0ILUvyCHwoUnHG_4jvlg/s1064/2022-12-MastodonHashTagFollow.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="713" data-original-width="1064" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP2HZ4qLhFdFDsWP3EZdZ-4alkDe57NIsgFIVkWw4Z-ub1emsUWYIHiZem38lL_vqxt7XfUemzwkYLCNwUa5OO3S5495ZX4LKaRuKZ2TQ4Gvdnvf3-yxXhKkXYihe4ngtz06E1GRrEjCRClqS7Vee05WASGMcMOBMF22z6ap0ILUvyCHwoUnHG_4jvlg/w400-h268/2022-12-MastodonHashTagFollow.png" width="400" /></a></div><br /><p style="margin-left: 40px; text-align: left;">Similarly, if you find a person who is interesting, click their profile and follow them.<br /><br />The more you follow, and the more you <u>boost</u>, the more likely you'll find other posts of interest. <span style="background-color: #04ff00;">If you like something, follow it</span>! Unlike Twitter, there are no other ramifications to this. You are not being tracked and advertisers don't get to learn about your choices.<br /><br />If you post new content, drop a hashtag or two at the end. Don't go crazy here, one or two hashtags is polite. Make them up or use a pre-existing hashtag. Your post will flow into that stream and other people following (say #photography) will see your post, even if they are on a different Instance. Posts with a dozen hashtags are trolling.<br /><br /></p><p style="margin-left: 40px; text-align: left;"></p><p style="text-align: left;">H. To find a particular person (a person who you know is on Mastodon) but you've not found their post yet, ask them for their @-account name (see above). Then use "Search" to find them. <br /></p><p style="margin-left: 40px; text-align: left;"><i>Without their @-account name, there is no good way to find that person, </i><i>at least within Mastodon-proper, </i><i> -- there are too many servers and too-many self-built account names. You won't find a person by searching their name or email</i>. <br /><br />Using email, ask them to send you a direct link to their profile. If they are a famous person, and you are not email-buddies, you have no choice but to snoop around in the "Federated timeline" until you find them (they may not be on your Instance). <i>If there is a better way, leave me a comment</i>.<br /><br /></p><p style="text-align: left;">I. Along the bottom of the post: If you like a post, click the * star icon, marking it as a "favorite." They get a quiet notification that you liked it. This is a semi-private way to tag content, and it lets them know you care.<br /></p><p style="margin-left: 40px; text-align: left;">Better yet: Click the "boost" icon. <br /><br />This makes a copy of their post, adding it to the top of your time-line -- and it moves into the Federated timeline (now called #Explore). This gives them far-more exposure than a simple "star-favorite." <br /><br />Clicking *Favorite is a private way to mark a post, while a "Boost" is a public way. </p><p style="margin-left: 40px; text-align: left;">The key is to 'follow.' But like Twitter, some people post too often,
or on topics you don't care about. Click "Block" (or "Mute") on their post. There are a fair number of "bots" that post things like automatic weather updates for Cincinnati Ohio; they are pester-some. You will have to block them manually.<br /><br /></p><p style="text-align: left;">J. On the Right-nav, "Local" is your Instance's TimeLine. "Federated" (now called #Explore) is the whole-world's timeline, found in other instances. See illustration above.<br /></p><p style="margin-left: 40px; text-align: left;">As you can imagine, the Federated timeline, from the entire "Fediverse," is busy. See "Recommended Profile Changes," next, for ways to calm this down. <br /><br />If your admin finds another Instance that is particularly vile, they can block that server from being visible in your "Federated" timeline. This helps keep things civil. If you disagree, move your Profile to another Instance.<br /></p><p style="text-align: left;"><br /><b><u>Recommended Profile Changes</u>:</b><br /><br />Once you have an account, from your Profile's PREFERENCE page, make these recommended changes:<br /><br />[x] Slow Mode -- new posts do not automatically scroll. This lets you stay on the current post, giving you time to read it before someone else's new post shoves it down. Highly-recommended.<br /><br />[ ] Uncheck "Auto-Play animated GIFs" - distracting if turned on. Hover mouse over image to play.<br /><br />[ ] Uncheck "Crop images in non-expanded posts to 16x9". This shows them in their original aspect ratio.<br /><br />[x] Media Display: "Always show media"<br /><br />Click "Save Changes" at the bottom of the form.<br /><br /><br />In <u>Notifications</u>:<br /></p><p style="margin-left: 40px; text-align: left;">Review your preferences. <br />I unchecked all except for [x] Someone requested to follow you<br /></p><p style="text-align: left;"><br /><b>Impressions and Conclusions:</b><br /><br />I remember first joining Twitter. It took six months to understand how best to use it and what it was really for. Until I started following people, it was a jumble. It took time to get the content I expected. Mastodon is the same, but it has the added complexity of choosing an Instance and learning how to Logon! It was frustrating. Once you are in, you are golden.<br /><br />Right now, Mastodon is friendly. People are superficially engaged and I am seeing lots of activity, but not yet the depth I had on Twitter (2023.10 update: Still true). With thousands joining every week, there are a lot of "hi, this is my first post." This will subside (which it did). <br /><br />Mastodon is pleasant. Twitter pummels you with corporate sponsors and advertisements -- I'd guess that a quarter of my Twitter content is paid content. Let's hope the Fediverse stays un-commercialized. I try to pay my Instance Admin a quarterly stipend for this privilege (but many are now on Patreon, which makes this harder).<br /><br />-end<br /><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-72643514465285274032022-09-18T06:49:00.003+01:002022-12-18T15:31:25.887+00:00Visual Studio C# Linked DLL Exception Unhandled System.IO.FileNotFoundException<p>Programming Problem: Visual Studio C# Linked DLL - Unhandled System.IO.FileNotFoundException. Could not load file or assembly 'System.Runtime, Version=6.0.0.0.... File Not Found Exception<br /><br />When attempting to link a DLL into a Visual Studio (2022) .Net program, I ran into this ~ problem and it took days to figure this out. The Internet suggested all kinds of crazy solutions.<br /></p><p></p><p><b><u>Error</u>:</b><br />When linking a DLL into a Visual Studio C# Solution.<br />Application.Run(new Form1()) fails<br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMyOLccSwqgEdV_cvwqsnzaTKsgq8l5vf1UYdcnlfTSpRAVav6fzpchOR89VNku6kzfCTB55-7x5qMqNsteKFH89u23szkn_1Q89Nc3d-DridZUTeOFK5Qh_fcEmSy2uppR5PoZK2Y4LsUrjeEfDC_ZOULF4Q_TZryRt7xLUvyq-usGKBO87iJ5M_NtA/s730/2022-09-DLL-IO-Error.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="437" data-original-width="730" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMyOLccSwqgEdV_cvwqsnzaTKsgq8l5vf1UYdcnlfTSpRAVav6fzpchOR89VNku6kzfCTB55-7x5qMqNsteKFH89u23szkn_1Q89Nc3d-DridZUTeOFK5Qh_fcEmSy2uppR5PoZK2Y4LsUrjeEfDC_ZOULF4Q_TZryRt7xLUvyq-usGKBO87iJ5M_NtA/w400-h240/2022-09-DLL-IO-Error.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The Crash (Click for larger view)<br /></td></tr></tbody></table><p><br />In the Windows Event logs, this shows as a CLR20R3 error<br /><br /><b>Problem:</b><br />The .DotNet version of the application is different than in the linked DLL's .DotNet version. <br /><br />In Visual Studio, separately open both the current solution and the DLL. <br />In each, select "Project, Properties"<br /><br /><span style="background-color: #f4cccc;"><i>I'd bet the DLL's code points to .DotNet 6.0 (.Net60)</i></span><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_DGYcWZ37WjkjNlRozvNk8ZWVcnfYou9Q3mt20OtDFBNy5bkvR3gymNyn69rtE1yth9F2LJKM4Wm-h-ckguCREPccSX0EeAEtCp8urNEUzRgpvJkE4Z8YCXKA4Ilt681M7Ii9E7L9rySOkgViQerPDND6POFmi4Gye8ue2KFlXqphz55jZhBfsbo8tQ/s960/2022-09-DLL-MisMatch.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="514" data-original-width="960" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_DGYcWZ37WjkjNlRozvNk8ZWVcnfYou9Q3mt20OtDFBNy5bkvR3gymNyn69rtE1yth9F2LJKM4Wm-h-ckguCREPccSX0EeAEtCp8urNEUzRgpvJkE4Z8YCXKA4Ilt681M7Ii9E7L9rySOkgViQerPDND6POFmi4Gye8ue2KFlXqphz55jZhBfsbo8tQ/w400-h214/2022-09-DLL-MisMatch.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">(Click for larger view)<br /></td></tr></tbody></table><b><u>Likely Solution</u></b>:<br /><br />Rebuild the DLL solution from scratch.<br />Pick "<span style="background-color: #fcff01;">Class Library (.Net Framework)</span>" - Do not pick "Class Library"<br /> <br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBg0CMD3kCUqW3EC-N0TcVMSH7acmgLORDk1okibW9JormU2ND_qJZozSe5lMG_49v8_PqjY0dM-65ujlumkgdCXdMCYG7awELiyQt4ewKoHxs_sGZWVjpND7kw7DUSImDZkvjaaMTUgTxBwxbroQHf-vW-B96pg88no26VKkZsIT40Kavv278OJMLfw/s583/2022-09-PickThisNotThat.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="250" data-original-width="583" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBg0CMD3kCUqW3EC-N0TcVMSH7acmgLORDk1okibW9JormU2ND_qJZozSe5lMG_49v8_PqjY0dM-65ujlumkgdCXdMCYG7awELiyQt4ewKoHxs_sGZWVjpND7kw7DUSImDZkvjaaMTUgTxBwxbroQHf-vW-B96pg88no26VKkZsIT40Kavv278OJMLfw/w400-h171/2022-09-PickThisNotThat.png" width="400" /></a></div><p>Recompile (build) the solution and copy the DLL into your project as a new reference.<br /><br /><br /></p><p style="margin-left: 120px; text-align: left;">This technique, along with more verbose descriptions, can be found in my C# programming book, "<a href="https://www.amazon.com/dp/B09QZW6RML?searchxofy=true&binding=kindle_edition&ref_=dbs_s_aps_series_rwt_tkin&qid=1663479862&sr=8-1" target="_blank">War and Peace Programming in C#</a>", Volume 2, Chapter 9.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcRooaFQzQb0lXZNZrAdggojviYc8OY4_aSEmUJb5elMG4gY12IJeyhl7WjQ0s7CQ9BpbJA8qhJCvwOEEBFQG4xevCr7p6Bv44KNhs2WfnEfpS0r_b9KJ2mnsrzKn4OL38YbwYBLKJOYqObFokXTLck-ZJDpI9AIfV3iBtKudMlMgFbvf3ThQkRfjREw/s3435/EbookV1-3.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3435" data-original-width="2145" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcRooaFQzQb0lXZNZrAdggojviYc8OY4_aSEmUJb5elMG4gY12IJeyhl7WjQ0s7CQ9BpbJA8qhJCvwOEEBFQG4xevCr7p6Bv44KNhs2WfnEfpS0r_b9KJ2mnsrzKn4OL38YbwYBLKJOYqObFokXTLck-ZJDpI9AIfV3iBtKudMlMgFbvf3ThQkRfjREw/w125-h200/EbookV1-3.jpg" width="125" /></a></div><br /><p><br /><br /><span style="font-size: large;"><b>Full steps for Building a DLL</b></span><br /></p><p></p><p>This example builds a class called "CLSystemGlobal", in a NameSpace "NSSystemGlobal" and this example is meant to store System variables that can be used by all projects in a shop. The DLL is intended to be linked into most of your shop's programs.<br /></p><p style="margin-left: 120px; text-align: left;"><i>I'm a big fan of naming things properly. Many steps are rename/confirm steps. Doing this right makes later steps easier to understand</i>.<br /></p><p><br /><b>1. Start a new Visual Studio C# project.</b><br />Select /filter-by C#, Windows, Library ("Class Library (.Net Framework"). <br />Do not select "Class Library"<br /><br /><b>2. Configure your new project:</b><br /><br />Project Name: "<span style="font-family: courier;">NSSystemGlobal</span>"<br /><br />Location: (a dedicated folder of your choosing) <br />For example, "<span style="font-family: courier;">C:\data\source\NSSystemGlobal</span>"<br /><br />Framework: ("<span style="font-family: courier;">.Net Framework 4.72</span>") -- matching your other program(s)<br /></p><p><br /><b>3. Rename default Class</b><br /><br />Results: A new Visual Studio project, with code-view.<br /><br />In Solution Explorer (right-nav), rename the solution, application, and class names. Right-clicking each for the rename menu. ".cs" extensions required, as shown in the rename menus.<br /><br />-Rename the Solution from "ClassLibrary" to "<b>NSSystemGlobal</b>"<br />-Rename the Application Name to "<b>NSSystemGlobal</b>"<br />-Rename the Class.cs to "<b>CLSystemGlobal</b>"</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHf2qKmBosOKXrIIAELJrDcLydZg3Th6pzabPJl5udL1D6l2wm6I0f1SMgiB6m5NYE9GUlz0kHQdB8LT7n0mY2hbww8Bdj1wMUmvvPx9gMxpDtWXK9zWTY8CyVY_1KYdGpvNGEc_6Cs9s-rtSkBB47I8JfebUNdzgy-WwiMQvejxMQ1XpFBzzvP81WtQ/s626/2022-09-DLLRenameSolutionExplorer.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="513" data-original-width="626" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHf2qKmBosOKXrIIAELJrDcLydZg3Th6pzabPJl5udL1D6l2wm6I0f1SMgiB6m5NYE9GUlz0kHQdB8LT7n0mY2hbww8Bdj1wMUmvvPx9gMxpDtWXK9zWTY8CyVY_1KYdGpvNGEc_6Cs9s-rtSkBB47I8JfebUNdzgy-WwiMQvejxMQ1XpFBzzvP81WtQ/w400-h328/2022-09-DLLRenameSolutionExplorer.png" width="400" /></a></div><br /> <b>4. In Code View, confirm or rename</b> the NameSpace and the ClassName, illustrated. <br /><br />Highlight the namespace name, re-type/rename. Then click the "screwdriver" icon on the left margin and select "rename". Similarly, rename the "public class." <i>These may already be named</i>.<br /><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiWy-0il18RkwYzOubnSJIZ4dlkv6B-LGFMnQ3yLnWCGcgChkC5CUtJgCQJuaqcYaRtZH3lXW4RtT7bUpuczljlmEH5t2NTA7OqRKMEutw0G0HBt61rvdYeTj3fNzDY4lAUZ73Dm8znfqXRjEwO-YotQapWhvxH-y9axdRgOVRRgM_TLlaVEZRlQ-AFQ/s760/2022-09-DLL-RenameInCode.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="317" data-original-width="760" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiWy-0il18RkwYzOubnSJIZ4dlkv6B-LGFMnQ3yLnWCGcgChkC5CUtJgCQJuaqcYaRtZH3lXW4RtT7bUpuczljlmEH5t2NTA7OqRKMEutw0G0HBt61rvdYeTj3fNzDY4lAUZ73Dm8znfqXRjEwO-YotQapWhvxH-y9axdRgOVRRgM_TLlaVEZRlQ-AFQ/w400-h166/2022-09-DLL-RenameInCode.png" width="400" /></a></div><br /><p><b>5. From top-menu, select "Project, Project Properties" </b>(NSSystemGlobal Properties)<br /><br />Confirm the AssemblyName and <br />Default NameSpace <br />are both "<span style="font-family: courier;">NSSystemGlobal</span>"<br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNFNwYScbKQrA91jGbO5GoEyeWFXmlSxGQVH-OndotiVen-pLLTzk9VeFlN8P92GIGE8-zOsQFvYNCo0cs77U0-rnkN3p4GSJsUajV2WzL6vMI488mL6j_v17PJSHRszNObco06Z-Cy6IgcpO9usxCJtYNy5xwMlSRJA6wBoeRUG_-40Y4Wdj5yfd_AQ/s867/2022-09-DLL-PropertiesRename2.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="356" data-original-width="867" height="164" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNFNwYScbKQrA91jGbO5GoEyeWFXmlSxGQVH-OndotiVen-pLLTzk9VeFlN8P92GIGE8-zOsQFvYNCo0cs77U0-rnkN3p4GSJsUajV2WzL6vMI488mL6j_v17PJSHRszNObco06Z-Cy6IgcpO9usxCJtYNy5xwMlSRJA6wBoeRUG_-40Y4Wdj5yfd_AQ/w400-h164/2022-09-DLL-PropertiesRename2.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">(Click for larger image)<br /></td></tr></tbody></table><br />In button "<b>Assembly Information</b>", name versions, company, etc. (not illustrated)<br /><p><br /><b>6. Create the methods and variables needed in this class. </b><br /><br /><i>This example demonstrates a simple variable, holding a favorite default server name. Build other functions and methods as needed.</i></p><p>Returning to CLSystemGlobal.cs code view,<br />Directly below the class's opening brace, create a variable for the main database server's name. Notice there is a private and a public version of the name. This follows best practices:<br /><br />(<i>example variable or methods, method not illustrated here</i>)<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI3EZumsA3Vz7RJyecKROxWzLn7MNKx8YVn1rA_HeoPHOwvUEkhMcwdk8itGnnCOwR1SHSErFnYToQrGqPIQHAhjSGC1A4FZdDZn8jHLZ_4syfGysE0kM2whywrHAXopbE-ooweNQPXitWJ2Etr_lsTaXgc5_nHiXEF7qDe713CUfdyISaQapSGANcqw/s903/2022-09-DLL-Variables.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="350" data-original-width="903" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI3EZumsA3Vz7RJyecKROxWzLn7MNKx8YVn1rA_HeoPHOwvUEkhMcwdk8itGnnCOwR1SHSErFnYToQrGqPIQHAhjSGC1A4FZdDZn8jHLZ_4syfGysE0kM2whywrHAXopbE-ooweNQPXitWJ2Etr_lsTaXgc5_nHiXEF7qDe713CUfdyISaQapSGANcqw/w640-h248/2022-09-DLL-Variables.png" width="640" /></a></div><br /><p><b>7. Compile the DLL </b>with these steps:<br /><br />a. From the top-ribbon, change from Debug to "<span style="background-color: #04ff00;">Release</span>"<br />b. From top-menu, Build, "<span style="background-color: #04ff00;">Build Solution</span>"<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLLBq53NQ5qt1zhav75gS5TKglGdIyUj1lf1vA8vKJNi-OfT7v1-mngyM2M8Qb3W-xL1YLfYcmixeJW0K5SiC9EVLPwWHGqcCwIDrvJpQoZvYYgepREtOQEeiMtADEw6etfFSZsDcbq2I2LLB9zW7Ib3obIS1rSJwWW2H-8AKnqzNqurbVGxpWzRVklA/s582/2022-09-DLL-ReleaseFlag.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="256" data-original-width="582" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLLBq53NQ5qt1zhav75gS5TKglGdIyUj1lf1vA8vKJNi-OfT7v1-mngyM2M8Qb3W-xL1YLfYcmixeJW0K5SiC9EVLPwWHGqcCwIDrvJpQoZvYYgepREtOQEeiMtADEw6etfFSZsDcbq2I2LLB9zW7Ib3obIS1rSJwWW2H-8AKnqzNqurbVGxpWzRVklA/w400-h176/2022-09-DLL-ReleaseFlag.png" width="400" /></a></div><p><br /><b>8. Save all changes in the solution</b> and close Visual Studio<br /><br />The DLL is compiled and ready to be copied into other projects. <br /><i>How to see the results are described next</i>.<br /><br /><br /><span style="font-size: large;"><b>Application Steps:</b></span></p><p><b>A. Create a "lib" folder</b><br /><br />Using Windows Explorer, location the project/solution folder, where your application is stored.<br />Create a new folder at the same level as the .sln file. For example, C:\Data\Proj\myWindowsApp1<br /><br />Create FolderName: "<b>lib</b>" (any name, this is a common convention)<br /><br /><b>B. Still in File Explorer, copy the compiled DLL</b><br /><br />- Tunnel to (C:\data\source\NSSystemGlobal) -- the location of the Class project<br />- Tunnel to the <span style="background-color: #fcff01;">\bin</span> folder<br />- File-Copy: <b>NSSystemGlobal.dll</b></p><p>- Paste into (<span style="background-color: #fcff01;">WindowsFormsApp1\lib</span>) / the newly-created "lib" folder<br /><br /><b>C. Launch Visual Studio</b>, <br /><br /><u>open</u> your application, "<b>WindowsFormsApp1</b>"<br /><br /><b>D. In Solution Explorer, add a reference for the new DLL:</b><br /><br />Right-mouse-click, "References", <br />Select "<b>Add Reference</b>"<br />Browse to "<b>\bin\NSSystemGlobal.dll</b>" (the copy in your project's solution)<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGKHXFeQv_fqXrulH4RK8GpSitwI8We_ZlDrGfqH0KIHSX_pjga_uPo3F4INdCM40tGz7c0CPKIL_2wnraYsxzERQTuyFao9G1eRkwfsxTFNdyp5sPXR2T6bouhOn2RnDtd2FXj05nGhOzzpDXcaqNS57tcaKqbbgzR1Y0E_xJb-Dp7WcOHRXLEHeZnA/s478/2022-09-DLL-AddReference.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="238" data-original-width="478" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGKHXFeQv_fqXrulH4RK8GpSitwI8We_ZlDrGfqH0KIHSX_pjga_uPo3F4INdCM40tGz7c0CPKIL_2wnraYsxzERQTuyFao9G1eRkwfsxTFNdyp5sPXR2T6bouhOn2RnDtd2FXj05nGhOzzpDXcaqNS57tcaKqbbgzR1Y0E_xJb-Dp7WcOHRXLEHeZnA/w400-h199/2022-09-DLL-AddReference.png" width="400" /></a></div><br /><p><br /></p><p><b>E. Form1: Code</b> <br /><br />(assuming this class is needed in multiple locations throughout the program)<br /><br />Three steps are needed:<br /><br />1) Add statement, "<span style="font-family: courier;">using NSSystemGlobal;</span>"<br /><br />2) Where class-level variables are defined, declare the class, giving a cosmetic name:<br />"<span style="font-family: courier;">CLSystemGlobal SystemGlobal</span>"<br /></p><p>3) In the form's constructor, instantiate the class:<br />"<span style="font-family: courier;">SystemGlobal = new CLSystemGlobal()</span>;"<br /><br />illustrated:<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgItTVVSS0OM3wkFGt7IAdBcxxUFQI0gsxI1_OawdCDi81vXUOD7222WtEdFoX1JBH6_NiQBssmHeNr9yk66zpjsOXfX_CmDvXZX0VDtfh7dP0CGydQfbnrN2HaCOXBdTB1uMVwPEoGhmDfqxeJ0PfD-7HzlU2htiKElmj_Erwg4p9iWzTlNusuMM7jLA/s570/2022-09-DLL-Coding.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="402" data-original-width="570" height="453" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgItTVVSS0OM3wkFGt7IAdBcxxUFQI0gsxI1_OawdCDi81vXUOD7222WtEdFoX1JBH6_NiQBssmHeNr9yk66zpjsOXfX_CmDvXZX0VDtfh7dP0CGydQfbnrN2HaCOXBdTB1uMVwPEoGhmDfqxeJ0PfD-7HzlU2htiKElmj_Erwg4p9iWzTlNusuMM7jLA/w640-h453/2022-09-DLL-Coding.png" width="640" /></a></div><br /><p>F. Using the Variable<br /><br />To retrieve a SystemGlobal variable, retrieve using this (button1_Click) syntax:<br /><br /><span style="color: #2b00fe;"><span style="font-family: courier;">MessageBox.Show(SystemGlobal.Pub_strMainDatabaseServer);</span></span><br /><br />To use a method (not illustrated in this class): <br /><span style="color: #2b00fe;"><span style="font-family: courier;">SystemGlobal.myMethod();</span></span></p><p><br /></p><p>-end<br /><br />References:<br /><br />Search Amazon for "<a href="https://www.amazon.com/dp/B09QZW6RML?searchxofy=true&binding=kindle_edition&ref_=dbs_s_aps_series_rwt_tkin&qid=1663479862&sr=8-1" target="_blank">War and Peace Programming</a>" - Visual Studio C#. This is a six-volume, 2100 pages, 1100 illustrations, that covers everything a beginning programmer needs to know about writing C# programs. Oh, my gosh, this was a fun book to write!<br /><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcRooaFQzQb0lXZNZrAdggojviYc8OY4_aSEmUJb5elMG4gY12IJeyhl7WjQ0s7CQ9BpbJA8qhJCvwOEEBFQG4xevCr7p6Bv44KNhs2WfnEfpS0r_b9KJ2mnsrzKn4OL38YbwYBLKJOYqObFokXTLck-ZJDpI9AIfV3iBtKudMlMgFbvf3ThQkRfjREw/s3435/EbookV1-3.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3435" data-original-width="2145" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcRooaFQzQb0lXZNZrAdggojviYc8OY4_aSEmUJb5elMG4gY12IJeyhl7WjQ0s7CQ9BpbJA8qhJCvwOEEBFQG4xevCr7p6Bv44KNhs2WfnEfpS0r_b9KJ2mnsrzKn4OL38YbwYBLKJOYqObFokXTLck-ZJDpI9AIfV3iBtKudMlMgFbvf3ThQkRfjREw/w125-h200/EbookV1-3.jpg" width="125" /></a></div><br /><p>See the right-nav for other computer-oriented articles. www.keyliner.blogspot.com</p><p><br /></p><p><br /><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-86137759859521054302022-05-28T05:35:00.000+01:002022-05-29T01:12:51.604+01:00PrizeSelect Raffle Program - downloadable<span style="color: #666666; font-size: 78%; font-style: italic;">Download: Free raffle ticket, prize drawing program with no registration or trials; a simple .exe. This replaces and dramatically improves on an earlier program written in Excel (<a href="http://keyliner.blogspot.com/2010/10/prizeorama-raffle-ticket-selection-in.html">PrizeOrama</a>).</span> <br />
<span style="font-family: "arial"; font-size: 85%; font-style: italic;"> </span>
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5N2z-HovcOFwlwbsjOpdVGbfKjXc7JM8vaZ0MSpA9QSN0GJx-_dfJ-H13PVXhjTVusC5H_YA8kuf0dVFKIbtJRMUumJTKJfcdxTEIDl3_AhgE1W0LobJ9VFm76I10I0xHD35y4EakOh9L/s1600/PrizeSelect_Banner.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5635340357678757042" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5N2z-HovcOFwlwbsjOpdVGbfKjXc7JM8vaZ0MSpA9QSN0GJx-_dfJ-H13PVXhjTVusC5H_YA8kuf0dVFKIbtJRMUumJTKJfcdxTEIDl3_AhgE1W0LobJ9VFm76I10I0xHD35y4EakOh9L/s400/PrizeSelect_Banner.jpg" style="cursor: pointer; display: block; height: 105px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a> <br />
PrizeSelect is a Windows raffle program that randomly selects winners from a pool of contestants and displays the results in real-time on the screen. Fully configurable, with graphics, wallpapers, prize-lists, and numerous options.<br />
<br />
<br />
<div style="text-align: right;">
<span style="color: #cc0000;"><b>Free to download.
</b></span></div>
<div style="text-align: right;">
<span style="color: #cc0000;"><b>No registration, no nagware, no advertisements, no installation.<br />Simple EXE copy for installation.</b></span></div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUAlyPRuZCIXedgr6PRJIL1G3-XUWPrxR7mntGJyzztcZ0SYtZdbIH1xCxCtdVuXeTE06tg_goEVbB4DH4vDH2mQwkNrKE7TxQ4fnXTLQptzVLBfIx5s03vQvrUMeVttB7ml1DclVgLWI9/s1600/PrizeSelect_unadorned1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUAlyPRuZCIXedgr6PRJIL1G3-XUWPrxR7mntGJyzztcZ0SYtZdbIH1xCxCtdVuXeTE06tg_goEVbB4DH4vDH2mQwkNrKE7TxQ4fnXTLQptzVLBfIx5s03vQvrUMeVttB7ml1DclVgLWI9/s400/PrizeSelect_unadorned1.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Running Prize Select, about to give away a car. Click for larger image.</td></tr>
</tbody></table>
<br />
<br />
<div style="text-align: right;">
<b><span face=""arial" , "helvetica" , sans-serif">PrizeSelect understands how a raffle operates</span></b></div>
<div style="text-align: right;">
<b><span face=""arial" , "helvetica" , sans-serif">- especially in front of a live audience </span></b></div>
<br />
<br />
It is designed to be used in front of a live audience and can handle
either raffle-tickets (numbers) or people names. The presenter has
great flexibility in changing which prizes
are awarded, in what order, and you can control repeat-winners and
other
aspects of a raffle. This program knows how raffles should be run.<br />
<br />
2022.05 Minor update: Program re-compiled using Visual Studio 2022 and .dotNet 4.8<br /><br /><br />
<span style="font-size: large; font-weight: bold;">Small Program, Many Features:</span>
<br />
<ul>
<li>Free for all personal and commercial use. <br />No registration or licensing. <br />No Adware<br />No bull<br /> </li>
<li>No hassle installation: <br />Download/Copy the EXE along with a couple of graphics for the wallpaper.<br />Run the exe. An ad-hoc raffle is ready to begin. <br /> </li>
<li>Supports instant ad-hoc (on-the-fly) raffles in either a numbered-ticket or "Person's named" mode. Or, with a little setup, the raffle can be configured, with all contestants and prizes pre-loaded via a simple ascii-text configuration file.
<br />
<br />Multiple configuration files can be used, each with separate prize-lists and other criteria. <br />Once the raffle starts, contestants can be added on-the-fly
</li>
</ul>
<ul>
<li>Winners can optionally be restricted to one (1) win per contest. <br />Changeable on a prize-by-prize basis, or at the whim of the Prize Master.
<br /><br />
For example, when giving away minor prizes, only allow one win per person, but for the Grand Prize, let all contestants be eligible. One mouse-click changes this mode.
<br /> </li>
<li>As names/tickets are drawn, you choose whether to "accept" them as a winner (for a 'Must be present to win' raffle) or if the winner declines the prize, simply draw a new name. Declined names are eligible to win the next prize.
<br /><br />
</li>
<li>Contestants can be unobtrusively removed during an in-progress raffle (when they may have already won another prize).<br /> </li>
<li>Jazz-up the program with user-defined wallpapers. In addition to the default blue wallpaper, illustrated above, you can make your own, company-branded wallpapers. Several are illustrated in this article. <br /> </li>
<li>Fully documented with a 50-page PDF </li>
</ul>
<br />
<br />
<span style="font-weight: bold;">Ticket Sale Features</span>:
<br />
<ul>
<li>Contestants can be entered into the raffle either by selling "raffle-tickets," typically from a roll of numbered tickets, or more by "Name," as in "John Smith."
<br /><br />
</li>
<li><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhiiiIkeaGUaH92P2dfrfqFNDfm6uoRHKxLb2r_J9Quv1ShRzpuDfVihyphenhyphenlDbScPjFn6ZCA_4YCFg_XIjWVHUh_zjRY-EnRrK4KKZQm_alTENuHzzaqg43Wb9gwu3h3gmJeYUUhyphenhyphenMtJ5ALD/s1600/RaffelTicketRoll3.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5635336133121268786" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhiiiIkeaGUaH92P2dfrfqFNDfm6uoRHKxLb2r_J9Quv1ShRzpuDfVihyphenhyphenlDbScPjFn6ZCA_4YCFg_XIjWVHUh_zjRY-EnRrK4KKZQm_alTENuHzzaqg43Wb9gwu3h3gmJeYUUhyphenhyphenMtJ5ALD/s200/RaffelTicketRoll3.jpg" style="cursor: pointer; float: right; height: 58px; margin: 0px 0px 10px 10px; width: 90px;" /></a>Numbered Raffle tickets can be entered en-mass, as one transaction, moments before the raffle starts. For example, you could enter tickets "1000-1546" and the raffle would choose between these numbers.
<br />
<br />Tickets can be entered from multiple, non-intersecting dis-contiguous rolls. Additional tickets can be added after the raffle begins.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJflp5fJ_f6_UkSX6kIpCZi2DmwujmsRshhZ6EtFqmNrJWu5iraFcEUQdqtL_BtFmTZ9MS6dbPJTDdB27q60ilglkiRIZs2m4dM5zPexhYzFscEOPRvtMFLIbYEdBVcRsc6zyVa2LHlp8t/s1600/Adhoc_NumberedTickets.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJflp5fJ_f6_UkSX6kIpCZi2DmwujmsRshhZ6EtFqmNrJWu5iraFcEUQdqtL_BtFmTZ9MS6dbPJTDdB27q60ilglkiRIZs2m4dM5zPexhYzFscEOPRvtMFLIbYEdBVcRsc6zyVa2LHlp8t/s400/Adhoc_NumberedTickets.png" width="400" /></a></div>
<ul>
<li>Of particular interest, numbered tickets can (and should be) sold by "Name."
(using the "Names" method). <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrUQvEmrBOyU52G0t56isKHUwC3ZUkOU7SEfUbtb9bv_0pC2zvXbQZP6i1bHoCqa7UfRXWXxD_dOucWDg27GaNIS8hFEA7v2zzrtSN0ch64OKyXPKTa_7tG48EB23hJrnndrtjkM-yU3VB/s1600/Hello_mynameis.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5635350349346681394" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrUQvEmrBOyU52G0t56isKHUwC3ZUkOU7SEfUbtb9bv_0pC2zvXbQZP6i1bHoCqa7UfRXWXxD_dOucWDg27GaNIS8hFEA7v2zzrtSN0ch64OKyXPKTa_7tG48EB23hJrnndrtjkM-yU3VB/s200/Hello_mynameis.jpg" style="cursor: pointer; float: right; height: 36px; margin: 0px 0px 10px 10px; width: 50px;" /></a>For example, John Smith may have purchased 15 numbered tickets. You don't have to record the numbers!<br /><br />When entering his purchase, type "John Smith x15" -- giving Mr. Smith 15 chances (15 copies of his name in the contestant list). <i>Or, if multiple John Smiths, "John Smith of Accounting x15"</i> <br /><br />Use this method even if you are using numbered tickets. With this, there is no need to track the actual ticket numbers. This is a popular way to use the program with medium to small groups.
</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXLWXyqdQ8m6qrdYy6qG4SSgPnoTqXWkxju-Tb-DB-LtwIK25I8lTDL9rXa_aH6AgQ6rMyhm2lXaDAuoFuRS2kO2TOBnqlWWnEvNU107_D6WCbH82W6KMhdBSCYD0YN2KvDL5Sm5oYQDMK/s1600/AdHoc_Namesx15.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXLWXyqdQ8m6qrdYy6qG4SSgPnoTqXWkxju-Tb-DB-LtwIK25I8lTDL9rXa_aH6AgQ6rMyhm2lXaDAuoFuRS2kO2TOBnqlWWnEvNU107_D6WCbH82W6KMhdBSCYD0YN2KvDL5Sm5oYQDMK/s400/AdHoc_Namesx15.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<ul>
<li>If Mr. Smith later returns to buy 5 more tickets, enter the second transaction ("John Smith x5"). No need to look up the previous purchase. Mr. Smith would now have 20 chances to win. <br /><br /></li><li>Or, tickets can be entered by Number (tickets 1200-1476).<br /><br />
</li>
<li>Contestants can also be entered via a previously built configuration file. <br /><br />For example, for a company party, you could import all employee names and the prizes before the gathering. Then, after the party starts, other names can be added ad-hoc during the raffle. The program warns if duplicate names are found.
<br /><br />All contestants (or tickets) can be edited and viewed from within the raffle program. <br /><br /> </li>
<li>As names are drawn, the chosen name rolls like a slot machine. The actual effect looks neat. Here is a GIF animation that <i>lamely</i> tries to simulate the event (this GIF animation is too slow and does not progress the way the real effect does.... )<br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPD_SuIPfKvzqqeoqr4pqzTIvfGUxrzgbGX1DVw0j24QFhgnncBRhCOUKRgxFUxz-CvE-sxlm4exFPqwMRj4bUKRX9p6390-T3Np3sJLYLgRwj-t4ndNxR8nlUK4SYlCPQQEm_9wzYNKeP/s1600/SlotAnimation.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="78" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPD_SuIPfKvzqqeoqr4pqzTIvfGUxrzgbGX1DVw0j24QFhgnncBRhCOUKRgxFUxz-CvE-sxlm4exFPqwMRj4bUKRX9p6390-T3Np3sJLYLgRwj-t4ndNxR8nlUK4SYlCPQQEm_9wzYNKeP/s320/SlotAnimation.gif" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</li>
<li>A winning numbered-ticket (#2319), and a winning ticket-by-name (Nancy) looks like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOHQL3YtsCwmty4OInMFjSTnXu4MSEF2Mz7xC7bE7rY7WMUvXOkxRHAesO440XsMgNILdF93CfhWb4-hWrlqPAj115LQ57b815gxwnLc-t97nJXu__wN8Ssq9gEl_XbM7jrp9JT6OP0N40/s1600/WinningNumberandName.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOHQL3YtsCwmty4OInMFjSTnXu4MSEF2Mz7xC7bE7rY7WMUvXOkxRHAesO440XsMgNILdF93CfhWb4-hWrlqPAj115LQ57b815gxwnLc-t97nJXu__wN8Ssq9gEl_XbM7jrp9JT6OP0N40/s320/WinningNumberandName.png" width="320" /></a></div>
</li>
</ul>
<span style="font-weight: bold;">Prize-List Features:</span>
<br />
<ul>
<li>Optional Prize lists can be built ahead of time with pictures acting as advertisements, independently of the contestant lists. <br /><br />Custom backgrounds, with your company's livery or other graphics is supported.<br /><br />Each prize can have a graphic, or it can default to a text-version. Here is a different wallpaper, along with a now-dated Playstation prize:<br /> <br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDT_8cc2nPu-JMj6fKKhuq-C1i4ahyphenhyphenr2npR3JhvVD8_CFWPgfaKuc7mHmq0QYh6Wxyrq1vXKw43asgkPF9HbXHzpH1CmMljGOVmJPPCkc5wG8wB19skMkbMjRKUjfS-2KRJO_L4oV4CUbw/s1600/WallpaperExampleChampange.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDT_8cc2nPu-JMj6fKKhuq-C1i4ahyphenhyphenr2npR3JhvVD8_CFWPgfaKuc7mHmq0QYh6Wxyrq1vXKw43asgkPF9HbXHzpH1CmMljGOVmJPPCkc5wG8wB19skMkbMjRKUjfS-2KRJO_L4oV4CUbw/s400/WallpaperExampleChampange.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Different Wallpaper, drawing for a Game Console. Winner not yet awarded.</td></tr>
</tbody></table>
<br />
</li>
<li>Prizes can be with and without illustrations. Those without illustrations are displayed as text in the center of the screen.<br /> </li>
<li>Prizes can be raffled in a preset order or prizes can be selected at-will from a list, at the whim of the Prizemaster.<br /> </li>
<li>Unannounced, unplanned, ad-hoc prizes can be awarded via an "unspecified prize." The Prize-master can switch between the original prize-list and ad-hoc prizes with a mouse-click.
<br /><br />
</li>
<li>Prizes can optionally and automatically move to the next "available prize" as winners are chosen -- or the next prize can remain hidden until the Prize-master chooses to expose it.
<br /><br />
</li>
<li>Awarded prizes are automatically removed from the Prize List so there is no risk of accidentally awarding twice.
<br /><br />
</li>
<li>Accepted winners are recorded to a transaction file for later reporting. In the event of a power failure, results are safely recorded. The original and modified contestant list is backed up with each new ticket transaction and can be recovered up to the point of failure within moments.
<br /><br />
</li>
<li>If a predetermined prize-list is not available, or if all "known" prizes are exhausted, the program switches to an "unspecified prize mode" without interruption. This allows the Prize Master to give away ad-hoc prizes, as Prize-masters and MC's often like to do.
</li>
</ul>
<span style="font-weight: bold;">
<br /><span style="font-size: 180%;">Downloading:</span></span>
<br />
<br /><div style="margin-left: 40px; text-align: left;">To install this program, download the .exe and place in any folder on
your hard disk. Double-click the .exe to run - no installation
required. <br /></div> <br /><div style="margin-left: 40px; text-align: left;">Since keyliner cannot afford a signing certificate,
you will be prompted that the file is not safe (being downloaded from
the internet). Click "more information" and allow the program to run.<br /></div><br /><u>Follow these steps for a more professional installation</u>:<br /><br /><div style="margin-left: 40px; text-align: left;">Using the .exe from a download folder, or copying to a (my Documents) folder is a quick workaround for various Windows 10 and 11 security concerns. Some vendors recommend this, but these folders are inappropriate for executable software. Instead, the program should be copied to Program Files so it gains the protection of other Windows security features. Total time: about a minute.<br /><br /></div><b>A. Download the .exe to a Download or Temp folder</b>:<br /><p></p><p style="margin-left: 40px; text-align: left;">From Keyliner's public GDrive, click this link and download to a local temp or download directory. <i>Do not download directly into ProgramFiles</i>. <br /></p><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s45/DownloadIcon_Small.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="45" data-original-width="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s0/DownloadIcon_Small.png" /></a></div><p>Download Link: Version 1.08<br />Folder link: <a href="https://drive.google.com/drive/folders/0B9DmF5P2DykTUTgzdV9yN3NjMEk?resourcekey=0-UrjzQ2lRsLjObr6Ftss_RQ&usp=sharing" target="_blank">Folder Link</a> - contains standalone .exe and other downloads.<br /><br />File Link: <a href="https://drive.google.com/file/d/0B9DmF5P2DykTUllNTXBRRHhHLXc/view?usp=sharing&resourcekey=0-D6WkH3wvo_1ZE9Y--KSn1Q" target="_blank">AllFilesInOne.zip</a> - includes sample wallpaper, etc. Recommended.<br /></p><div class="separator" style="clear: both; text-align: center;">
</div><p>
</p><p style="margin-left: 40px; text-align: left;">prizeselect.exe MD5 check:<i><br /><span style="font-family: courier;">01-c1-81-be-8d-23-f6-a1-f4-a8-71-9e-a2-0d-a1-c5</span><br />
</i><br />SHA-256:<br />fcc8b435d84220a9dfb3ea6f24de85dc84a7141685de61ad4407c5e0fa843a78<br /><br />When downloading, different browsers behave differently. <br />You will be prompted the file cannot be scanned. Click "Download anyway"<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s498/2021-05-DirectoryPulseCantScan.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="123" data-original-width="498" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s320/2021-05-DirectoryPulseCantScan.png" width="320" /></a></div><p style="margin-left: 40px; text-align: left;">Microsoft Edge:<br /></p><p style="margin-left: 40px; text-align: left;">Prompts "DirectoryPulse.exe" was blocked because it could harm your device. <br /></p><p style="margin-left: 40px; text-align: left;">"Click See More" and allow the download. With Edge, the file will appear in your Downloads directory with a random name, "<span style="background-color: #04ff00;">Unconfirmed 780359.crdownloaded</span>" (name varies). <br /><br />Rename the file to "DirectoryPulse.exe".<br /></p><p style="margin-left: 240px; text-align: left;">This link
opens a directory, which includes the executable, wallpapers and
instruction guide. Each can be downloaded separately or download the
all-inclusive .zip file. To download, other-mouse click the file's
name. </p><p><br /><b>B. Mark the program as safe-to-run</b>:<br /></p><p style="margin-left: 40px; text-align: left;"><i>(This step may not be needed if downloaded by Edge and you clicked "More / Download Anyway")</i><br /></p><p style="margin-left: 40px; text-align: left;">Using File Explorer, right-mouse-click the downloaded (and re-named) .exe <br />Select "Properties" <br />Check [x] Unblock. <i>This removes the "mark of the web."</i> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s615/2021-05-DirectoryPulseMarkOfWeb.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="615" data-original-width="604" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s320/2021-05-DirectoryPulseMarkOfWeb.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"> Click for larger view<br /></td></tr></tbody></table><p></p><p style="margin-left: 40px; text-align: left;">* Only do this if you trust
keyliner *and* only if downloaded from keyliner's public GDrive. <br /></p><p style="margin-left: 40px; text-align: left;">If
"Unblock" is not visible, it has already been unlocked (by Microsoft
Edge). <br />Once [x] Unblocked is clicked, this security menu disappears.<br /><br /></p><p> <b>C. Create a Program folder to hold the program</b>:<br /></p><p style="margin-left: 40px; text-align: left;">Using File Explorer, open folder C:\Program Files, <br />Create a folder <span style="font-family: courier;">C:\Program Files\PrizeSelect</span><br /></p><p><br /><b>D. Copy the .exe to ProgramFiles\PrizeSelect</b>:<br /></p><p style="margin-left: 40px; text-align: left;">Using File Explorer, <br />Copy/paste the .exe from the temporary/download folder <br /> to C:\Program Files\PrizeSelect<br /></p><p style="margin-left: 40px; text-align: left;"><i>Do this copy as a <u>two-step</u>,
copying from the download folder into Program Files. Windows security
will not let you download directly into Program Files (technically, you
will not be able to remove the "mark of the web" if downloaded directly
into Program Files).</i><br /></p><p><br /><b>E. Create a Start Menu Tile</b>:<br /></p><p style="margin-left: 40px; text-align: left;">Using File Explorer, in C:\Program Files\PrizeSelect <br />Right-mouse-click the executable and "Pin to Start"<br /></p><p> <br /><i>The program is ready to run. See icon on Start Menu.</i></p><p><i><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8UG4mpzw7zDIZ3uRgwPvoTlfwGi8IsTbrnlbtpGKZEvfaSxPi4JpJezKEpTAuLTEIDYLz3Lkjv6polTZck2kFz97IsFD7A0fQsLZWsdq7Nm95SrrIZS4bA6eeDySH2dTN95Vov7CpW6ha/s1600/Acrobat_IconMed.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5635346403161159442" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8UG4mpzw7zDIZ3uRgwPvoTlfwGi8IsTbrnlbtpGKZEvfaSxPi4JpJezKEpTAuLTEIDYLz3Lkjv6polTZck2kFz97IsFD7A0fQsLZWsdq7Nm95SrrIZS4bA6eeDySH2dTN95Vov7CpW6ha/s200/Acrobat_IconMed.jpg" style="cursor: pointer; float: left; height: 47px; margin: 0px 10px 10px 0px; width: 47px;" /></a><span style="color: #666666; font-size: 85%; font-style: italic;">I
recommend downloading the Installation/User-guide (PDF) and wallpaper
files -- especially the default wallpaper. The "All-in-one zip" contains the executable, several wallpapers and complete documentation
and sample files. It is a small download. </span><br />
<br />
</i></p><div style="text-align: right;">
<span style="color: #666666; font-size: 85%; font-style: italic;">Most of the features in this program are somewhat hidden</span><br />
<span style="color: #666666; font-size: 85%; font-style: italic;"> in order to give the program good "curb-appeal" </span></div>
<div style="text-align: right;">
<span style="color: #666666; font-size: 85%; font-style: italic;">The PDF demonstrates various scenarios on how to best use the program,</span></div>
<div style="text-align: right;">
<span style="color: #666666; font-size: 85%; font-style: italic;">along with a list of helpful tips and tricks</span>
</div>
<br />
<i style="color: #38761d;">Try it out:<br /><br />You can literally download the EXE; double-click it and start using it now, for a quick test. It will prompt for a ticket-number range and will assume an 'unspecified prize list.' Begin drawing samples within 20 seconds.<br /></i><p><i> </i><br /><span style="font-style: italic;">The remainder of this post highlights some of the most commonly-used features. The installation PDF has full details, including great examples and best practices. </span>
<br />
<br />
<br />
<span style="font-size: large; font-weight: bold;">Feature Details:</span>
<br />
<br />
Contestant names can be copied and pasted into a configuration file, typically from Excel. Names can also be imported from one or more external ASCII files, allowing automated population. Typically, links are made to external lists, such as club-memberships, school rosters, etc.
<br />
<br />
Individual names can also be added on-the-fly, as in this screen shot (note the holiday themed wallpaper):
<br />
<br />
</p><div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiExnFMCDbsMR0FC5OmZcYqf_0ViRDRH3-5-xecyic_bClLAiYsnPuThBKaHZvd4tyisMiRcodfWxWlmsJI6GOkITfDcjUBYIap_DVmlZgJ_p6Daix-oxBAvrtEPX-Bw3yBKq3oJRfptjhi/s1600/1011_PrizeSelect_newname.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5543735632855692354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiExnFMCDbsMR0FC5OmZcYqf_0ViRDRH3-5-xecyic_bClLAiYsnPuThBKaHZvd4tyisMiRcodfWxWlmsJI6GOkITfDcjUBYIap_DVmlZgJ_p6Daix-oxBAvrtEPX-Bw3yBKq3oJRfptjhi/s400/1011_PrizeSelect_newname.jpg" style="cursor: pointer; display: block; height: 219px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a> <span style="color: #666666; font-size: 78%;"><span style="font-style: italic;">Click image for larger view, "Back" to return</span>
</span></div>
<br />
Once names / raffle-numbers are added, the contestant list can be modified with rename, delete and find-duplicates. This is a screen shot showing a contestant list, along with a different wallpaper:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDKt-YnTg0c7deQ6AQTVZSR8wP3toSQP8AVlpDObPClWRJFgAPduRd__8LdxK0iEcVwPrv8B3Hhmhnf_zjfaf3_FNmo6mFjka3nExyxdaemwby1FOEXA56ZUfZwDbp-LrZP3AI5Ef8xKDx/s1600/AdHoc_ListAllOptions.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="380" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDKt-YnTg0c7deQ6AQTVZSR8wP3toSQP8AVlpDObPClWRJFgAPduRd__8LdxK0iEcVwPrv8B3Hhmhnf_zjfaf3_FNmo6mFjka3nExyxdaemwby1FOEXA56ZUfZwDbp-LrZP3AI5Ef8xKDx/s640/AdHoc_ListAllOptions.png" width="640" /></a></div>
<br />
<br />
<span style="font-weight: bold;">Standard Raffle Ticket Drawings:</span>
<br />
<br />
Prize Selections can be started in an ad-hoc mode (on the fly, without configuration). This is particularly useful for traditional raffle-ticket drawings where you are using rolled-tickets. Data-entry for the tickets is easy, where you enter all the tickets in one transaction.
<br />
<br />
Illustrated, tickets #13456 through 13521 are being added in one step:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJflp5fJ_f6_UkSX6kIpCZi2DmwujmsRshhZ6EtFqmNrJWu5iraFcEUQdqtL_BtFmTZ9MS6dbPJTDdB27q60ilglkiRIZs2m4dM5zPexhYzFscEOPRvtMFLIbYEdBVcRsc6zyVa2LHlp8t/s1600/Adhoc_NumberedTickets.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJflp5fJ_f6_UkSX6kIpCZi2DmwujmsRshhZ6EtFqmNrJWu5iraFcEUQdqtL_BtFmTZ9MS6dbPJTDdB27q60ilglkiRIZs2m4dM5zPexhYzFscEOPRvtMFLIbYEdBVcRsc6zyVa2LHlp8t/s400/Adhoc_NumberedTickets.png" width="400" /></a></div>
<br />
Multiple ticket ranges are supported, as are multiple rolls, and dis-contiguous numbers. Sold tickets can be managed from an inventory screen, in this case, showing numbered tickets instead of names:
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR8c9ipfDUYMNXSzV2F3wRZjux2RG-FZzNAp3Rwj20sK2SBjb4KtN5Kcoo0GOiVdlhCk4mNXNbJEXIWl8tjHluIDFltfRe2Byek06b7C4k3LwfDAftbbUmaaT7bvbo8-DFk4H7DpG3nVMm/s1600/ListAllListByNumbers.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="325" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR8c9ipfDUYMNXSzV2F3wRZjux2RG-FZzNAp3Rwj20sK2SBjb4KtN5Kcoo0GOiVdlhCk4mNXNbJEXIWl8tjHluIDFltfRe2Byek06b7C4k3LwfDAftbbUmaaT7bvbo8-DFk4H7DpG3nVMm/s400/ListAllListByNumbers.png" width="400" /></a></div><p>
Tickets can be entered by name, e.g., John Smith, or John Smith x15 (purchased 15 tickets). You cannot mix the two different types of data-entry.<br /></p><p style="margin-left: 80px; text-align: left;">From the download library, be sure to download the 50-page PDF User's Guide. This explains all features, including how to use graphics with the prizes, and how to pre-load the contestant lists.<br /></p><p><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqs-Rj2EDbiTGodNL2GK9hO7gXwJhsbqmDuU9DIdy7skEfZogrloInkHDxlPGNUR-UCQ8K6vS2Smfr_SrfT-yFQF3sd8O4eKpLD5u4NF7ls5u7-GcluynCEEJPfQWR4xH_EvbsMTaT-mZS/s1600/ApprovedStamp.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5635342147580561682" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqs-Rj2EDbiTGodNL2GK9hO7gXwJhsbqmDuU9DIdy7skEfZogrloInkHDxlPGNUR-UCQ8K6vS2Smfr_SrfT-yFQF3sd8O4eKpLD5u4NF7ls5u7-GcluynCEEJPfQWR4xH_EvbsMTaT-mZS/s200/ApprovedStamp.jpg" style="cursor: pointer; float: left; height: 76px; margin: 0px 10px 10px 0px; width: 105px;" /></a>
<br />
Version History:
<br />
<span style="font-size: 78%;">Full details in the Installation PDF guide.
<br /></span><br /><br /><br />2022.0528<br />1.08 Recompiled with Visual Studio 2022 Dot Net 4.8. No other changes.<br /><br />
2015.1220<br />
<span style="color: #666666;"><span style="color: black;">1.07 Recompiled with Visual Studio 2015. <br /></span></span><span style="color: #666666;"><span style="color: black;"><span style="color: #666666;"><span style="color: black;">Added a self-signed certificate, but it will still show as an unknown author. <br /></span></span>Everyone clamored for user-defined wallpaper, which was finally added. <br />Added cool support for changing "One win per contestant" switch, on the fly, controlled by inventory -- this means no more screw-ups by your Prize Master/Master of Ceremonies. <br />Fixed bug by adding "x5" support in both INI files and in Files=import.text. <br />Improved font sizes in several areas. <br />Expanded and enhanced documentation; included new screenshot illustrations. </span> </span><br />
</p><p>1.05 Added Slot-machine effect while names are being drawn. <br />Changed the "List All" page, adding more options. <br />Improvements in documentation.<br /><br />1.04 Added support for copying Winner list to clipboard. <br />Modified
"Autoadvance to next Prize" to behave more smoothly when on an
"unspecified prize"; it automatically advances to a new Unspecified
prize even if auto-advance is disabled. In practice, this feels more
natural during an impromptu prize-give-away.
<br />
</p><p>
1.03 Added support for "Discard All". <br />Added support for non-ranged, single-raffle-ticket data entry. <br />Fixed bug when loading backup.ini files which contained non-ranged numbers.
<br /><br />
1.02 Initial Release
</p><div style="text-align: right;">
<span style="color: #38761d;"><b>I have had fun writing this program. </b></span></div>
<div style="text-align: right;">
<span style="color: #38761d;"><b>If you use it, drop me
a note and tell me how it went. </b></span></div>
<div style="text-align: right;">
<br /></div><span style="background-color: #fcff01;">
Learn how to write a program like this</span>.<br />Search Amazon for "War and Peace Programming" - Programming in C#. These are keyliner's books, written for beginning programmers. <br /><br /><br />
<span style="font-style: italic;">Related articles and links:</span><br /> <br /><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s45/DownloadIcon_Small.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="45" data-original-width="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s0/DownloadIcon_Small.png" /></a></div>Download Link:<br />Folder link: <a href="https://drive.google.com/drive/folders/0B9DmF5P2DykTUTgzdV9yN3NjMEk?resourcekey=0-UrjzQ2lRsLjObr6Ftss_RQ&usp=sharing" target="_blank">Folder Link</a> This includes the all-in-one .zip<br /><br />File Link: <a href="https://drive.google.com/file/d/0B9DmF5P2DykTUllNTXBRRHhHLXc/view?usp=sharing&resourcekey=0-D6WkH3wvo_1ZE9Y--KSn1Q" target="_blank">AllFilesInOne.zip</a><br /><a href="http://keyliner.blogspot.com/2010/10/prizeorama-raffle-ticket-selection-in.html">PrizeOrama - Raffle-ticket selection in Excel</a>
<br />
<br />traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com30tag:blogger.com,1999:blog-1585105787473796476.post-76060399827435422712022-04-03T03:26:00.024+01:002023-10-06T04:08:38.407+01:00EarlKeeper - Track bookmarks across browsers, across machines<p style="text-align: left;">EarlKeeper - Track bookmarks, servers, and folders, across multiple browsers, across multiple machines with this keyliner-developed program. <br /><br />Traditional browser bookmarks are chaotic and don't help with user-IDs or passwords. You can't add descriptions or notes. You can't search. With traditional bookmarks, building folders and organizing is a nuisance, and after a few dozen, they become a pile. <br /><br />Imagine being able to track hundreds(!) of bookmarks and effortlessly find them without folders and without concern on which browser or machine you are using. Welcome to "Earl Keeper" (URL keeper). Toss-in any-old webpage, find it later. <br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgimajgXcmTfEyJgjharUfyhlV0TEPFf1Gb7wJmN0k_XQNhZ-dfys1754sInijuJg8sOgWBwvbdUfXBIEEDiIRzsl5ewdwxA2tPOyqgBOWJXKOe4mGF1Mc9M6HqvzX0MKS_rEdSqMy7qqMHDUie93pIdt0YUzFKJRDfzKfkWCYdphTOFD7I93eozQbWYQ/s1245/EarlKeeper-Illustrated1.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="662" data-original-width="1245" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgimajgXcmTfEyJgjharUfyhlV0TEPFf1Gb7wJmN0k_XQNhZ-dfys1754sInijuJg8sOgWBwvbdUfXBIEEDiIRzsl5ewdwxA2tPOyqgBOWJXKOe4mGF1Mc9M6HqvzX0MKS_rEdSqMy7qqMHDUie93pIdt0YUzFKJRDfzKfkWCYdphTOFD7I93eozQbWYQ/w400-h213/EarlKeeper-Illustrated1.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><p style="text-align: left;"><b><u>Features</u></b>:<br /></p><ul style="text-align: left;"><li>Quickly(!) organize by category, by short-description, by long-description</li><li>Search by word, phrase, category, date, domain, last-used</li><li>Store up-to 2,000 bookmarks; find any one in a few keystrokes</li><li>Keep notes for each bookmark <br /></li><li>Double-click the bookmark to launch <br /><br /></li><li>Works cross-browser. This is a stand-alone program. </li><li>Saves locally and syncs with OneDrive, if available.<br /></li><li>Automatically shares across multiple machines. The list is always local and re-syncs the next time you are connected to OneDrive (if available).<br /><br /></li><li>Remembers user-ID's and passwords, and can load the clipboard for an easy paste</li><li>Encrypted<br /><br /></li><li>Make new entries by simply dragging and dropping a new URL's onto the list</li></ul><p style="margin-left: 160px; text-align: left;"><i>I admit this is a strange program. It takes
a few days to get used to it and understand its goal in life. The key to a fruitful relationship is to throw everything at it. If you say, "this page is interesting" or, "I want to read this later," then this is the program for you. The more it has, the more useful it becomes</i>. I track non-URL things here too.<br /></p><p><u><b>EarlKeeper is free</b></u><br />No installation. <br />No nagware<br />No advertisements<br />No registration. <br />Runs locally. Does not call the mother-ship. <br /></p><p style="margin-left: 80px; text-align: left;">This is a keyliner-developed program, using the techniques found in
my book, "<a href="http://keyliner.blogspot.com/2020/04/war-and-peace-programming-in-c.html" target="_blank">War and Peace Programming in C#</a>". I wrote this program
because I was irritated at everyone else's bookmarks.</p><p></p><p><u>How to use</u>: <br />Drag a URL on-top of the program. <br />Add a few descriptive notes. <br />Optionally add User/ID's, passwords, clipboard rules, and 2Factor reminders.</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-hda2nIGFxKfpa1pvCuEGmwSbQ0J44ULhH_YHGx9-4_tMSspGoZ5CWYyzReajZonGETY8vJ4cB7bBVunhnsy6hRqwaqyDnggg_7muOpAKpguhBCsbNHFWuTwc5LqFdGMI31Ixj6JKSsoiS06jpz72sMWWPSDkM3nXn2Q7Sp0R1U9JBXZlO40Wu3S1CA/s1028/EarlKeeper-EditIllustrated.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="553" data-original-width="1028" height="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-hda2nIGFxKfpa1pvCuEGmwSbQ0J44ULhH_YHGx9-4_tMSspGoZ5CWYyzReajZonGETY8vJ4cB7bBVunhnsy6hRqwaqyDnggg_7muOpAKpguhBCsbNHFWuTwc5LqFdGMI31Ixj6JKSsoiS06jpz72sMWWPSDkM3nXn2Q7Sp0R1U9JBXZlO40Wu3S1CA/w400-h215/EarlKeeper-EditIllustrated.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><br /><p></p><p></p><p></p><p><u>To find a bookmark</u>:<br /><br />Type any old bit of text in the search box. The list shrinky-dinks down to your entry.<br />Sort by date, category, description, order-added, etc.<br />Double-click to launch.<br />Ctrl-Double-click to load the clipboard with the UserID and password.<br /><br />Super-fast to find any bookmark. No need for folders. No worries about different browsers.<br /><br />The "bookmarks" can follow you to any Windows computer, synchronizing with OneDrive. EarlKeeper runs with a local encrypted ASCII database and requires only a teeny bit of memory. <br /></p><p>Nothing fancy here - just straight-forward ASCII files, arrays, and some thoughtful programming. </p><br /><p><u><b><span style="font-size: large;">Installation:</span></b></u><br /></p><p style="text-align: left;">Installation
is easy: <br />Download the .exe and place in any folder on your hard disk.
<br />Double-click the .exe to run - no installation required. <br /></p><p style="margin-left: 40px; text-align: left;">Since
keyliner cannot afford a signing certificate, you will be prompted that
the file is not safe (being downloaded from the internet). Click "more
information" and allow the program to run.<br /></p><p><br /><u>Follow these steps for a more professional install</u>:<br /></p><p style="text-align: left;"><i>Using
the .exe from a download folder, or copying to (my Documents) folder is
a quick workaround for various Windows security concerns.
Some vendors recommend this, but these folders are inappropriate for program files. Instead, the program should be copied to Program Files so it
gains the
protection of other Windows security features. Total time: less-than a
minute.<br /></i></p><p><b>A. Download the .exe to a Download or Temp folder</b>:<br /></p><p style="margin-left: 40px; text-align: left;">From Keyliner's public GDrive, click this link and download to a local temp or download directory. <i>Do not download directly into ProgramFiles</i>. <br /></p><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s45/DownloadIcon_Small.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="45" data-original-width="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s0/DownloadIcon_Small.png" /></a></div><p>Download Link<br /><a href="https://drive.google.com/file/d/1AKyBUWNVymAzjKSWi20AhZZERLixiUxe/view?usp=sharing">https://drive.google.com/file/d/1AKyBUWNVymAzjKSWi20AhZZERLixiUxe/view?usp=sharing</a><br /><br /></p><p style="margin-left: 40px; text-align: left;">EarlKeeper.exe MD5 Checksum for Version 1.04:<br /><span style="font-family: courier; font-size: x-small;">MD5: e4-58-7d-c5-e7-7a-f7-0c-3a-fc-d0-f5-c8-e4-24-97<br />SHA256: a4f48c099aab30a3f18dbdcbc7317f564f41796acc11a9a465ccc5656c580677<br />Len: 686K</span><span style="font-size: x-small;"><br /></span></p><p style="margin-left: 40px; text-align: left;">When downloading, different browsers behave differently. <br />You will be prompted 'file cannot be scanned.' Click "Download anyway". <br />For, example:<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s498/2021-05-DirectoryPulseCantScan.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="123" data-original-width="498" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s320/2021-05-DirectoryPulseCantScan.png" width="320" /></a></div><p style="margin-left: 40px; text-align: left;">Microsoft Edge Downloads:<br /></p><p style="margin-left: 80px; text-align: left;"><span style="color: #666666;">Prompts "EarlKeeper.exe" was blocked because it could harm your device. <br /></span></p><p style="margin-left: 80px; text-align: left;"><span style="color: #666666;">Click "See More" and allow the download. </span><br /></p><p style="margin-left: 80px; text-align: left;"><span style="color: #666666;">With Edge, the file appears in your Downloads directory with a random name, "<span style="background-color: #04ff00;">Unconfirmed 780359.crdownloaded</span>" (name varies). </span><br /></p><p style="margin-left: 80px; text-align: left;"><span style="color: #666666;">Use File Explorer to rename to "EarlKeeper.exe".</span><br /></p><p><br /><b>B. Mark the program as safe-to-run</b>:<br /></p><p style="margin-left: 40px; text-align: left;"><i>(This step may not be needed if downloaded by Edge and you clicked "More / Download Anyway") <br /><br /></i>Using File Explorer, right-mouse-click the downloaded (and re-named) EarlKeeper.exe<br />Select "Properties"<br />Check [x] Unblock. (This removes the "mark of the web.") </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s615/2021-05-DirectoryPulseMarkOfWeb.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="615" data-original-width="604" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s320/2021-05-DirectoryPulseMarkOfWeb.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"> Click for larger view<br /></td></tr></tbody></table><br /><div style="margin-left: 40px; text-align: left;">* Only do this if you trust
keyliner *and* only if downloaded from keyliner's public GDrive. <br /></div><br /><div style="margin-left: 40px; text-align: left;">If
"Unblock" is not visible, it has already been unlocked (by Microsoft
Edge).<br />Once [x] Unblocked is clicked, this security menu disappears.<br /> <br /></div><div style="text-align: left;"><p><b>C. Create a Program folder to hold the program</b>:<br /></p><div style="margin-left: 40px; text-align: left;">Using File Explorer, open folder C:\Program Files, <br /></div><div style="margin-left: 40px; text-align: left;">Create a folder <span style="font-family: courier;">C:\Program Files\Util<br /><span style="font-family: times;">(or any other folder)</span><br /></span></div></div> <br /><b>D. Copy the .exe to ProgramFiles\Util</b>:<br /><br /><div style="margin-left: 40px; text-align: left;">Using File Explorer, <br />Copy/paste the downloaded .exe from the temporary/download folder to <br />C:\Program Files\Util (or directory of your choosing)<br /></div><br /><div style="margin-left: 120px; text-align: left;"><i>Do this copy as a <u>two-step</u>,
copying from the download folder into Program Files. Windows security
will not let you download directly into Program Files (technically, you
will not be able to remove the "mark of the web" if downloaded directly
into Program Files).</i><br /></div><br /><b>E. Create a Start Menu Tile</b>:<br /><br /><div style="margin-left: 40px; text-align: left;">Using File Explorer, tunnel to C:\Program Files\util<br />Right-mouse-click the executable and "Pin to Start"<br /></div><p style="margin-left: 40px; text-align: left;"><i>The program is ready to run. See icon on Start Menu.<br /><br /></i></p><p><u><b><span style="font-size: normal;">Try it:</span></b></u><i> </i><br /></p><p><span style="font-size: normal;"><span style="font-size: normal;">1. Download and launch EarlKeeper.exe <br /><br />2. Leaving the window open, go to a browser and drag a URL on-top of the target icon on the main EarlKeeper panel.<br /><br />3. Fill in demographic goodies to help you find this record again. Save.<br /><br />4. If a UserID or password demographics are saved, the Launch button turns green. Ctrl-Click when launching to have EarlKeeper put the UID into the clipboard. After a short delay, the password loads into the clipboard and it is ready for a paste. Listen for a beep between the two events. (This replaces other clipboarded items.)<br /><br />5. Next, EDIT any saved URL that has a UID and password. Press Ctrl-C (Copy) three times. Note how it jumps from one field the the next. This is a an alternate way to get passwords into the clipboard. I'm kind'a proud of this design.<br /><br /><u>Second Computers</u>:<br /><br />On a second computer, and assuming the same OneDrive / Microsoft account, install EarlKeeper. It will automatically pull the other machine's backup copy and populate all records. The two machines will stay in sync.<br /><br /><br /><u>Under the Hood</u>:<br /><br />This program uses OneDrive but it will work full-featured without a OneDrive account. Configuration and changes are then limited to this one machine.<br /><br />From the main panel, click the Settings Icon (Gear icon) to add new Categories:<br />e.g. ReadLater, Recipies, Work, Personal, etc.<br /></span></span></p><p><span style="font-size: normal;"><span style="font-size: normal;">For a specific entry, EarlKeeper can launch the bookmark using one of four preferred browsers, usually for backwards compatibility. From the settings screen, add new browsers (firefox, IE, etc.). Most bookmarks can ignore this setting and just use the default browser.<br /><br />Configuration files are saved as clear-text ASCII. <br />See folder: C:\Users\(your account)\Prefs\Earlkeeper. This folder also contains the previous <span style="background-color: #f3f3f3;">10-days</span> backups for emergencies. An offline backup can be found in a similar location in OneDrive.<br /><br />UserID's and Passwords are encrypted in clear-text. Encryptions are salted and unique to you. Keyliner is unable to decrypt. Comments and Notes are *not* encrypted. Contact me directly if you have problems in this area.<br /></span></span></p><p><span style="font-size: normal;"><span style="font-size: normal;">Version 1.04 - <br />Added minor feature: Enter on Search jumps cursor into the grid. If only one URL is in the grid, it auto-launches that webpage. <i>A minor problem: The auto-launch is not sensitive to the Control-key being held-down and does not load the clipboard. I've not figured out how to resolve this yet</i>.<br /><br />Version 1.03 -<br />Added ability to tab from search into the grid, arrow-key, then press ENTER to launch.<br />Increased from 1000 rows to 2000 rows; trying to be mindful of the memory consumed.<br /><br />Version 1.02 - <br />Fixed problem when installing on new machine: Unable to write to C:\users\<you>\prefs.<br />Tiny change to how the OneDrive path is found; now uses the OneDrive Environment variable instead of <UserProfile>\OneDrive.<br /><br />Version 1.01 - <br />Fixed bug where CreateDate was not populating on Add New<br /><br />Version 1.00 - <br />Initial Release 2022.04<br /><br /><br />I hope you enjoy using this program and welcome comments.<br /></span></span></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-13071516460097246842022-02-17T06:01:00.018+00:002024-01-22T03:00:27.615+00:00WordPerfect 2021 - Why this instead of Word?<div><span style="color: #666666; font-size: 78%;"><span style="font-style: italic;">WordPerfect 2021.<br />Article originally written for version X5, then version X9, now version 2021.</span></span>
<br />
<br />
I'll keep comments short, because most of you are snickering - WordPerfect? <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEirqssm9S-sjSV6XYlXMYBJu8lzA5MYafuk9p4eVvvzmSfWy7XMDmjQ7mO6lBFwOcU3DpTqS5baC-1yu_xFIH8t-G-i5sbqeFOhmU-EW0LWREMkCCCRdaRYEXsv7gFRXQwMJxXeQzCwotKqb_1ljxAcic06rDsQT7AyHLmln8AqaL4RiJU--enxb_kQ6Q=s945" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="298" data-original-width="945" height="126" src="https://blogger.googleusercontent.com/img/a/AVvXsEirqssm9S-sjSV6XYlXMYBJu8lzA5MYafuk9p4eVvvzmSfWy7XMDmjQ7mO6lBFwOcU3DpTqS5baC-1yu_xFIH8t-G-i5sbqeFOhmU-EW0LWREMkCCCRdaRYEXsv7gFRXQwMJxXeQzCwotKqb_1ljxAcic06rDsQT7AyHLmln8AqaL4RiJU--enxb_kQ6Q=w400-h126" width="400" /></a></div><br />I know this: In another window, I am editing a 650 page document with 300 illustrations. Not once have I lost a graphic or been confused with tab-settings. I do not curse at my computer while writing.<br />
<br />
Tabs, margin-releases, indented paragraphs, hanging indents, footnotes, headers and footers, along with word-wrapped graphics -- all work as you would hope, with no friction. If you are fiddling with the ruler-bar each time you need an indented list or header, then you are working too hard -- and I'd bet you are using Microsoft's Word.
<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEir5MU2cW-rt51UT0VLYLursJBrCpd0nIkCa9M3SnR-gwv92pWGeLNlswNU6kUmuCegcZL0seQnGHfDJ4GvnUklMjPMZfpVAtRdoSXMkjJBCjY9WscTSqN529yR3yCBENPVpESLooOcUpF00NDxsKNK6pXJedtT5HqZo4URU-b8Jbopq7RdmsaE0DBv8A=s456" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="97" data-original-width="456" height="68" src="https://blogger.googleusercontent.com/img/a/AVvXsEir5MU2cW-rt51UT0VLYLursJBrCpd0nIkCa9M3SnR-gwv92pWGeLNlswNU6kUmuCegcZL0seQnGHfDJ4GvnUklMjPMZfpVAtRdoSXMkjJBCjY9WscTSqN529yR3yCBENPVpESLooOcUpF00NDxsKNK6pXJedtT5HqZo4URU-b8Jbopq7RdmsaE0DBv8A=s320" width="320" /></a></div><br />
<br />WordPerfect <span style="font-style: italic;">understands</span> word processing; it is not an after-thought.<br /><br /><div style="margin-left: 80px; text-align: left;"><i>2021 Update: WordPerfect is now at Version 2021. Almost the same menus, same
features as their first Windows version. This is better than Word. And t</i><i><i>he price is right. Buy the Home/Student version for around $60. </i></i><br />
</div><div><br /></div><div style="margin-left: 80px; text-align: left;"><i>2020.06 Update: I just finished writing my 2,200
page book, 6 volumes, 1,200 illustrations using Word Perfect: Search
Amazon for "<a href="http://keyliner.blogspot.com/2020/04/war-and-peace-programming-in-c.html" target="_blank">War and Peace Programming in C#</a>".<br /></i></div><br /><br />
In Word, have you ever back-spaced an entire word just to get rid of a bold or underline that wouldn't go away? In WordPerfect, this doesn't happen. WP exposes everything about the document, using a feature called "Reveal Codes", where *all* hidden codes are viewable, as you are editing. <br /><br />This is why people use WordPerfect.<br /><br /><b>Reveal Codes, Illustrated, with sample text</b>:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjrxYxA_1LHOfpKzTWJPNlSqQcVRNR4joP0V2re5BvDpWNMhbjeXDmgTKlPKISciDdwyZJkdD6muVH8mDdCrb9XyjMI4dcA7vNn9c6sXIicW2a6p_zlR4XxL1xYASR6-xec8pcq080o4i7hCpO0Jv_cHKjRYRO6xY5lo7q1s419vkFgDXIg_tU1Rv9vpw=s694" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="405" data-original-width="694" height="234" src="https://blogger.googleusercontent.com/img/a/AVvXsEjrxYxA_1LHOfpKzTWJPNlSqQcVRNR4joP0V2re5BvDpWNMhbjeXDmgTKlPKISciDdwyZJkdD6muVH8mDdCrb9XyjMI4dcA7vNn9c6sXIicW2a6p_zlR4XxL1xYASR6-xec8pcq080o4i7hCpO0Jv_cHKjRYRO6xY5lo7q1s419vkFgDXIg_tU1Rv9vpw=w400-h234" width="400" /></a></div><br />In practice, this is not as strange as it seems. Reveal Codes only take up about 5% of the screen, at the bottom, out-of-the-way. But they are glorious. You get to see the bolds, underlines, margin-releases, and paragraph-block protect codes. <u>Anything</u> you can do to a word, sentence, or even an individual character, is visible.
These codes are unobtrusive and do not clutter your editing window. At-a-glance, they are always visible (if you expose this feature - and everyone exposes them - this is why they use WordPerfect).<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhgSuMNv57pJ1Qqrw1zl9KBsbzNmxXoXbml9AglHJvKRTtrU2g1zTTa4UE39ZlZ8dT0-YuACrHCmAJeT7Yo2qJUAmWuPXwyUqLrvlsPe8Wv-PinRJbXQWqVE18Y2tNcL1HUk4K0lfNhGo8UIGW9HQhstSJwxmx0Pf7O0X9JmsdN7rCmdxyFDnzdPCfQfg=s527" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="452" data-original-width="527" height="343" src="https://blogger.googleusercontent.com/img/a/AVvXsEhgSuMNv57pJ1Qqrw1zl9KBsbzNmxXoXbml9AglHJvKRTtrU2g1zTTa4UE39ZlZ8dT0-YuACrHCmAJeT7Yo2qJUAmWuPXwyUqLrvlsPe8Wv-PinRJbXQWqVE18Y2tNcL1HUk4K0lfNhGo8UIGW9HQhstSJwxmx0Pf7O0X9JmsdN7rCmdxyFDnzdPCfQfg=w400-h343" width="400" /></a></div><br /><div><p style="margin-left: 40px; text-align: left;">
Compare this to Microsoft Word, which can show tabs, carriage-returns, and a few other measly codes -- but that is all. How many times have you wished you could see the bullet-list codes so they could be deleted? And worse, when Word shows its 'codes,' it clutters the editing space like a train-wreck.<br /></p><p style="margin-left: 40px; text-align: left;">Word's "codes" are sad:
<br /></p><p style="text-align: left;">
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqDLoo_GImp9iDRwYsPJ5AsLaKALtOqB39aR3GvcZKv3h6uR6VmubmqOhQTmMNetoxxO03BaoihDPSsRoKliigf0K7Nkf4PwVe7CjAFyojhnkAvlf3JNZPhQFqxUInixQ_dF1X3ddgszJD/s1600/1101_WP_WordView.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5558943980562433218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqDLoo_GImp9iDRwYsPJ5AsLaKALtOqB39aR3GvcZKv3h6uR6VmubmqOhQTmMNetoxxO03BaoihDPSsRoKliigf0K7Nkf4PwVe7CjAFyojhnkAvlf3JNZPhQFqxUInixQ_dF1X3ddgszJD/s400/1101_WP_WordView.jpg" style="cursor: pointer; display: block; height: 167px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a></p><p><br />
<span style="font-size: large; font-weight: bold;">WordPerfect Home and Student Edition:</span>
<br />
<br />I buy the Home/Student edition. You get the following: <br />
</p><ul>
<li><b>WordPerfect</b> </li><li><b>Full Oxford Dictionary and Thesaurus</b></li>
<li>Presentation - similar to Powerpoint</li>
<li>Quattro - Spreadsheet, similar to Excel</li>
<li>Lightning - a Note-taker program</li><li>Aftershot Pro - a snazzy photo organization <br /></li>
</ul>
<br /><div style="margin-left: 40px; text-align: left;">
All Corel programs can read-and-write Microsoft Office formats (docx, xlsx, ppt), but when writing, I keep my documents in the native WPD format because it handles formatting better. <br /><br />The other programs, particularly Presentation and Quattro-the-spreadsheet, are probably swell, but I just use the word processor, dictionaries, and the photo organizer. <br /><br /></div><div style="text-align: left;">You can buy, and out-right-own, an entire office suite for about the price a year's subscription to O365.
<br /></div>
<br /><br />
<span style="font-size: 130%;"><span style="font-weight: bold;">WordPerfect is not Word - here is why</span></span>
<br />
<br />
WordPerfect operates differently than Word. Here are the important points:
<br />
<ul>
<li>Take 5 minutes and learn Reveal Codes.
<br /><br />
</li>
<li>Font changes, tab, margin, etc, happen at the cursor and flow through the bottom of the document (or until stopped by a replacement/related code). <br />
<br />No need to highlight a 17 page document to change a document's font. Move to the top of the document, and change the font. Same with line spacing, default tab settings, and others. <br /><br />Change in the middle of the document, and that change takes affect from that page, onward. No fuss. In other words, it is easy to change things like headers and footers mid-document, and previous pages are unaffected! This is noticeably different than Word, where all codes are tied to the highlighted paragraph. <br /><br />
</li>
<li>When highlighting a sentence, paragraph, or page, make a change -- and only the highlighted area is changed. Everything else remains the same -- this includes margin changes! All the other original settings "flow" around the highlighted change. Wow! A breath of sanity. Are you listening, Microsoft?<br /><br />This means a tab-change only needs to be made once -- at the place and text where you want it. No need to reset the remainder of the document back to the old tab-settings. Word is confused here. <br /><br />
</li>
<li>When changing a block of text's font, margin, or other settings, conflicting codes within the highlight are removed and replaced with the new settings. It cleans itself. This is exactly what you want. <br /><br /></li>
<li>Font changes can be made with 'relative' sizes. Select "Small", "Large", "Extra-Large". <br />This way, if the default font changes from 12 points to 10, all of the resizes happen automatically. This flows through font changes, from Arial to Century Schoolbook, etc.<br />
</li></ul><ul style="text-align: left;"><li>Graphics work as expected. Drag anywhere on the page, with no restrictions on Left, Right, Middle. No fiddling. They can be anchored to a (paragraph) and given an exact size and/or relative position. WP has dozens of graphic settings; Word has 5. Do you need this stuff? Maybe. Writing a text book sure proved the need.<br /> </li>
<li>Numbered and bullet lists work. No surprises. And all is visible in Reveal Codes. Do you want two paragraphs tied to one bullet. No problem. Do you want the bullets aligned with the with the left margin, rather than indented? Done. Word blows my mind every time it starts mis-numbering a paragraph.<br /><br />
</li>
<ul><ul><li>For indented and hanging paragraphs, like this one, press F7 to indent. <br />It just works. No fiddling with rulers or tabs. Press Shift-tab to out-dent (margin release). <br /><br />Unlike Word, indents can move more than one tab-stop - making deeply-indented paragraphs. Press F7 twice for two indents; tap-tap. Hang paragraph headers on the left-side of the margin with a Shift-F7 keystroke - a margin release just like the old days. <br /><br /></li></ul></ul>
<li>Text can be centered with the mouse and the ruler-bar -- <b>but nobody bothers</b>. Instead, they use keystrokes: Shift-F7 (center). Alt-F7 right justifies. No fiddling with the ruler bar!<br /><br />Interestingly, a line can have left-justified, centered, and right-justified, all on the same line. For example, consider this common page footer, which as near as I can tell, is impossible to do in Word:<br /><br /><b><span style="font-family: arial;">My School Paper Page 7 Wolf, Johnson, and Smith</span></b><br /><br />To build this, select the 'Footer' menu and just start tying. At the 'Page number', press Shift-F7 (center) and type what you want, inserting a code for the 'current page' -- <i>yes! you can center in the middle of a sentence</i>! For the third phrase (the author names), type Alt-F7 (right-justify) and start typing. Again, type this stuff right in the middle of the sentence. No mouse. No margin changes. No fiddling with ruler-bars. It adjusts with changes to margins and font changes.<br /><br />
</li>
</ul><a href="https://blogger.googleusercontent.com/img/a/AVvXsEikGKbc7Wqyjk6lL773bV6S2s9LaxIMBDirxeLV3pYvqwdfBmJuBmB3pZiCHiSvHVJs-YiSp29oW6Q4LYl4I7Set6CJXhxSr8Ine2SrsCOuozlNF5h0Ek0Of0_xHCt1hnbtp82msRJXymjHDZOBF0bJrbkprKa1oAVrS9G-kuZjyrjT9ukVEiz0S27K0Q=s997" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="225" data-original-width="997" height="144" src="https://blogger.googleusercontent.com/img/a/AVvXsEikGKbc7Wqyjk6lL773bV6S2s9LaxIMBDirxeLV3pYvqwdfBmJuBmB3pZiCHiSvHVJs-YiSp29oW6Q4LYl4I7Set6CJXhxSr8Ine2SrsCOuozlNF5h0Ek0Of0_xHCt1hnbtp82msRJXymjHDZOBF0bJrbkprKa1oAVrS9G-kuZjyrjT9ukVEiz0S27K0Q=w640-h144" width="640" /></a><br /> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div>As you would expect, it can read and edit Microsoft Office Documents, Open office, and 40 other formats. It has full PDF features (writing to PDF is built in). <br />
<br />
You can legally load it on your desktop and laptop at no additional charge (see license). <br /><br />
<br /><b>After Installing, make this one change:</b><br /><br /></div><div><div style="margin-left: 40px; text-align: left;">When first installing, make this one, <span style="background-color: #fcff01;">highly-recommended change</span>:<br />Tools, Settings, Display:<br /><span style="font-weight: bold;">Set mouse to be active in Text<br /></span> <br /></div><div style="margin-left: 40px; text-align: left;">(This way, it doesn't add a new tab (white space), just because you clicked in a blank area of the page. <i>I wish Corel would default this setting. Trust me on this; it makes the program behave more naturally.</i>)<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv-qxeJLKyDR5ySd4FAWVaKA3FoBkZ0mmHyq22facFtjsju8q9Rc0RPuCyXgh9spRoxmiv_ci6OCPk2NgGrOZUzK47GFggeU5B5yzFv9XYpkXZ876N7YBVBNw0PqfWMnd3mhPQ2mxzDHI_/s1600/1101_WP_RequiredSettings.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5558951553566766370" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv-qxeJLKyDR5ySd4FAWVaKA3FoBkZ0mmHyq22facFtjsju8q9Rc0RPuCyXgh9spRoxmiv_ci6OCPk2NgGrOZUzK47GFggeU5B5yzFv9XYpkXZ876N7YBVBNw0PqfWMnd3mhPQ2mxzDHI_/s320/1101_WP_RequiredSettings.jpg" style="cursor: pointer; display: block; height: 246px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a> <br /><b>Learn these keystrokes</b><br /></div><div style="margin-left: 40px; text-align: left;"> (I call these sanity keystrokes, and they save you from fiddling with the ruler-bar and these are the only keystrokes you need to remember -- although there are dozens of others...):<br /><br /><span> </span>F7 - Paragraph Indent<br /><span> </span>Shift-Tab - Margin Release, Paragraph Outdent<br /><span> </span>Shift-F7 - Center<br /><span> </span>Alt-F7 - Right-justify<br /><span> </span>F9 - Font menu<br /></div><div style="margin-left: 40px; text-align: left;"><br /></div><div style="text-align: left;">I had so much fun writing my programming books, I wrote a book about using WordPerfect to write books. Search Amazon for "<a href="https://www.amazon.com/Adventures-WordPerfect-Writing-Books/dp/B0CRZD2QPR" target="_blank">Adventures with WordPerfect</a>"<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBOIC3eAo8Tuxmou4xFBnajQ_pEUMtkb6_mimVQMiKBOcxm7auyQqZvlzc5LzjczbQXERZUUWg_ppo-eYWqCfx6ztrMVuFjOT_UkGERPSGHrLAg6I9luSY4L6e0FWIdJ2241leqU-ugFIRArPnTr_XjEuANQz1EJ2uujBMFgLjQ3C87IYtWt6olG7wVEJp/s2483/PaperFrontCover.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2483" data-original-width="2139" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBOIC3eAo8Tuxmou4xFBnajQ_pEUMtkb6_mimVQMiKBOcxm7auyQqZvlzc5LzjczbQXERZUUWg_ppo-eYWqCfx6ztrMVuFjOT_UkGERPSGHrLAg6I9luSY4L6e0FWIdJ2241leqU-ugFIRArPnTr_XjEuANQz1EJ2uujBMFgLjQ3C87IYtWt6olG7wVEJp/s320/PaperFrontCover.jpg" width="276" /></a></div><br /><div style="margin-left: 40px; text-align: left;"><br /></div>
<span style="font-size: 130%;"><span style="font-weight: bold;">Final Thoughts:</span></span>
<br />
<br />
If your new PC came with an expired trial version of Microsoft Office, consider WordPerfect Office. I recommend using the Home/Student edition as you likely don't need the Standard, Professional, or Legal versions. <br />
<br />
You will get a capable spreadsheet (not quite Excel, but not bad),
and a fabulous word processor, along with other software and training
materials. <br />
<br />
30-day trial, downloadable from Corel.com.
<br />
<br />
Write one term paper, or one long document with footnotes, graphics and font changes, and you will be hooked. Things like printing envelopes and mail-merges work easily and intuitively. <br /><br /><div style="margin-left: 80px; text-align: left;">I literally wrote a 2,200-page book, with 1,300 embedded illustrations, automatic table-of-contents, and full indexing. I spent most of my time writing. Very little formatting.</div>
<br />
<br />
Related Articles:
<br />
<a href="http://keyliner.blogspot.com/2011/07/wordperfect-hanging-indents-paragraph.html">WordPerfect - Hanging Indents / Paragraph Headers</a>
<br />
<a href="http://keyliner.blogspot.com/2011/07/wordperfect-protect-text-across-page.html">WordPerfect - Block Protect Text Across Page Breaks</a>
<br />
<a href="http://keyliner.blogspot.com/2011/07/using-wordperfect-for-school-papers.html">WordPerfect - Using WP for School Papers - Page Numbering</a> ** go here
<br />
<br />
2022: Article updated to include references to newer versions<br /></div>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com3tag:blogger.com,1999:blog-1585105787473796476.post-52668429630119275172022-02-04T04:29:00.095+00:002022-12-31T00:08:30.718+00:00Midy5 - MD5 SHA-256 CheckSum Finder<p>Midy5 - Show a file's MD5 or SHA-256 checksum<br /><br />An MD5 or SHA-256 are calculated values of a file's checksum and can show if a file has been modified. Use this free keyliner utility to display the file's internal checksums, showing both the MD5 and the SHA-256. The program is affectionately named "Midy5".<br /><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfiSfzO529H7FGTswLy2rs1XcDMnq8z-R8-2nuDo2zLqb1-fGuhkHT5GcrmrHg4FaTAPa-iVZhx89ddvFcjxNTuC1r5-xc7AfrUxozeBnBvkAIfRvjF_Kr4K4yfiYuPZFTQ7zwScG709S4UoNsV6w3dJU1b5513mGgX9DoraRCYbjOLQ6LQ7HVjrNvQQ/s936/2022-02-Midy5-Illustrated3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="421" data-original-width="936" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfiSfzO529H7FGTswLy2rs1XcDMnq8z-R8-2nuDo2zLqb1-fGuhkHT5GcrmrHg4FaTAPa-iVZhx89ddvFcjxNTuC1r5-xc7AfrUxozeBnBvkAIfRvjF_Kr4K4yfiYuPZFTQ7zwScG709S4UoNsV6w3dJU1b5513mGgX9DoraRCYbjOLQ6LQ7HVjrNvQQ/w400-h180/2022-02-Midy5-Illustrated3.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Click for larger view<br /></td></tr></tbody></table><br /><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><p style="text-align: left;">(MD5 is an older style; SHA-256 keys are more cryptographically secure. This program shows both.)<br /><br /></p><p style="text-align: right;">No registration, no login, no required email.<br />No advertisements, no nags, no spying. Does not call the mothership.<br />Free for personal and commercial use.<i> </i><br /></p><p style="text-align: left;"><br /><u>The Need</u>:<br />Often vendors publish the checksum for their files. When you download the file, say from Source Forge, or other distribution sites, compare the original vendor's published MD5 with your copy. If different, you know the
file was changed and the download should be viewed with suspicion. <br /><br />For example, a picture's MD5 checksum might be<br /><span style="font-family: courier;">File: SomeFile.png<br />MD5: <b>f2-4b-ae-fc-37-e8-85-a5-0e-41-3a-3e-9a-60-3a-d0</b><br /></span><br />Changing one-pixel from a ghostly-light-gray to white results in a wildly-different MD5-hash:<br /><b><span style="font-family: courier;">MD5: 33-94-8b-b0-82-bc-a2-f4-e2-51-35-43-8f-ae-dd-a9<br /></span></b><span style="font-size: medium;"><span style="font-size: small;"><br />Files copied to a different drive, will get a different date-stamp, and the file can be renamed, but both copies retain the same MD5 / SHA-256. By looking at the hash, you would know they were identical files.<br /><br /></span></span>Checksums can also show if a file was corrupted or changed by other legitimate processes since it was last checked. A file re-copied (with new date-stamp) may be the identical file, or may be changed. The checksum is able to tell.<br /></p><p style="text-align: left;"><b><span style="font-size: medium;">Midy5 Features</span></b></p><ul style="text-align: left;"><li><span style="font-size: medium;"><span style="font-size: small;">Retrieves any file's MD5 or SHA-256 checksum<br /></span></span></li><li><span style="font-size: medium;"><span style="font-size: small;">Results can be copied to the clipboard</span></span></li><li><span style="font-size: medium;"><span style="font-size: small;">Drag-and-drop files from File Explorer, or browse to the file<br /></span></span></li><li><span style="font-size: medium;"><span style="font-size: small;">Pass filename from the command-line</span></span></li><li><span style="font-size: medium;"><span style="font-size: small;">At a glance compare two files checksums, Date-time, file size</span></span></li><li><span style="font-size: medium;"><span style="font-size: small;">A small executable, fast, easy-to-use</span></span></li></ul><br /><div style="margin-left: 160px; text-align: left;"><i>This program was written as a personal project and became Chapter 4 in keyliner's Student and Instructor workbook, "<a href="http://keyliner.blogspot.com/2020/04/war-and-peace-programming-in-c.html" target="_blank">War and Peace - Programming in C# Volume 6</a>". Learn how you can write this program yourself</i>!<br /></div><br /><u><b><span style="font-size: medium;">Installation Steps: </span></b></u><br /><br /><div style="margin-left: 40px; text-align: left;">No registration, no login, no required email.<br />No advertisements, no nags, no spying. Does not call home.<br />Free for personal and commercial use.<i> <br />keyliner does not (and cannot) track who downloads or runs this program</i>.<br /></div><div><div><div><div><p style="margin-left: 40px; text-align: left;">Installation
is easy: Download the .exe and place in any folder on your hard disk.
Double-click the .exe to run - no installation required. <br /></p><p style="margin-left: 40px; text-align: left;">Since
keyliner cannot afford a signing certificate, you will be prompted that
the file is not safe (being downloaded from the internet). Click "more
information" and allow the program to run.<br /></p><p><br /><u>Follow these steps for a more professional installation</u>:<br /></p><p style="text-align: left;"><i>Using the .exe from a download folder, or copying to (my Documents) folder is
a quick workaround for various Windows 10 and 11 security concerns. Some vendors recommend this, but these folders are inappropriate for executable
software. Instead, the program should be copied to Program Files so it gains the
protection of other Windows security features. Total time: about a minute.<br /></i></p><p><b>A. Download the .exe to a Download or Temp folder</b>:<br /></p><p style="margin-left: 40px; text-align: left;">From Keyliner's public GDrive, click this link and download to a local temp or download directory. <i>Do not download directly into ProgramFiles</i>. <br /></p><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s45/DownloadIcon_Small.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="45" data-original-width="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6DBK_UDtDPQrQlmALggeN9DlKZEx405LrF7VDT2IhjFPe2IoeduFk3tA20WXNb5A2dqnIsAYGnc7Xn55SF4RdSViNTXSf8UVBJUQE2RjGM4W8zwyYq6VlDyNzOvegUBpe_oas1-gCrr8/s0/DownloadIcon_Small.png" /></a></div><p>Download Link<br /><a href="https://drive.google.com/file/d/1QGeawJH9v0HrbsFqwg1z-WNd8kxeNcuA/view?usp=sharing">https://drive.google.com/file/d/1QGeawJH9v0HrbsFqwg1z-WNd8kxeNcuA/view?usp=sharing</a><br /><br /></p><p style="margin-left: 40px; text-align: left;">Ironically, I used this program to publish the download's own MD5:<br />Midy5.exe, Version 1.04<br /><span style="font-family: courier;">MD5:c3-19-68-a8-9b-5e-c0-c2-81-74-f7-5e-3d-8a-74-55<br /><br />SHA256: 0f7f278d8f90aa8616eeb1bd0c392a065bd4c63338ee423c306f5a504a1d9427<br /></span></p><p style="margin-left: 40px; text-align: left;">When downloading, different browsers behave differently. <br />You will be prompted 'file cannot be scanned.' Click "Download anyway". <br />For, example:<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s498/2021-05-DirectoryPulseCantScan.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="123" data-original-width="498" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2-8SjVBUJM3ZcumbzLzfAMQCUS6-uvU2_BufnRIsnf8FA_rWHnhDDQJ3oIcNljjGEB8BQh8HJOGnKdaR45M5i8R7cXVuOEp5i8T3Yzc4_ydWK00Sui6eqMnjdWQUnYudcnGDcrQZOD2Y/s320/2021-05-DirectoryPulseCantScan.png" width="320" /></a></div><p style="margin-left: 40px; text-align: left;">Microsoft Edge Downloads:<br /><span style="color: #666666;">Prompts "Midy5.exe was blocked because it could harm your device."<br /></span></p><p style="margin-left: 80px; text-align: left;"><span style="color: #666666;">Click "See More" and allow the download. </span><br /></p><p style="margin-left: 80px; text-align: left;"><span style="color: #666666;">With Edge, the file appears in your Downloads directory with a random name, "<span style="background-color: #04ff00;">Unconfirmed 780359.crdownloaded</span>" (name varies). </span><br /></p><p style="margin-left: 80px; text-align: left;"><span style="color: #666666;">Use File Explorer to <u>rename</u> the file to "Midy5.exe".</span><br /></p><p><br /><b>B. Mark the program as safe-to-run</b>:<br /></p><p style="margin-left: 40px; text-align: left;"><i>(This step may not be needed if downloaded by Edge and you clicked "More / Download Anyway") <br /><br /></i>Using File Explorer, right-mouse-click the downloaded (and re-named) Midy5.exe<br />Select "Properties"<br />Check [x] Unblock. (This removes the "mark of the web.") </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s615/2021-05-DirectoryPulseMarkOfWeb.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="615" data-original-width="604" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0vfM8PJGbyhR58Gg1i7COz2e4lNLtNFH5zuh40jmGJsjcH9RfQCYxPd5l-KJFonhRt-QOmyx5SNweb6q-VsMRitqxGlJNTzDnJ6U8gdYMyN7EC0rfSEU6BPIFf3TzI68nnHi7zq__eIW2/s320/2021-05-DirectoryPulseMarkOfWeb.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"> Click for larger view<br /></td></tr></tbody></table><br /><div style="margin-left: 40px; text-align: left;">* Only do this if you trust
keyliner *and* only if downloaded from keyliner's public GDrive. <br /></div><br /><div style="margin-left: 40px; text-align: left;">If
"Unblock" is not visible, it has already been unlocked (by Microsoft
Edge).<br />Once [x] Unblocked is clicked, this security menu disappears.<br /> <br /></div><div style="text-align: left;"><p><b>C. Create a Program folder to hold the program</b>:<br /></p><div style="margin-left: 40px; text-align: left;">Using File Explorer, open folder C:\Program Files, <br /></div><div style="margin-left: 40px; text-align: left;">Create a folder <span style="font-family: courier;">C:\Program Files\Util</span></div></div> <br /><b>D. Copy the .exe to ProgramFiles\Util</b>:<br /><br /><div style="margin-left: 40px; text-align: left;">Using File Explorer, <br />Copy/paste the downloaded .exe from the temporary/download folder to <br />C:\Program Files\Util (or directory of your choosing)<br /></div><br /><div style="margin-left: 40px; text-align: left;"><i>Do this copy as a <u>two-step</u>,
copying from the download folder into Program Files. Windows security
will not let you download directly into Program Files (technically, you
will not be able to remove the "mark of the web" if downloaded directly
into Program Files).</i><br /></div><br /><br /><b>E. Create a Start Menu Tile</b>:<br /><br /><div style="margin-left: 40px; text-align: left;">Using File Explorer, in C:\Program Files\util<br />Right-mouse-click the executable and "Pin to Start"<br /></div><p style="margin-left: 40px; text-align: left;"><i>The program is ready to run. See icon on Start Menu.<br /><br /></i></p><p><u><b><span style="font-size: medium;">Try it out:</span></b></u><i> </i><span style="font-size: medium;"><span style="font-size: small;"><br /></span></span></p><p style="margin-left: 40px; text-align: left;"><span style="font-size: medium;"><span style="font-size: small;">1. Download and launch Midy5.exe <br />2. Open File-Explorer. Locate any file and click and drag it on top of Midy5 <br />3. In all its glory, review the MD5 checksum</span></span><br /></p><p>Version 1.04 - Added ctrl-N to launch Notepad. Added an Icon .ico file.<br />Version 1.03 - Added support for SHA-256<br />Version 1.02 - Tiny change to internal variable name. Small cosmetic change on panel.<br />Version 1.01 - Initial Release<br /><br /><br /><br /><span style="font-size: medium;"><span style="font-size: medium;"><span style="background-color: #fcff01;">Write this program yourself!</span><br /></span><span style="font-size: medium;"><span style="font-size: medium;"><span style="font-size: small;">"<span style="font-size: medium;"><a href="http://keyliner.blogspot.com/2020/04/war-and-peace-programming-in-c.html" target="_blank">War and Peace - Programming in C# Volume 6</a></span>" <br /><br />(<i>Student/Instructor workbook, Project 4. Search Amazon.com for "War and Peace Programming</i>")</span></span></span></span><b><span style="font-size: medium;"><br /><br /><br /><br />Related links</span></b></p><p><span style="font-size: medium;"><span style="font-size: small;">keyliner wrote a command-line version of this same idea, except this version can view and inventory entire directories, showing which files have changed, which are new, or deleted. This utility was meant for volatile folders, usually in a corporate environment.<br /><br />Link: <a href="http://keyliner.blogspot.com/2017/06/file-md5-checksum-how-to-tell-if-file.html" target="_blank">File MD5 Checksum Inventory</a> (batch MD5)<br /><br />Link: <a href="https://keyliner.blogspot.com/2021/05/directorypulse-keyliner-backup-software.html" target="_blank">keyliner file backup software</a><br /></span><br /></span><span style="font-size: medium;"><span style="font-size: medium;"><span style="font-size: small;"><br />Leave a comment and tell me how you like the program.<br /></span></span></span><br /></p></div></div></div></div>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-1146566351974641022022-02-02T04:32:00.003+00:002022-02-04T01:47:24.633+00:00Windows Event ID 137 Error The System Firmware has changed the processor's memory type<p>Windows Event ID 137 Error The System Firmware has changed the processor's memory type range registers (MTRRs) across a sleep state transition (S4). This can result in reduced resume performance.<br /><br /><b><u>Discussion</u>:</b><br /><br />This event always happens when the computer goes from <u>sleep</u> to <u>hibernation</u>. The event is not considered worrisome. <br /><br />Sleep is a low-power state, but RAM is still active. Hibernation is a no-power state and it writes RAM to disk and can recover at the same place, even if power is lost. See more about this, below.<br /> </p><p style="margin-left: 40px; text-align: left;"><i>It is a poorly-written event, which should not even be recorded if the
machine is going into hibernation. Of course it will result in slower
performance -- that is the definition of hibernation!</i><br /></p><p><br /><b><u>Diagnostics</u>:</b><br /></p><p style="margin-left: 40px; text-align: left;">Windows 10/11 no longer expose the hibernation file in a control panel. Optionally, and unimportantly, you can look to see if Hibernation is enabled. It is enabled by default on all Windows installs.<br /></p><p style="margin-left: 40px; text-align: left;">Using <b>File Explorer</b>, on the ribbon bar, click the ellipsis, <b>Options</b> <br />In Options, click the [View] tab.<br />Check "[x] Show hidden files, folders, and drives"<br />Uncheck "[ ] Hide extensions for known file types"<br />Uncheck "[ ] Hide protected operating system files"<br />Ignore warnings.<br />Click OK.<br /></p><p style="text-align: left;"></p><p style="margin-left: 40px; text-align: left;">Using File Explorer, browse to the root of the C: drive.<br />If you have a large file, "hiberfil.sys" -- this is the hibernation file and it is enabled.<br /></p><p style="text-align: left;"><br /><b><u>Solution</u>:</b><br /><br />Consider disabling the hibernation file if you are on a <u>desktop</u>. Do this especially if a UPS Battery backup is present. I turn this off on all desktops.<br /><br />However, if you have a <u>laptop</u>, I do not recommend disabling hibernation. This feature is used when you close the lid and jump on an airplane. Laptops will have to accept the Event ID 137.<br /><br /><b>Disable hibernation steps:</b><br /><br />1. Click Start, type/search "CMD", Run as Administrator<br />2. At the DOS Prompt, type this command:<br /><br /><b><span style="font-family: courier;">powercfg /hibernate off</span></b><br /><br />You are done. <br /><br />Note the C:\hiberfile.sys file is deleted.<br /><br /></p><p style="text-align: left;"><u>Related articles</u>:<br /><br />For other Windows 11 Tuning tips, see<br /><a href="https://keyliner.blogspot.com/2021/11/windows-11-tuning.html"><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/">https://keyliner.blogspot.com/2021/11/windows-11-tuning.html<br /><br /></span></span></span></a></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><a href="https://keyliner.blogspot.com/2022/01/windows-event-id-2505-server-could-not.html" target="_blank">Windows Event ID 2505</a> - Could not bind to transport<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-2-session.html" target="_blank">Windows Event ID 2</a> - Windows.Remediation<br /><a href="https://keyliner.blogspot.com/2022/02/windows-event-id-137-error-system.html" target="_blank">Windows Event ID 137</a> - System firmware has changed the processors...<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10010-did-not.html" target="_blank">Windows Event ID 10010</a> - Did not register with DCOM<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10016-warning.html" target="_blank">Windows Event ID 10016</a> - permission settings do not grant, could not bind</span></span></span></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><br /><br /></span></span></span></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-16564817848657396602022-01-31T05:15:00.010+00:002022-02-02T04:36:00.489+00:00Windows Event ID 7043 AsusUpdateCheck Service did not shutdown properly<p>Windows Event ID 7043 AsusUpdateCheck<br />The AsusUpdateCheck service did not shut down properly after receiving a preshutdown control<br /><br /><b><u>Discussion</u>:</b><br />This message only happens on workstations running an Asus-brand motherboard (in my case, a PRIME Z390-A). The AsusUpdateChecker runs as a Windows service and cannot be disabled via normal techniques.<br /><br />No matter how hard you try to disable this service, it re-appears, and is active.<br />It generates frequent errors in the Event Logs, especially at startup.<br /><br /><span style="color: #666666;">These attempts all failed:<br />a. Start, Run, "SERVICES.msc". Disable the AsusUpdateCheck service<br />b. In MSConfig, unchecking in Services<br />c. In Task Manager, Services<br />d. Delete/rename C:\Windows\system32\AsusUpdatecheck.exe (cannot be renamed/deleted)<br />e. Delete this Registry key: HKLM\Software\Microsoft\Shared Tools\MSConfig\Services\(asus)<br />f. Booting in Safe Mode and deleting or replacing the file.</span><br /><br />It appears the motherboard/hardware can reach inside the disk and re-enable. The file is re-installed if missing. If I were a virus, this is where I would want to live. This service is tenacious.<br /><br /><b><u>Solution</u>:</b><br /><br />1. Cold-boot the computer, press F2 at hardware banner to enter into BIOS setup<br /><br />2. Open "Advanced" settings<br /> Tools<br /> Look for <b>"ASUS Q-Installer"</b>. Disable<span style="color: #666666;"><br /></span></p><p style="margin-left: 40px; text-align: left;"><span style="color: #666666;">On older ASUS motherboards, disable in BIOS "Armory Crate", or "ASUS Grid Install Service" These may also be in Add-remove-programs; I do not have these boards and could not test.</span><br /></p><p>3. Boot into Windows normally<br /><br />4. Start, type/search "services.msc". Run as administrator<br />5. Locate the AsusUpdateChecker Service. Set to Disabled.<br /><br /><br /><b>Possible Drawback:<br /></b></p><p style="margin-left: 40px; text-align: left;">By disabling, you will have to manually retrieve and install BIOS updates from the Vendor's website. Honestly, you want to do it this way because after (a year), the vendor is unlikely to have a BIOS update ever again. No sense checking for updates 15 times per day.<br /></p><p style="margin-left: 40px; text-align: left;">As of 2022.01, ASUS PRIME Z390-A BIOS is at version: 2021/05/11 12.0.81.1753v4<br /><br /></p><p style="text-align: left;"><u>Related articles</u>:<br /><br />For other Windows 11 Tuning tips, see<br /><a href="https://keyliner.blogspot.com/2021/11/windows-11-tuning.html"><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/">https://keyliner.blogspot.com/2021/11/windows-11-tuning.html<br /><br /></span></span></span></a></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><a href="https://keyliner.blogspot.com/2022/01/windows-event-id-2505-server-could-not.html" target="_blank">Windows Event ID 2505</a> - Could not bind to transport<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-2-session.html" target="_blank">Windows Event ID 2</a> - Windows.Remediation<br /><a href="https://keyliner.blogspot.com/2022/02/windows-event-id-137-error-system.html" target="_blank">Windows Event ID 137</a> - System firmware has changed the processors...<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10010-did-not.html" target="_blank">Windows Event ID 10010</a> - Did not register with DCOM<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10016-warning.html" target="_blank">Windows Event ID 10016</a> - permission settings do not grant, could not bind</span></span></span></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><br /></span></span></span></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-73480559279281172482022-01-31T03:27:00.006+00:002022-02-02T14:59:45.812+00:00Windows Event ID 2505 Server could not bind to transport<p>Windows Event ID 2505<br />Error: The server could not bind to the transport \Device\NetBT-TCP__{6AEB50ED-EF84-41C9-A39C-DC1103A7C569} because another computer on the network has the same name. The server could not start.<br /><br />Windows 11<br /><br /><u>Comments</u>:<br />The event mentions "Another computer on the network has the same name". This is spurious, Nonsensical.<br /><br />As of 2022.01, Microsoft is aware of this error, with a fix pending.<br /><br />Workaround Solution: Disable NetBios<br /></p><p style="margin-left: 40px; text-align: left;">On a home network, disabling NetBios is safe. This will not affect your Internet, internal printers, or SAN drives. For example, disabling this protocol does not hurt my remote Synology SAN drive from being mounted. However, this will hurt old-style SMB drives (such as a remote Linux Drive mount). <i>If you have one of these, you have other problems because SMB is unsecure</i>. It is easily re-enabled if a problem is found.<br /></p><p><b><u>Steps to Disable NetBIOS</u>:</b></p><p><br />1. Click Start, type/search "Network Connections"<br /><br />2. Right-mouse-click the <u>Ethernet network</u> icon, select "Properties"<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjVY06_MWbOhMD69DL37_fe-8rypqSy9IL4kEEd-EeT6979zixncX4xCV5qkAxqspmC5eP70AZSG2_uyVFEq0d_AI7xZ7UQHqsIB6wQLxEyjkBlwJzy2MjbchMw09Ht_aSOH28m3rtprD7PXVqOlxDGNcw-Idl2QUGvRWUL5Qu-e_3AwugJH9CPws9Zag=s284" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="73" data-original-width="284" height="73" src="https://blogger.googleusercontent.com/img/a/AVvXsEjVY06_MWbOhMD69DL37_fe-8rypqSy9IL4kEEd-EeT6979zixncX4xCV5qkAxqspmC5eP70AZSG2_uyVFEq0d_AI7xZ7UQHqsIB6wQLxEyjkBlwJzy2MjbchMw09Ht_aSOH28m3rtprD7PXVqOlxDGNcw-Idl2QUGvRWUL5Qu-e_3AwugJH9CPws9Zag" width="284" /></a></div><p style="margin-left: 40px; text-align: left;"><i>Presumably, you only have one network adapter in this list. If multiple (e.g. some desktops have both wired and wireless connections), choose the one you are using.</i></p><p style="text-align: left;">3. Highlight "Internet Protocol Version 4(TCP/IPv4),<br /> Select "Properties" (again)<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEizq0mF5bsGLXaehPzx6pLfGdzsGkg-wVGv-B76FzRwflY4hjAKCUMpQPKA9Nkq7ragzc3ixWMI9kwhVWm1rSQQz8iyKbH0j_DSpbv46z683FNwlxD6v5mwI1IGsIBA35CyJ3qyD-dFXqAJ66WaiSXnDFIjvPKMT7VWdWHTpT4HgtZWT8M4eK3YA3IyJg=s693" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="581" data-original-width="693" height="335" src="https://blogger.googleusercontent.com/img/a/AVvXsEizq0mF5bsGLXaehPzx6pLfGdzsGkg-wVGv-B76FzRwflY4hjAKCUMpQPKA9Nkq7ragzc3ixWMI9kwhVWm1rSQQz8iyKbH0j_DSpbv46z683FNwlxD6v5mwI1IGsIBA35CyJ3qyD-dFXqAJ66WaiSXnDFIjvPKMT7VWdWHTpT4HgtZWT8M4eK3YA3IyJg=w400-h335" width="400" /></a></div><br /><p>4. On the Internet Protocol Version 3 (TCP/IPv4) Properties panel,<br /> Click "<u>Advanced</u>" (illustrated, lower-right)<br /><br />5. In the "[WINS]" tab: "<b>(*) Disable NetBIOS over TCP/IP</b>"<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi1N3-ztGqoiYVQVKuIu-G4WPvG38Vdrn3WCSfaCGa84BaDiXuKh6FbsLoi_15NbFhO16cgKVaYEp4JXc2SvEwA4Hni7UkgP2lxAxC1B5-OOEIOmagg_XmVUrKM-k4C72opf8Ey4T5s4z-lWF2Gqdmu8DDJGXAwt8MzMsc67l-ftGHpXUp0cvraiboGQg=s511" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="511" data-original-width="431" height="320" src="https://blogger.googleusercontent.com/img/a/AVvXsEi1N3-ztGqoiYVQVKuIu-G4WPvG38Vdrn3WCSfaCGa84BaDiXuKh6FbsLoi_15NbFhO16cgKVaYEp4JXc2SvEwA4Hni7UkgP2lxAxC1B5-OOEIOmagg_XmVUrKM-k4C72opf8Ey4T5s4z-lWF2Gqdmu8DDJGXAwt8MzMsc67l-ftGHpXUp0cvraiboGQg=s320" width="270" /></a></div><p></p><p style="margin-left: 40px; text-align: left;">Notes: <i>NetBIOS over TCP/IP is an obsolete and unneeded protocol and should be disabled on all workstations. By default, this is on for backwards compatibility. In a Home network, it is almost guaranteed to be safe to remove. In a large corporate environment, check with the Infrastructure team</i>.</p><p style="text-align: left;">A reboot is required for the change to take affect.<br /><br /></p><p style="text-align: left;"><u>Related articles</u>:<br /><br />For other Windows 11 Tuning tips, see<br /><a href="https://keyliner.blogspot.com/2021/11/windows-11-tuning.html"><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/">https://keyliner.blogspot.com/2021/11/windows-11-tuning.html<br /><br /></span></span></span></a></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><a href="https://keyliner.blogspot.com/2022/01/windows-event-id-2505-server-could-not.html" target="_blank">Windows Event ID 2505</a> - Could not bind to transport<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-2-session.html" target="_blank">Windows Event ID 2</a> - Windows.Remediation<br /><a href="https://keyliner.blogspot.com/2022/02/windows-event-id-137-error-system.html" target="_blank">Windows Event ID 137</a> - System firmware has changed the processors...<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10010-did-not.html" target="_blank">Windows Event ID 10010</a> - Did not register with DCOM<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10016-warning.html" target="_blank">Windows Event ID 10016</a> - permission settings do not grant, could not bind</span></span></span></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><br /><br /></span></span></span></p><p style="text-align: left;"><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"> </span></span></span></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-58120222954092278402022-01-30T06:00:00.006+00:002022-02-02T15:01:33.086+00:00Windows 11 Event ID 2 Session Microsoft.Windows.Remediation failed to start<p>Windows 11 Event ID 2 Session Microsoft.Windows.Remediation failed to start with the following error: 0xC0000035<br /><br />Kernel-EventTracing<br /><br /><b><u>Diagnostics</u></b>:<br /><br />A. Start, type/search "Event Viewer"<br />B. On left-nav tree-side, open "Summary page events"<br /> (You may not have this report and I do not know how to force it to appear.)<br />C. See Errors for Event ID 2 Microsoft Windows Remediation failed to start<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEh4LRPnsfd0XmAB5GAD9099_4-qhXTo3EaKhgs0O5U-4KfMf2wmbJijG9uIHCM5u_bBzaxHhbn_EAcvlUWo5WWvk8o7eyV3K9fHo0nifTmHLC5uUEPJezxl2Zby9gKBpOnG_YT6puzt4hZ5kY7ymowzKgFgynzd-pyS25VFNPWdiHgnIw5IiGIOaCE_aQ=s782" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="369" data-original-width="782" height="189" src="https://blogger.googleusercontent.com/img/a/AVvXsEh4LRPnsfd0XmAB5GAD9099_4-qhXTo3EaKhgs0O5U-4KfMf2wmbJijG9uIHCM5u_bBzaxHhbn_EAcvlUWo5WWvk8o7eyV3K9fHo0nifTmHLC5uUEPJezxl2Zby9gKBpOnG_YT6puzt4hZ5kY7ymowzKgFgynzd-pyS25VFNPWdiHgnIw5IiGIOaCE_aQ=w400-h189" width="400" /></a></div><p><b><u>Solution</u>:</b><br /><br />1. Start, type/search "Control Panel"<br />2. Programs and Features<br />3. Uninstall program "<b>Microsoft Update Health Tools</b>"<br /></p><p>This program is only needed when upgrading from one version of Windows to another, and if needed, Microsoft will re-prompt to download and install. This is safe to remove.<br /></p><p><b><u>Recommendation</u>:</b><br />Uninstall "Microsoft Update Health Tools" regardless if you see this error or not.<br /></p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><br /></span></span></span><p style="text-align: left;"><u>Related articles</u>:<br /><br />For other Windows 11 Tuning tips, see<br /><a href="https://keyliner.blogspot.com/2021/11/windows-11-tuning.html"><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/">https://keyliner.blogspot.com/2021/11/windows-11-tuning.html<br /><br /></span></span></span></a></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><a href="https://keyliner.blogspot.com/2022/01/windows-event-id-2505-server-could-not.html" target="_blank">Windows Event ID 2505</a> - Could not bind to transport<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-2-session.html" target="_blank">Windows Event ID 2</a> - Windows.Remediation<br /><a href="https://keyliner.blogspot.com/2022/02/windows-event-id-137-error-system.html" target="_blank">Windows Event ID 137</a> - System firmware has changed the processors...<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10010-did-not.html" target="_blank">Windows Event ID 10010</a> - Did not register with DCOM<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10016-warning.html" target="_blank">Windows Event ID 10016</a> - permission settings do not grant, could not bind</span></span></span></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><br /><br /></span></span></span></p><p><br /></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0tag:blogger.com,1999:blog-1585105787473796476.post-49051731631455755822022-01-30T05:30:00.005+00:002022-12-30T20:50:24.780+00:00Windows 11 Event ID 10010 Did not Register with DCOM<p>Windows 11 Event ID 10010 Error<br />The server {F9717507-6651-4EDB-BFF7-AE615179BCCF} did not register with DCOM within the required timeout.<br /><br /><b><u>Solution</u>:</b><br /><br />Four relatively easy steps.<br /><br />1. Click Start, type/search for:<br /> Windows 11: "<b>Windows Update Settings</b>"<br /> (Windows 10: "control update")<br /><br />2. In Windows Update Settings, click "<b>Advanced Options</b>"<br /> Delivery Optimization<br /> Allow downloads from other PCs: set to Off (forcing download from Internet)<br /><br />3) Start, type/search "SERVICES.msc", Run as Administrator<br /><br />4) Locate "Functional Discovery Resource Publication"<br /> Right-mouse-click, Properties<br /></p><p style="margin-left: 40px; text-align: left;"><i>Note: It may be already running, even if startup type is manual</i><br /></p><p> Change Startup Type from (Manual)/(Automatic) to "<b>Delayed Start</b>"</p><p>This takes effect on next reboot. The delayed start does not harm the service; it just waits a few seconds before it tries. This resolves the event error.<br /> </p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"></span></span></span><p style="text-align: left;"><u>Related articles</u>:<br /><br />For other Windows 11 Tuning tips, see<br /><a href="https://keyliner.blogspot.com/2021/11/windows-11-tuning.html"><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/">https://keyliner.blogspot.com/2021/11/windows-11-tuning.html<br /><br /></span></span></span></a></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><a href="https://keyliner.blogspot.com/2022/01/windows-event-id-2505-server-could-not.html" target="_blank">Windows Event ID 2505</a> - Could not bind to transport<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-2-session.html" target="_blank">Windows Event ID 2</a> - Windows.Remediation<br /><a href="https://keyliner.blogspot.com/2022/02/windows-event-id-137-error-system.html" target="_blank">Windows Event ID 137</a> - System firmware has changed the processors...<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10010-did-not.html" target="_blank">Windows Event ID 10010</a> - Did not register with DCOM<br /><a href="https://keyliner.blogspot.com/2022/01/windows-11-event-id-10016-warning.html" target="_blank">Windows Event ID 10016</a> - permission settings do not grant, could not bind</span></span></span></p><p><span><span class="w4txWc oJeWuf" id="c2" role="region"><span class="MUhG4e OGjyyf" data-blogurl="https://keyliner.blogspot.com/"><br /><br /></span></span></span></p>traywolfhttp://www.blogger.com/profile/06205565591880314520noreply@blogger.com0