Thursday, May 3, 2018

Time Machine "Can't connect to a current Time Machine backup disk"

I decided to start using Time Machine alongside Crashplan to make sure I had a local backup. Plus I'm backing up ~8TB of data on that particular Mac device so having a quick restore option makes a lot of sense.

I purchased a new Thunderbolt 3 drive with plenty of storage and set up Time Machine. Easy enough, right? It only took 2 days to get the initial backup and everything looked like it was working fine. Then I went to try a test restore and that's where I ran into problems. As I entered the Time Machine system to view what was available to restore, an error popped up saying "Can't connect to a current Time Machine backup disk". Nothing would display and I would have to exit. At first I tried a reboot, which didn't work. Then I noticed that the disk displayed a little odd in the Time Machine Preferences so I started over by reselecting my disk and waiting another 2 days for it to redo the initial backup. No luck after that either. That's when I asked my friend Google and found that I should've started there because the answer was very simple...

I had NO permission to access the time machine backup database folder! Why in the world would that be the default setting?! You can confirm that this is your issue too by going into the Time Machine disk and trying to view the contents of the Backups.backupdb folder. If you see a red no-go sign or can't view, you're having the same problem I was.

Luckily it's easy to fix, but you have to use Terminal (Application->Utilities->Terminal) because Finder doesn't seem to work to change permissions on this particular folder. Once you have Terminal open

1. cd /Volumes/TimeMachineDriveName (make sure you put the name of your Time Machine disk here after /Volumes/)
2. sudo chgrp admin Backups.backupdb

The first command just gets you to the Time Machine drive that you need to work with. The second changes the group permissions so that the admin group on your machine can access the folder and it's contents. It will ask you to enter your password after the 2nd command, which is normal when you use sudo to run the command as the root user. Once you've done this you should be able to go back to Time Machine and actually view what has been backed up, and restore files/folders when needed

Wednesday, May 2, 2018

Replace character in variable within batch script

I wanted to rename a file using a batch script so it would replace underscores '_' with hyphens '-'. It was pretty easy

Set img1=this-was_the_original-name-of_the_file
Set newName=%img1:_=-%
echo %newName%

The key to doing it is the :_=- in the second line, which is saying take the text value stored in the variable img1 and make underscores instead equal hyphens. Now, you could make line 2 instead be

Set img1=%img1:_=-%

If you don't need to reference the original value you're storing in img1 later, but for my purposes I was renaming a file so I needed both the original filename and what the new filename should be, so I had to store the new name with the hyphens in a separate variable

Thursday, March 22, 2018

Exchange Resource room only shows who scheduled in Outlook

Apparently the default behavior of resources in Exchange is to replace the subject line with the organizer's name. I'm not going to argue whether or not that is pointless, but I will tell you how to fix it. It's a simple one-line powershell command you can run.

Make sure you connect to the Exchange (or Exchange Online) Powershell, and then run

Set-CalendarProcessing -Identity resourceName -DeleteSubject $False -AddOrganizerToSubject $False

Make sure you replace "resourceName" with the actual name of your resource. Running that will leave the original subject line intact so you don't have to check the organizer's calendar to see what the meeting is about if trying to schedule a resource.

I originally found the answer in this Microsoft support article

Wednesday, November 16, 2016

iPhone missed calls showing on second iPhone

If you're sharing an Apple ID across multiple iPhones, you have likely ran into an issue at some point with one phone having something from the other phone. For this post we're talking specifically about missed call history.

If you have missed calls for one phone showing up on another phone, turn off iCloud Drive. You can do so by going into Settings->iCloud, then toggle the iCloud Drive setting to off. Make sure to verify it is off too. I've seen it take a couple tries to get it to actually go to off.

Once it's turned off the missed call history will no longer be getting synchronized, and won't show up on other phones signed into the same Apple ID

Monday, September 12, 2016

Windows 7 stuck searching for updates forever

If you've had to reinstall Windows 7, depending on how old your install media is you may run into this problem. Once Windows is installed and ready for updates, you tell it to search and it keeps searching, and searching, and searching... until you finally reboot or shutdown because it's been 5 hours and still nothing. I've ran into this a few times myself, and luckily I think I finally found a fix.

First, download and save Microsoft KB 3138612, which is an update to the Windows Update client. Apparently you now need this update to get the update process to work, but if the process is already broken then you can't get the new client through normal means and need to use the standalone installer. In my case, trying to install from the standalone left it searching forever for installed updates too, so just save this for now. You're going to need this in a minute.

Now, open up a command prompt and run it under the administrator context. The easiest way to do this would be click the Start button, type cmd, then right-click and select Run as Administrator on the Command Prompt or cmd.exe result you should see.

Once Command Prompt opens, type (without the quotes) "net start appidsvc" and press Enter. This should make sure the appid service is running.

Now that the service is running you can go ahead and install KB3138612 from the download you saved earlier. It should only take a couple of minutes to do this. If it gets stuck on searching for installed updates for more than 5 minutes, you may need to find another method. Once the KB is installed, reboot the computer.

Once the PC is on again, repeat opening the command prompt in the administrator context and starting appidsvc. After you've done that, type (without the quotes) "wuauclt.exe /detectnow" and press Enter. That should force the Windows Update client to search for updates and show you results once done.

In my case, it still took a while for it to search for updates because when it came back I had over 200 of them waiting to be installed. However, that was at most an hour. Prior to that I had left the machine searching for updates as long as 48 hrs and it never moved past that status. Once the updated client is installed, and you get past the initial round of updates that will likely be faily large, you should be fine from there to update normally in the future.

Monday, June 20, 2016

iPhone showing an unread text message but you can't find it

Ever see the notification on your Messages app, but have no luck finding it? Use Siri. Activate Siri, and then say "Read me my unread messages". Siri should then locate and read the unread message, after which the notification will go away.

I had a user that this happened to today. The odd thing was the message in question had been read and deleted already, but somehow hadn't been marked read so the notification kept coming back no matter how many times the user went into that particular message thread. Using Siri took care of it.

Tuesday, March 29, 2016

OS X Application Window not showing or visible

I recently had a user trying to open Acrobat Pro DC on a Mac laptop. The user would get the menu bar across the top, but could not see the application window on the screen to actually do anything. The trick was to go to Window->Zoom, which brought the app window back to normal on the screen. Either it has been zoomed out so much it was too small to see, or it had somehow gotten moved off the screen to where it was open but not in an area the user could see it.

Friday, December 4, 2015

Messages menu options grayed out on OS X

If you're someone that manages your fonts more than a normal user, you may have run into this issue with the built-in Messages, or iMessage, app on OS X. My users couldn't sign in or access any of the app features. The reason behind it was really simple. The AppleGothic font that normally comes on the system is required for the Messages app to work correctly. Make sure you have it activated if you're using a font manager, such as Universal Type Client. Once you have it active, open Messages and you should be able to use it like you would've expected.


Wednesday, October 7, 2015

Terminal server user cannot set default printer

Ok, I'll admit that this post is late to the party because I'm talking about Server 2003, which went EOL earlier this year. However, I'd guess that there are others like me that haven't eliminated it from their environment completely, and something similar may show up in the newer server OS versions, so here goes.

I had a couple of users who reported issues printing from their terminal server sessions. Printers were showing as installed, but if they tried to print from an application, say Excel, it would give them an error that no printers were installed and they couldn't select anything. Looking into it further, the printers were there but none were set to the default printer, and you could not manually set the default printer. Without a printer set, the applications were getting confused.

I tried recreating the roaming profiles to no avail. The printers themselves worked fine for other users and were setup locally on the terminal server. I found a Microsoft article about something similar with redirected printers that said to copy of the Default Users folder with a clean copy from another server, but that didn't seem to help either. Then I found this article. The registry hack listed there fixed it for the users that were having trouble.

Since I had regedit disabled for non-admins, I had to make changes from within a session opened by an admin. That made it a little trickier to find the correct reg key for the current user, but not impossible. What I did is expand HKEY_USERS and took a look at all the entries. Then I had the user who was having trouble login, then refreshed HKEY_USERS. Then had them logout and refreshed HKEY_USERS. It might help to do a before and after screenshot. Doing that you should be able to figure out which of the keys belong to their user account because it'll appear and disappear depending on when that user is logged in or out, and that's where you'll want to add the fix.

Have the users login, then from a session that has access to modifying the registry go to HKEY_USERS\*guid*\Software\Microsoft\Windows NT\CurrentVersion. Look for a key named Windows. If it doesn't exist, create it. Then, within Windows, create a new String value named Devices. Set the value of Devices to "winspool,Ne00", without quotes. Once done, have the user log out, then back in to your terminal server. He/She should be able to set the default printer and once again access printing services.

Monday, April 13, 2015

Export a list of categories and their parent from Magento

We were looking for a way to create a product setup form for our Magento-based eCommerce site. One of the hangups was getting a list of all our categories so that we could create a dropdown for users to select the category name from, but that we could pull the category ID from then as well. There are some posts that I found which tell you how to export all the categories with the ID value, but I didn't see anything that also told you how to get the parent category info so I had to dig into it myself. Luckily it wasn't too difficult so if you're looking to do something similar or just need a list of your category tree, you're in luck. There may be a way to do this in PHP using the some built-in functions of Magento, but I'm not familiar enough with them so I had to turn directly to MySQL. If you have an easier way please leave a comment to let everyone else know.

If you're looking at this then I'm going to guess you're a developer, or at least know someone who is that has access to the database running your site and can help you. If not then I wouldn't suggest doing this without some assistance unless it's on a test site or something other than your live site.

Within the Magento database there are two tables we need to join to get the information we're after: catalog_category_entity and catalog_category_entity_varchar. The entity table has the id values and the varchar table has the name. Now, there is a magic number used in the query that seems to vary database to database. That value is the attribute_id from the catalog_category_entity_varchar table. What I did to find out what value to use is look at the contents of the table and pay attention to the attribute_id value given to the Root Catalog entry that should be first. In my case it was 33 on one site, and 35 on another, which is why I say it varies. However, that attribute_id appears to identify the primary value field we want in order to get the correct category name, so mark it down.

The query I used to create my category list for the site where I found the attribute_id value to be 33 looked like this:

SELECT cc.entity_id,cv.value,cc.parent_id,cc.path FROM dbname.catalog_category_entity cc INNER JOIN dbname.catalog_category_entity_varchar cv ON cc.entity_id=cv.entity_id WHERE cv.attribute_id=33;

Make sure to change the attribute_id=XX; at the end to match whatever attribute_id value you found it to be within your own database. You also need to substitute your own database name in for dbname, but I'm hoping that you already knew that if you have access to the site's MySQL backend.

In this the entity_id is the ID of the category, value is the name of the category, parent_id is the ID of the parent category directly above in the hierarchy, and path is the full path in the hierarchy tree to the category based on the ID values.

I ran this query and had it export to a CSV file, and from that was able to build a drop down list to be used for selecting categories. Then we'll take products that get input into our form and upload them to the site through the use of Magmi. Hopefully this has been useful and helps you figure out whatever you're attempting to do with the categories on your Magento site.