windows


Windows XP: Extend evaluation period (Not a permanent solution)

Recently, an old machine running Windows XP SP3 had its hard disk replaced, since then the OS decided that the license was not valid and considered itself to be in a trial/evaluation 30 days period.
Since the activation/validation services of Windows XP got discontinued we could not reactivate the current setup using the internet.
We tried a few times to activate via phone but it failed as well..

Temporary Solution (mitigating the problem)

To give us some time to think about a solution, whenever Windows XP would say that the evaluation period was expired, we would boot into safe mode and then run this command rundll32.exe syssetup,SetupOobeBnk (in cmd.exe or in the Run option that is in the Start menu) that allows you to reset the evaluation period for up to 4 times (and if used properly will give you 150 days in total to find a solution).

Actual Solution

In the end, we used the installation CD to downgrade the installation using the repair option, then we tried the telephone activation again and it worked!
Although Windows XP was not complaining any more, that caused us some problems with the antivirus, as a shared system library (DLL) that was replaced was not compatible with the antivirus.
To resolve this issue, we booted the machine using a GNU/Linux live CD and replaced the library (DLL) from a backup that was in the old disk.

Warning: Downgrading the system using the installation CD most probably re-enabled old exploits and hacks making the system less secure.
Keep this information in mind as you cannot re-apply the updates to the system not even the security updates any more.


Activate a wireless hotspot on Windows 10 1

Requirements

  • You must be an administrator of the machine to complete this guide.
  • You need to have at least two network devices.
  • One of them needs to have access to the internet and the other one needs to be a WiFi adapter which has Hosted Network support.

To check if your wireless adapter supports the functionality for Hosted Network, open a Command Prompt and type NETSH WLAN show drivers.

To open the Command Prompt, press the buttons Windows+R on your keyboard.
A new run command prompt will appear.
Type in the input box cmd and hit the Enter button.

In the new Command Prompt type NETSH WLAN show drivers, the results should be similar to below.

C:\Users\bytefreaks>NETSH WLAN show drivers
 
Interface name: Wi-Fi
 
    Driver                    : Realtek RTL8188CU Wireless LAN 802.11n USB 2.0 Network Adapter
    Vendor                    : Realtek Semiconductor Corp.
    Provider                  : Realtek Semiconductor Corp.
    Date                      : 3/4/2016
    Version                   : 1027.4.630.2015
    INF file                  : ????
    Type                      : Native Wi-Fi Driver
    Radio types supported     : 802.11n 802.11b 802.11g
    FIPS 140-2 mode supported : Yes
    802.11w Management Frame Protection supported : Yes
    Hosted network supported  : Yes
    Authentication and cipher supported in infrastructure mode:
                                Open            None
                                WPA2-Personal   CCMP
                                Open            WEP-40bit
                                Open            WEP-104bit
                                Open            WEP
                                WPA-Enterprise  TKIP
                                WPA-Personal    TKIP
                                WPA2-Enterprise TKIP
                                WPA2-Personal   TKIP
                                WPA-Enterprise  CCMP
                                WPA-Personal    CCMP
                                WPA2-Enterprise CCMP
                                Vendor defined  TKIP
                                Vendor defined  CCMP
                                Vendor defined  Vendor defined
                                Vendor defined  Vendor defined
                                WPA2-Enterprise Vendor defined
                                WPA2-Enterprise Vendor defined
                                Vendor defined  Vendor defined
                                Vendor defined  Vendor defined
    Authentication and cipher supported in ad-hoc mode:
                                Open            None
                                Open            WEP-40bit
                                Open            WEP-104bit
                                Open            WEP
                                WPA2-Personal   CCMP
    Wireless Display Supported: Yes (Graphics Driver: Yes, Wi-Fi Driver: Yes)

In the results you need to find the line Hosted network supported and verify that the value is set to Yes, if it is not, then you cannot proceed with this wireless network adapter.

In case you got a permission error on the above command, try to open a new Command Prompt with admin rights.

Press the keys Windows+X, in the pop-up menu select Command Prompt (Admin). If your account has enough access rights, a new run command prompt will appear. In the new Command Prompt (Admin) type NETSH WLAN show drivers, the results should be similar to above.

If this failed as well, you cannot proceed with the current account, you either need to sign in with another account or ask your system administrator to perform this task for you.

How to setup the hotspot

In the Command Prompt enter the following command:

NETSH WLAN set hostednetwork mode=allow ssid=BYTEFREAKS key=0123456789

Update ssid=BYTEFREAKS with the name that you want to give your network. e.g. ssid=MY_NETWORK.

Update key=0123456789 with the password that you want to give your network. e.g. ssid=y0m2ZSQ3ng.

The new network will use WPA/WPA2 PSK security policy so your password needs to be at least 8 characters long.

The results will be similar to the following block.

C:\Users\bytefreaks>NETSH WLAN set hostednetwork mode=allow ssid=HIDDEN007 key=0123456789
The hosted network mode has been set to allow.
The SSID of the hosted network has been successfully changed.
The user key passphrase of the hosted network has been successfully changed.

How to activate the hotspot

Once the Hosted Network is created, enter the following command as is to activate it

NETSH WLAN start hostednetwork

C:\Users\bytefreaks>NETSH WLAN start hostednetwork
The hosted network started.

After this step, your network will be visible to connect to but it will not provide its users with internet access.

Please note that due to the lack of commands in the documentation (https://msdn.microsoft.com/en-us/library/windows/desktop/dd815243(v=vs.85).aspx) it is not possible to prevent your hotspot from broadcasting its SSID to everyone. In other words, it is not possible to hide your network from other users, so use a strong password!

hotspot-creation-commands

How to share internet connection with the hotspot

Press on the keyboard Windows+X to open the Power User menu, and select Network Connections.

power-user-menu

You will notice that a there is a new device in this list. The name of this device will be something line Local Area Connection* 12. That device is the new virtual device you created in the previous step to create the hotspot.

network-configuration-before-sharing

Right-click the other network adapter, that has an active internet connection and select Properties.

network-configuration-right-click-device

Click on the Sharing tab.

network-configuration-share-settings

Enable the Allow other network users to connect through this computer's Internet connection option.

From the Home networking connection drop-down menu select the virtual device that we created.

Click OK to close the configuration and apply the changes.

By completing this step, all devices connected to your Hotspot will have access to the internet via the connection of the second network device.


How to restart or shut down Windows through Remote Desktop 2

Assuming you have the following scenario: you are connected to a remote Windows machine via remote desktop and you need to restart it.
Soon you will realize that there is no restart button on the Start menu to click on….
So.. without that button, how do you restart your machine???

Do not fret as there is a way!

To Restart the remote Windows machine

Press the keys Windows+R on the keyboard together, it will pop-up the run command screen.
In the input line type shutdown /r /t 0 and hit the Enter button to restart the machine immediately.

  • The /r option instructs the machine to reboot
  • The /t 0 option sets the number of seconds to delay before executing the restart to 0 (initiate restart process immediately)

To Shut Down the remote Windows machine

Press the keys Windows+R on the keyboard together, it will pop-up the run command screen.
In the input line type shutdown /s and hit the Enter button to shut down the machine immediately.

To Stop a Shut Down or Restart process

To try and stop a shut down process, type shutdown /a and hit enter, it will attempt to abort the shutdown/restart sequence.
Keep in mind though that there still is a high chance for this to fail.


Windows: How to start “Remote Desktop Connection” without the icon shortcut

On a Windows machine we were using recently, all shortcuts icons to system applications got corrupt and they were not linking to the applications they were supposed to link to.

We needed to use Microsoft Remote Desktop Connection without the shortcuts icons. To do so we used the shortcut key of the Run Command screen that allows us to start any application that Windows knows where the binary is.

We pressed the keys Windows+R on the keyboard together and that showed the run command screen. In the input line we typed mstsc and hit the Enter button (you can also click on the OK button on the screen).

Run-mstsc

mstsc is the name that the executable file of Microsoft Remote Desktop Connection application holds in C:\Windows\System32. The easiest way to find the name of a binary is to check the icon shortcut on a machine that it is not corrupted or just search the internet for it.

Using all monitors

If you have multiple monitors that are arranged to form a rectangle, you can instruct mstsc by using the /span parameter to match the Remote Desktop width and height with the local virtual desktop and span across multiple monitors if necessary.

Executing mstsc /span will create a bigger window to the remote machine that will cover all your local monitors. Unfortunately, this window will not operate as if it is composed of multiple monitors. If you set a window to full screen, it will fill ALL local monitors as if they are one.