Archive for the ‘General’ category

Blog Comments and Discussions Disabled

October 12th, 2021

Since the boche.net blog began back in 2008, there have been many relevant and valuable comments left on blog articles here. Over time, I have implemented various plug-ins, security measures, as well as backup and recovery mechanisms to combat the growing amount of comment spam and hacking attempts on this blog.

Akismet Anti-Spam (a plug-in I have been using) recently announced that their free to use plug-in is moving towards a payware model. This change took effect in mid-August and my free use account was disabled. Fast forward to today and I found that I had nearly 700,000 comments (probably all spam – I only looked at the first 100) waiting to be approved. While these unmoderated comments didn’t make their way to polluting the blog, attempts to delete them did cause problems with the the blog and MySQL database resources on the server.

The good news is that after some unplanned time spent, I got it all cleaned up and the blog appears to be healthy and functional.

The bad news is that, for now, I’m waiving the white flag on combating spam. Until further notice, blog comments and discussions will effectively be disabled for pages as well as blog posts older than 14 days. If I find that is not effective enough, I will disable comments and discussions across the board. For any feedback, discussion, questions, etc. on any blog post, please reach out to me via Twitter or Email.

Thank you,

Jas

MegaSceneryEarth automated HTTP download PowerShell script

July 30th, 2018

Regulars: Thank you for stopping by but just as a heads up, this post is not VMware virtualization related.

After a bit of hardware trouble from the local store, my replacement flight sim rig is up and running Lockheed Martin Prepar3D 4.3. I’m trying to shake the rust off after not having flown a leg for quite some time but everything sim and add-on related is looking good and I was able to fly KMSP-KLAX with many more FPS that I’ve been used to the past many years on FSX.

Now, out of sheer coincidence late last week I received a promotion from MegaSceneryEarth. Normally I ignore these but since this was a 50% off deal and I’m essentially starting from ground zero with no scenery for Prepar3D, I took a look. After some chin scratching, I checked out with Minnesota, Arizona, Northern California, and Southern California. I felt like quite the opportunist until the email arrived with file download instructions. Each scenery is broken up into 2GB download chunks. Between the four sceneries, I was presented with 123 download links. With no FTP option that I’m aware of, I’m going to have to babysit this process. With each 2GB download taking anywhere from 5-10 minutes, this is going to feel a lot like installing Microsoft Office 2016 via floppy disk. Except longer. MegaSceneryEarth is available on shipped DVDs or USB sticks they cost a small fortune and of course the shipping and handling time. This is going to be painful.

But… there’s a cheaper, faster, and fully automated way. PowerShell scripting.

Now admittedly for my first scenery, I threw the v1.0 PowerShell script version together quickly using the Invoke-WebRequest cmdlet with my own static scenery-specific lines of code to serve my own needs. And it worked. I launched the script, walked away for a few hours, and when I came back I had a directory full of MegaSceneryEarth .zip files ready for installation. It worked beautifully and it didn’t consume bunches of my time.

I still had three sceneries left to download. While I could have made new static scripts for the remaining three sceneries, my mind was already going down the road that this script would be more powerful if one script worked on a variety of MegaSceneryEarth downloads. It becomes flexible to use for my future MegaSceneryEarth sceneries as well as extensible if shared with the community.

So on Sunday, version 2.0 is what I came up with. It takes three inputs in the form of modifying variables at the beginning of the script before running it:

  1. The download URL for the first file of the scenery
  2. The path on the local hard drive where all of the .zip files should be downloaded to
  3. The starting point or first file to download. Usually this will be 1 but if for some reason a previous download was stopped or interrupted at say 6, we’d want to continue from there assuming we don’t want to re-download the first 5 files all over again.

The script does the rest of the heavy lifting. All three of the above are required for functionality but by far the first variable is the most important and where I spent almost all of my time making the script flexible so that it works across MegaSceneryEarth sceneries. When provided with the download URL of the first file of the scenery, the script does a bunch of parsing, splitting, and concatenation of stuff to automatically determine some things:

  1. It figures out what the base path and file name URL is for the scenery. For any given scenery, these parts never change across all of the download links within a scenery but they will change across sceneries.
  2. It figures out how many .zip files there are to download in total for the entire scenery.
  3. Because MegaSceneryEarth likes to use leading zeroes as part of their naming convention, and leading zero strings aren’t the same thing as leading zero integers in terms of PowerShell constructs, it figures out how to deal with those for file names and looping iterations. Basically when you go from “009” files in a scenery download to “010”, without dealing with that, stuff breaks. I think most MegaSceneryEarth sceneries have more than 9 files, but some have less (Deleware has 1). The script deals with both kinds. That I know of, MegaSceneryEarth doesn’t have a scenery with more than 99 .zip files but version 2.1 of the script will accommodate that.
  4. It figures out the correct file name to save on the local hard drive for each scenery file downloaded. This may sound stupid but that I know of, the Invoke-WebRequest cmdlet requires the output file name and doesn’t automatically assume the file name should be the same as the file name being downloaded via HTTP such as a copy command to a folder would.

Generally speaking, for automation to work properly, it relies on input consistency so that all assumptions it makes are 100% correct. Translated, this script relies on consistent file/path naming conventions used by MegaSceneryEarth. Not only within sceneries, but across sceneries as well.

And so here it is. Copy the PowerShell script below and execute in your favorite PowerShell environment. Most of the time I simply use Windows PowerShell ISE. The code isn’t signed so you may need to temporarily relax your PowerShell ExecutionPolicy to Bypass . It’s there to protect you by default.

######################################################################################################################
# MegaSceneryEarth.ps1 version 2.1 7/31/18
#
# This PowerShell script automates unattended HTTP download of up to 999 MegaSceneryEarth scenery files
# Relies on MegaSceneryEarth naming conventions current as of version date above
# Tested successfully with four MegaSceneryEarth downloads
# As with anything on the internet, use at your own risk, no warranty provided by the author
#
# Update the three variables below as necessary for your specific scenery and download parameters
#
# Jason Boche
# http://boche.net
# jason@boche.net
######################################################################################################################

# Provide the first file download link copied from the MegaSceneryEarth .htm link provided with license key email
# Internet Explorer: Right click the download link and choose "Copy shortcut"
# Google Chrome: Right click the download link and choose "Copy link address"
# Then paste the link between the quotation marks

$firstfile1 = "paste first file download link here.zip"

# Provide the path on your hard drive where the files will temporarily be saved.
# This will usually be where you have the MegaSceneryEarthInstallManager.exe file for subsequent installation
# Syntax requires a trailing backslash (\)

$dlpath = "D:\junk\"

# Provide the starting file count. Usually we start with 1 unless you're starting the download somewhere after 1

$startcount = 1

# Do not edit anything below this line

######################################################################################################################

# Get the HTTP path
$firstfile2 = split-path $firstfile1
$firstfile3 = $firstfile2.Replace("\","/")
$httppath = $firstfile3 + "/"

# Get the .zip file name
$firstfile4 = split-path $firstfile1 -leaf

# Get the static part of the .zip file name
$firstfile5 = $firstfile4 -split "001_of_"
$firstfile6 = $firstfile5[0]
$fileprefix = $firstfile6

# Get the total number of scenery files in string format with and without .zip extension
$firstfile7 = $firstfile5[1] -split ".zip"
$firstfile8 = $firstfile5[1]
# Convert total number of scenery files in string format to number format
$total = [decimal]::Parse($firstfile7)

if ($startcount -gt $total)
{
Write-Host Error: Starting file specified is greater than total number of files. Please check the `$startcount variable
pause
exit
}

# If there are 1-9 scenery files, download those
if ($total -ge 1)
{
$leadingzero = "00"
while ($startcount -le $total)
{
if ($startcount -gt 9){break}
Write-Host Downloading $httppath$fileprefix$leadingzero$startcount"_of_"$firstfile8 to $dlpath$fileprefix$leadingzero$startcount"_of_"$firstfile8

Invoke-WebRequest -Uri $httppath$fileprefix$leadingzero$startcount"_of_"$firstfile8 -OutFile $dlpath$fileprefix$leadingzero$startcount"_of_"$firstfile8

$startcount ++

}
}

# If there are 10-99 scenery files, download those also
if ($total -ge 10)
{
$leadingzero = "0"
while ($startcount -le $total)
{
if ($startcount -gt 99){break}
Write-Host Downloading $httppath$fileprefix$leadingzero$startcount"_of_"$firstfile8 to $dlpath$fileprefix$leadingzero$startcount"_of_"$firstfile8

Invoke-WebRequest -Uri $httppath$fileprefix$leadingzero$startcount"_of_"$firstfile8 -OutFile $dlpath$fileprefix$leadingzero$startcount"_of_"$firstfile8

$startcount ++

}
}

# If there are 100-999 scenery files, download those also
if ($total -ge 100)
{
$leadingzero = ""
while ($startcount -le $total)
{
if ($startcount -gt 999){break}
Write-Host Downloading $httppath$fileprefix$leadingzero$startcount"_of_"$firstfile8 to $dlpath$fileprefix$leadingzero$startcount"_of_"$firstfile8

Invoke-WebRequest -Uri $httppath$fileprefix$leadingzero$startcount"_of_"$firstfile8 -OutFile $dlpath$fileprefix$leadingzero$startcount"_of_"$firstfile8

$startcount ++

}
}

Error 1603: Java Update did not complete

February 9th, 2016

3 Billion Devices Run Java.

Unfortunately (or fortunately depending on how you look at it) my workstation isn’t one of them.

I’m no stranger to Java and I’m more than willing to share my bitter experiences with it but rarely does my dissatisfaction stem from the installation process itself (that is if you don’t count the update frequency). This blog post is for my future self as I’m bound to run into it again.

I encountered a never before seen by me problem installing the Windows Offline (64-bit) version of Java Version 8 Update 73 on Windows 7.

Java Update did not complete

Error Code: 1603

The usual tricks did not work. Uninstalling the old version first. Run as administrator. Directory and registry scrubbing. System reboot. Trying an older version. In fact all version 8 builds exhibited this behavior. It wasn’t until I rolled all the way back to a version 7 build that the installation was successful.

For posterity, this spiceworks thread covers a lot of ground; there seems to be a variety of fixes for an equal number of root causes which all yield the same Java installation failure. The Java knowledgebase covering this issue offers some basic workarounds under Option 1 such as a system reboot, offline installer, uninstalling old versions, all of which I had already tried without success.

The fix in my particular instance was Option 2: Disable Java content (in the web browser) through the Java Control Panel. You’ll find the Java applet in the Windows Control Panel when a 32-bit version of Java is installed.

On the Security tab, temporarily deselect the “Enable Java content in the browser” checkbox.

Complete the 64-bit version of Java installation (launch the installer using “Run as Administrator“) and don’t forget to “Enable Java content in the browser” when finished.

Update 5-12-16: If you’re receiving this error and “Enable Java content in the browser” is already deselected, check the box, Apply, OK, uncheck the box, Apply, OK.

 

BenQ W1070 and the Universal Ceiling Mount

September 15th, 2014

Over the weekend I hung my first theater projector, the BenQ W1070 1080P 3D Home Theater Projector (White), using the BenQ 5J.J4N10.001 Universal Ceiling Mount, both available of course through Amazon.com. While I didn’t expect the installation to be overly complex, I did employ a slow and methodical planning approach before drilling large holes into the new knockdown theater ceiling.

After unboxing the projector and the universal ceiling mount kit, I looked at the instructions, the parts, and the underside of the projector. If you’re reading this, it’s probably because you’re in the same boat I was in – the diagrams don’t closely resemble the configuration of what you’ve got with the W1070. Furthermore, reading some of the reviews on Amazon seems to suggest this universal ceiling mount kit doesn’t work with the W1070 without some modifications to the mounting hardware. I read tales of cutting and filing as well as adding longer bolts, tubing, and washers to compensate for the placement of the mounting holes on the W1070. Not to worry, none of that excess is needed. If you concentrate more on the written instructions rather than the diagrams for mounting the hardware to the projector, it all actually works and fits together as designed with no modifications necessary. The one exception to this is that not all of the parts provided in the kit are used. This perhaps is what leads to some of the initial confusion in the first place. The diagrams suggest a uniform placement of four (4) mounting brackets on the underside of the projector in a ‘cross’ pattern. While this may be the case for some projectors, it’s not at all a representation of the W1070 integration.

For openers, the BenQ W1070 has only three (3) mounting holes meaning only three (3) mounting brackets will be used and not all four (4). Furthermore, the mounting holes are not placed uniformly around the perimeter of the projector. That, combined with the uneven surface of the projector can lead to uncertainty that these products were meant for each other and if so, then how. Simply follow the directions and screw the three brackets into place while allowing a little give so that you can swing the brackets into a correct position. I say _A_ correct position because there are nearly countless positions in which you can configure them and it will still work correctly resulting in a firm mount to the ceiling.

The image below shows an example of how I configured mine:

Next, place the mounting plate on top of the mounting brackets. Slide the mounting screws in the brackets, and gently swing the brackets themselves, so that the screws can extend through one of the channels in the mounting plate. Gently remove the mounting plate and torque the screws attaching the bracket to the projector.

I took some additional steps which may not have been necessary with modern projector technology but nonetheless the methodical approach helps me sleep better at night and reassures me I’m not destroying my ceiling in the wrong spot. I used a felt tip marker to mark a center point on the projector relative to the telescoping pole that will mount to the plate.

I then temporarily removed the mounting plate to measure the telescoping ceiling mount offset relative to the front and center of the projector lens. This measuring translates into the offset for the ceiling mount relative to the center of the room and distance to the projection wall. Performed correctly, it allowed me to mount the front of the lens 10’10” from the projection wall (sweet spot for my calculated screen size, seating, zoom, etc.) as well as mount the lens exactly in the middle of the room from a side to side lateral perspective.

In closing, the only other thing I’d add here is that if your lag bolts are not hitting studs in the ceiling, don’t bother with the plastic sheetrock inserts. While they may work, I don’t trust them for the amount of money I spent on the projector and I certainly don’t want the projected image wiggling because the projector isn’t firmly mounted to the ceiling. Only one of my lag bolts hit a stud. For the remaining bolts, I went to home depot and purchased some low cost anchor bolts (these are the ones I used along with a fender washer) good for 100lbs. each. Suffice to say, the projector is now firmly hung from the ceiling.

Available Lab Gear

May 29th, 2013

Heads up to any locals looking for server grade vSphere hardware infrastructure.  I’ve been doing some lab spring cleaning the past few weeks and after some consolidation efforts, I’ve got some hardware available that’s not being put to good use any longer.  All of these are 64-bit and will run vSphere.  All have Ethernet and/or Fibre Channel options.

  • 2x HP DL385 (1x AMD DC Opteron, 4GB RAM, rails, RPS)
  • 2x HP DL385 G2 (2x AMD QC Opteron (Barcelona), 34GB RAM, rails, RPS)
  • 2x HP DL585 G2 (4x AMD DC Opteron, 64GB RAM, RPS, power cables)

If you have any questions not pertaining to power or heat, please ask.

You pick up – Lakeville, MN.

The price is right – email me if interested.

Patio Door Lock Replacement Tips

August 25th, 2012

1.  Make sure you purchase the correct replacement lock at your home improvement store.  This one looks like a match.

Snagit Capture

 

2.  Before removing the old lock or installing the new lock, insert the long door handle screw in the door.  Now it is safe to remove the two mounting screws located on the face of the lock.

Snagit Capture

 

3.  Failure to perform step #2 above allows gravity to cause the lock to fall down inside to the bottom of the door.  Not such a big deal if it’s the old lock being replaced, such as in my case, but you don’t want to drop your new replacement lock down there.  As far as I know, there is no easy way to retrieve it without removing the door.  Notice my new lock stays in place while I go grab the two mounting screws.

Snagit Capture

 

Well that’s it.  I hope I was able to save you that 2nd trip to the home improvement store.

Microsoft Flight, Week 1

March 4th, 2012

I’m a Microsoft Flight Simulator fan.  I’ve purchased several versions and add-ons over the years.  Unfortunately the Flight Simulator development team was disbanded by Microsoft after the release of Flight Simulator X.  It was a great run and I probably would have been satisfied with FSX for many years until the next thing came along.

A few months ago I was made aware that MS picked up the flight sim program again and their next generation product “Flight” was in it’s final testing stages.  I was not a part of the beta and waited for the GA release like most others.

Last Wednesday, Microsoft released “Flight” to the masses.  What’s new in this release? For openers, the price.  It’s a FREE download  How does that work? The free content is fully functional (including multiplayer) and consists of a few planes, one very beautiful Hawaiian island, several airports, tutorials, missions, challenges, aerocache hunts, and pilot leveling.  Current and future bolt-on content such as terrain, planes, and perhaps other types of content can be purchased through the Microsoft Marketplace.  At this time, Microsoft offers the Hawaiian Adventure Pack (the additional Hawaiian islands), the Maule M-7-260C (required for cargo missions), and the North American P-51 Mustang (by far the fastest plane with the highest service ceiling, unfortunately, no cockpit; as such, this plane is sold at a discount compared to the Maule).

Let’s see, what else – We’ve now got the ability to open the cockpit doors and exit the planes to have walk or run around. This gives us the ability to explore the terrain and other objects in sim more closely. In addition, it provides the ability to reach some of the difficult aerocaches which would otherwise be unreachable by plane.

The scenery is gorgeous and landmarks well done with incredible detail.  By default, my installation was set for “Medium” detail across the board and my nearly 3 year old Intel Quad Core i7 920/8GB RAM/Nvidia GeForce GTS 250 handled it flawlessly. I bumped up all detail to “High” and my machine handles it well enough that I’ve left it on High. Occasionally I’ll lose a few frames during rapid and massive scenery transitions but it doesn’t happen too often. My machine is not quite fast enough to further bump the individual settings to the Maximum setting.  The frame rate isn’t smooth enough but wow is the scenery beautiful and thick.

Microsoft has gone a little educational with this release which I think is a great element.  Everything from aerocache hunts to the passengers in the back seat will give you some history lessons about the many beautiful features of the Hawaiian islands and of course one of the most well known landmarks in US history – Pearl Harbor.  For a guided tour, complete the photographer mission.  It’s long but well worth it.

What’s missing? Obviously the multitude of planes, liveries, and the rest of the world.  Some of the more complex and interactive navigational elements don’t appear (yet).  The RV and the Maule support VOR navigation (including DME), ILS guidance, separate COM radio channels for keeping conversations private with buddies, but no Garmin GPS, ATC (Air Traffic Control), auto pilot, hold course, or hold altitude.  There’s no push back or a key to bind to that feature.  All of this may be on the horizon with the larger jets.  There is no slew but we can essentially pick up our plane and drop it in any spot on the map and fly from there.  There is no time advance feature for long flights, but MS alternatively offers waypoint advancement which essentially accomplishes the same task – long flights for those with challenging real life schedules.  Be aware that using the Next Waypoint feature is fine, but it may reduce your total achievable score if used during a mission or challenge.  By the way, following are links to helpful instructional videos on VOR navigation:

VOR Navigation Tutorial (Part I) – MSFS
http://www.youtube.com/watch?v=f67low6D-T0

VOR Navigation Tutorial (Part II) – MSFS
http://www.youtube.com/watch?v=qLOqAaObGsw

VOR Navigation Tutorial (Part III) – MSFS
http://www.youtube.com/watch?v=Exqz65WeF2w

VOR Navigation Tutorial (Part IV) – MSFS
http://www.youtube.com/watch?v=BRHuKsCYiyo

VOR Navigation Made Easy
http://www.youtube.com/watch?v=Enq5RU6k3AQ

Short VOR Navigation Lesson
http://www.youtube.com/watch?v=UoiUrTjuo6U

Navigation Using a VOR
http://www.youtube.com/watch?v=iCCk2ch-xL4

A blogger by the name of peterb wrote an opinion piece on Flight yesterday.  The review was positive overall and much of it was consistent with my thoughts.  Thus far, Flight leans a little more toward the game genre than its predecessors. However, I feel there’s plenty of sim left in it for my tastes and I think it’s really going to appeal to those who might have been intimidated by the complexities of previous versions.  It is still a sim, not a game.  Case in point: I ran into a younger generation during a multiplayer event who downloaded what they thought was a video game. They conveyed through online chat they didn’t understand the point of the virtual flight world they were bored to tears with. I can’t think of a better compliment than that.  In addition, this is an unfinished project.  There’s a lot more coming which could fill some gaps. For me, the rest of the world and commercial jets can’t come soon enough but I had a lot of fun this past week, logging about 10 flight hours, completing missions and challenges, rescuing a kayaker, finding 53 of 54 aerocaches, and reaching level 16.  On the leveling, if you’re looking to advance quickly:

  • Grab all the aerocaches available (except Curvature of the Earth).  They range in value between 1,000 and 5,000 points a piece depending on difficulty level.
  • Run repeated Gold Rush challenges.  Up to 6,200 points is available in each run which only takes a few minutes.
  • Try some of the other Challenges or Missions.  There are a few in there worth an easy 12,000 points one time only (one example is the aerobatics competition).

Regarding multiplayer, the installation of Flight will apply the necessary Windows firewall policies to host a game, but I found that my NAT router was blocking incoming game requests which prevented me from hosting. By looking at my router logs, I determined that UDP port 3074 was required to be open in both directions on the NAT router (where incoming UDP 3074 traffic would be forwarded to the PC hosting the MS Flight session).

Following are some screen shots from my flights.

Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture   Snagit Capture

Updated 3/8/12:  I picked up a lot of points tonight while trying several challenges to unlock paint schemes.  In doing so, I reached level 20 and at this point I’m able to level no further.  Level 20 appears to be the cap in this first release of Microsoft Flight.  I’ll continue to fly as it’s still a lot of fun and not really about leveling.

Snagit Capture