Category: Microsoft

Windows – Force Applications to Use VPN

Got an app you want to work only when connected to VPN?  Have Windows Firewall do the work for you

First, connect to your VPN.  Then, ensure that your Public connection is that VPN connection.  You can do this by opening Network and Sharing Center.  In the example below, clicking on Ethernet 3 on the Unidentified network reveals the VPN IP address.

apng Continue reading

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.

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:

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.

Windows 10 – disable automatic updates

One of the more annoying things about Windows 10 (and there are many) is the inflexibility with updates.  Luckily, you can edit policy to your advantage here.

  • Open the policy editor by clicking the windows button and then typing in gpedit.msc (enter)
  • Navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Updates
  • Double click Configure Automatic Updates to edit it.
  • Set it to Enable and choose 2 – Notify for download and notify for install

There you have it.  You haven’t prevented updates altogether, but at least you have some control over if/when they download and install.

DTbwxjw

 

Windows – Migrating Printers

At my POE we use virtual printers for all manner of file production.  It’s annoying.  What’s more annoying is when it’s time to upgrade a server using virtual printers.  Thankfully there’s a way to sorta kinda help the process, by sorta kinda easing the migration process.  The following screenshots are from Windows 2012 R2.  If you’re using a different Windows OS level your mileage may vary.  It’s my understanding that the titles of some of this differs by OS.

Continue reading

Windows 7 with 2 NICs

Despite supposedly having no data caps, the other day my provider interrupted my surfing with a message stating that I’d downloaded an “excessive amount” and should contact them to upgrade my plan.  Interestingly, their website also doesn’t show any data caps or, for that matter, any plans for me to upgrade to.

I’m not real worried about it, but at the same time since I work full time remote I really need my intertoobs to work all the time.  Then I remembered that the vacation rental we manage next door to me has internet that rarely gets used.  Time to slap a wireless NIC on the server and push internet traffic through that router!

Doing so was easy.  I had a halfway decent USB wireless laying around.  I slapped it in, joined the next door wireless network, and then ran a route print:

Selection_009

The highlighted bit is the new NIC.  Above it is the wired NIC connecting the server to my local network.  You want the Metric on the NIC you want internet traffic flowing through to be the lowest.  Luckily mine defaulted to that.  If yours doesn’t do that you can manually set the Metric by navigating to the Advanced properties of the Network Adapters:

Selection_010

After that I simply removed the Gateway address from the properties of my wired LAN access NIC and voila – all my intertoobs were coming from next door while my LAN still had full access to my server.  In order to double check I logged into my router and disabled internet traffic for the server IP address.

I also installed a groovy little tool called Network Manager so I can watch the traffic:

Selection_011

 

Windows Sticky Notes

I admit it – I use Windows Sticky Notes.  I hate how unconfigurable it feels though.  The font is terrible, for instance.  Lucky you can change it with a reghack.


REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Segoe Print (TrueType)"="consola.ttf"
"Segoe Print Bold (TrueType)"="consolab.ttf"

What’s happening here is, because the notes demand to use Segoe Print as the font, you’re changing what font Segoe Print actually is.  Replace the .ttfs with fonts of your choice.

There are also a myriad of shortcuts for modifying existing note text:

Ctrl+B – Bold text
Ctrl+I – Italic text
Ctrl+T – Strikethrough
Ctrl+U – Underlined text
Ctrl+Shift+L – Bulleted (press once) or Numbered (press twice) list
Ctrl+Shift+> – Increased text size
Ctrl+Shift+< – Decreased text size
Ctrl+A – Select all
Ctrl+Shift+A – Toggles all caps
Ctrl+L – Left aligns text
Ctrl+R – Right aligns text
Ctrl+E – Centers text
Ctrl+Shift+L – Small Alpha list (3rd), Capital Alpha list (4th), small roman (5th), Capital roman (6th)
Ctrl+1 – Single-space lines
Ctrl+2 – Double-space lines
Ctrl+5 – Set 1.5-line spacing
Ctrl+= – Subscript
Ctrl+Shift++ – Superscript

TrueCrypt – No longer safe?

Bad news.  A serious flaw in TrueCrypt has been found that potentially allows full system compromise.  The worse news?  There’s no truly trustworthy TC successor for Windows out there in the wilds so far.  Microsoft and Symantec both offer encryption solutions, but surely they’re rife with back doors.  VeraCrypt is a fork of TC, but so far there’s nothing to generate any confidence that it too isn’t compromised.

The good news, I suppose, is that so far it appears that TrueCrypt on Linux doesn’t have this newly found flaw.  Also, it seems this flaw requires the machine to be on and in Windows.  In other words, if your fully disk encrypted machine is powered down, or your drives are removed or are external and the machine isn’t with them, your data remains safe.  Cold comfort, really.