Category: Simple Stuff I Forget

Add Bookmark – Google Bookmarks, um, bookmark

In Chrome, create a new bookmark. Name it what you like and set its URL to:

1
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=510px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();

Click it when you’re on a page you’d like to bookmark (and make sure you’re logged into the Googlez).

Windows: Updating existing ODBC Data Source Drivers

For some reason there still isn’t any easy way to update the driver used on a previously defined ODBC data source in Windows. There’s no option when stepping through the configuration. I suppose you’re expected to delete and recreate the data sources, specifying the new driver at that time. But what if you have dozens, or hundreds, of existing sources?

Do it though the registry.
Continue reading

OpenVPN reconnect

My OpenVPN likes to have difficulty and go yellow from time to time.  The problem with this is twofold – I have any and all downloads stop at the absence of VPN, and when I’m not home connecting to my server is more difficult when VPN has hundged up.  The simplest fix for now is just to restart/reconnect VPN on the daily.

I use OpenVPN with PIA.
Continue reading

Windows 10 – Can’t enable System Restore

System Restore.JPG

For some reason on my most recent build of Win 10 (don’t get me started) the option to enable System Restore was grayed out.  I fixed it by running the following in a admin level CMD prompt:

1
2
3
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore" /v "DisableSR" /f
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore" /v "DisableConfig" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SPP\Clients" /v " {09F7EDC5-294E-4180-AF6A-FB0E6A0E9513}" /t REG_MULTI_SZ /d "1" /f

The first two lines didn’t find those keys, FYI.  Still, the third enabled my ability to set up System Restore.

Windows 10 Hyper V Woes

I recently needed to set up a Win10 Hyper V, and then join it to a domain over a VPN connection.  The first issue that I faced was that Cisco Anyconnect VPN client detected the virtual machine as a Remote Desktop Connection and refused to allow it to connect.  I solved this by switching from Enhanced Session to Basic Session by clicking this on the toolbar of the virtual machine:

My second issue was that, even after successfully joining the machine to the domain, there was no Switch User option (I needed to switch to a domain user while on the VPN in order for it to authenticate to the domain server and build the local profile for the domain user).  No matter where I looked there was no option.  Not in the power options, not via Alt+F4, nowhere.

I solved this by invoking tsdiscon.exe directly via a run line.  Bear in mind that it’s my understanding tsdiscon.exe is not available in Win 10 Home edition, though I don’t know why anyone would build a virt of Home edition.

ZyXEL C1000Z Scheduled Reboot – Windows

So there’s nowhere in its OS to schedule a reboot of ZyXEL’s C1000Z router.  Thankfully you can use Telnet to do it.

First, enable Telnet.  Log into the router, then choose Advanced Setup > Remote Console.  Under Console State choose LAN Telnet Enabled.  Set your Telnet username and password and click Apply.

Now you’re ready to go.  Create a .vbs file and populate it with the below, changing the IP address, username and password to be applicable to your router.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Option explicit
Dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "telnet"
WScript.Sleep 3000
oShell.Sendkeys "open 192.168.1.1~"
WScript.Sleep 3000
oShell.Sendkeys "admin~"
WScript.Sleep 3000
oShell.Sendkeys "password~"
WScript.Sleep 3000
oShell.Sendkeys "reboot~"
WScript.Sleep 3000
oShell.Sendkeys "~"
WScript.Sleep 3000
oShell.Sendkeys "quit~"
Wscript.Quit

Save this file.  You can double click it to test it.  After having confirmed it works, create a task pointed to it in Windows Task Scheduler.  Modern Windows OSes should natively run a vb script in scheduler.  If not, use CScript to launch the script:

1
C:\Windows\System32\CScript.exe //Nologo //B X:\PathToYourScript\YourScript.vbs

Switching DNS – Windows

I use the mighty Pi-Hole to streamline my browsing experience.  Sometimes, though, the ole Hole can get in my way, blocking something I need to see.  If it’s a one time deal, and not something I want to whitelist (which Pi-Hole has thankfully made easy to do via the web interface as of the latest edition), I wanted an easy way to temporarily switch DNS servers.

Enter QuickSetDNS, a groovy little exe that can do just that. Download QuickSetDNS and unpack it into the destination of your choosing.  There’s no installer – it’s a simple standalone exe.  Fire it up, right click in the whitespace and create a new DNS server entry. I’ve got one for my Hole, and one that points to Google’s public DNS servers.

After creating your entries, right click on one and choose Copy SetDNS Command Line. Then right click on your desktop and create a new shortcut.  Paste the SetDNS command line in for the location of the shortcut and click Next.  Name it something informative, and save it.  Do the same with your other DNS entries in QuickSetDNS.

There.  Now you have shortcuts you can double click to change your local DNS settings.