Map Shared Drives and Printers using Batch Scripts and Net Use Command

When I log into a new computer, I don’t like having to do a whole lot of configuration.  Net use command is the command line tool for mapping shared drives and printers.  You can combined it with a batch script to map shared storage drives and printers.  Now you have a really efficient tool at your disposal.  Here is a sample of one of my scripts.  If you would like to try and make your own batch script to automatically map a shared drive or printer with a click of an icon on your desktop.  Open up your notepad app and copy / paste the following script.  Once you are done editing the script in notepad app – Save it as a “.bat” file.

  • Swap out the placeholder with your share’s IP address (In example: \\192.168.X.X or \\domain.local).
  • If your share has spaces in its name use “\\yourserver.local\share name
  • Add as many shares and printers as you want by adding more Net Use lines in the script.

shared_mapping

 

Shared Drive Mapping Sample


echo off
title S Drive Automatic Mapping.

echo Creating new S: Drive Mapping...
net use S: \\yourserver.local\share

:exit
pause

 

Shared Printer Mapping using Net Use command


echo off
echo Mapping YourLocation Printer and Copier...
rundll32 printui.dll PrintUIEntry /in /n \\yourserver.local\PrinterName\
echo Mapping Maintenance Control Printer and Copier...
Net Use LPT1 \\yourserver.local\PrinterName\ /Persistent:Yes
:exit
pause

Speedtests and Network Jitter

Everyone should have a basic understating of Ping, Download Mbps/Kbps and Upload Mbps/Kbps in regards to network speed tests. Recently I noticed after an update that my speedtest.net app on my android now had another metric: Jitter. I took to google search and where else should you go to find reputable information on networking besides cisco! So I read up and basically network jitter is a measurement of congestion on Cellular Voice or VoIP Networks.  When a speed test is performed on a desktop or laptop computer the jitter metric is not displayed as they are not affected by jitter.  You will only see this metric on a mobile device speed test.  So the next time you make or receive a phone call and you notice that everything sounds robotic or garbled – that is network Jitter!

Here is the Cisco Definition of Jitter:

“Jitter is defined as a variation in the delay of received packets. At the sending side, packets are sent in a continuous stream with the packets spaced evenly apart. Due to network congestion, improper queuing, or configuration errors, this steady stream can become lumpy, or the delay between each packet can vary instead of remaining constant.”

Cisco – Understanding Jitter in Packet Voice Networks

Click here for a link to Speedtest.net Apps and select your platform.

Disable Adware and Spyware on Nox Player Android Emulator

I have been using Nox player for a while to emulate android on my desktop. I play a few different games on it when I don’t want to play on my phone.  Nox is highly configurable and you can do a lot with it.  One of the first things I noticed though was if I did not have VT enabled – the emulator was very sluggish!  Once enabled it was a night and day difference in performance.  After playing around with the emulator I soon noticed that it installs random apps Automatically!  I assume it is a scheme to where the developers of the emulator get money from installs.  After dealing with it for a while and deleting the random games and apps from the home screen, I finally just decided to search on google about it.  I found several videos that wanted root access to my computer and for me to change stuff in my C:\Windows\System32\drivers\etc folder.  I didn’t really feel comfortable giving that access much less root access to my computer.  I then found another YouTube video that had just the fix I needed!


I also decided to follow the advice and block the IP addresses for the domains that all of adware and spyware from Nox were going to and from.  I liked this idea more than changing the hosts file in C:\Windows\System32\drivers\etc

  1. Press start and type: CMD.exe
  2. Right click on CMD.exe and select “Run as Administrator”
  3. Copy and paste: netsh advfirewall firewall add rule name="Nox Block In" dir=in action=block remoteip=220.181.0.0-220.181.255.255,183.128.0.0-183.143.255.255,182.92.0.0-182.92.255.255,101.200.0.0-101.201.255.255,211.151.0.0-211.151.255.255,198.11.128.0-198.11.191.255,124.160.0.0-124.160.255.255,140.205.0.0-140.205.255.255,110.173.192.0-110.173.223.255,121.52.224.0-121.52.255.255,178.162.216.0-178.162.219.255
  4. Press Enter.
  5. Copy and Paste: netsh advfirewall firewall add rule name="Nox Block Out" dir=out action=block remoteip=220.181.0.0-220.181.255.255,183.128.0.0-183.143.255.255,182.92.0.0-182.92.255.255,101.200.0.0-101.201.255.255,211.151.0.0-211.151.255.255,198.11.128.0-198.11.191.255,124.160.0.0-124.160.255.255,140.205.0.0-140.205.255.255,110.173.192.0-110.173.223.255,121.52.224.0-121.52.255.255,178.162.216.0-178.162.219.255
  6. Press Enter
  7. Type Exit to close CMD.exe

This  will create a firewall rule in windows that will block all inbound and outbound connections to those IP addresses related to Nox.


References:

Windows Hot-Keys

keyboard

Everyone wants to make life easier, but I still watch co-workers, friends and family peck away at keys or doing things the long way around.  Utilizing these short-cuts will make your life a whole lot easier and you can accomplish your task more efficiently!  So without any further ado here are a few of my favorites!

  • Select all Ctrl + A
  • Cut selection or item(s) Ctrl + X
  • Copy selection or item(s): Ctrl + C
  • Paste selection or item(s): Ctrl + V
  • Switch between windows Alt Tab
  • Scroll between windows WinTab
  • Find Ctrl + F
  • Maximize Current window Win +
  • Minimize Current Window Win + ↓
  • Snap Window to the Left Win + ←
  • Snap Window to the Right Win +
  • Dual Monitor Snap Window to the Left Win + Shift +
  • Dual Monitor Snap Window to the Right Win + Shift +
  • Open Windows Explore Win + E
  • Open Run Menu Win + R
  • Open Task Manager Win + Shift + Esc

Wi-Fi Security Everyone Should Know

Most of the time when we are traveling we don’t want to use all of our mobile data. We would rather stop at a Starbucks or restaurant and connect to their Public Wi-Fi. That is dangerous if you want to do banking or any other financial related tasks online. Your device may not be as secure as you think and someone may be watching your every keystroke or keyboard tap on your smartphone. There are several ways to secure your devices while abroad and mitigate some of the risks of public Wi-Fi. You can use a Virtual Private Network or VPN, which is one of the best ways. You can also use firewall rules to restrict traffic on your PC, Mac or Linux computer. Mobile devices can be lacking in the firewall department though. So we will instead focus on VPNs and the different types and their strengths and weaknesses.

  1. OpenVPN is one of the best options. It has the best encryption. You can use either TCP or UDP protocol.
  2. IPsec or Internet Protocol Security is very common. It authenticates and encrypts data while connected.
  3. L2TP or Layer 2 Tunneling Protocol combines other VPN types such as IPsec for added security. L2TP is very secure.
  4. PTPP or Point to Point Protocol is one of the oldest dating back to Windows 95 era. It is the most widely supported across most if not all operating systems. It has the weakest encryption of the VPN Protocols and is considered less secure.
  5. IKEv2 or Internet Key Exchange version 2 is only considered a VPN when you pair it with IPsec – it is very secure.

I personally have an ASUS RT-AC87R router that comes with a VPN feature. You can select which type of VPN you want to use – I prefer OpenVPN.  Setup is a breeze and it works perfectly!

If you prefer to pay for a service, make sure you do you research!  I look for services that do not keep any logs or records of your internet activities. This gives you even more anonymity while online.  I would stay away from “Free” VPN services as nothing is truly free. They have to make money somehow and my guess is that they are selling your metadata. Here are a few top VPNs: