Category Archives: Geek

Sweet computer stuff I have found

Configure Client Network Time (NTP)

Information directly copied from : https://www.cs.cmu.edu/~help/networking/ntp.html –

for quic ref…

 Windows 7

Windows 7 systems benefit from using the full set of NTP servers, but cannot be configured to obtain NTP server information from DHCP. Because the control panel does not allow setting multiple servers, settings on these systems must be verified and changed from a command prompt. Systems which are members of the SCS domain will receive NTP configuration via domain group policy and should not be reconfigured.

Continue reading Configure Client Network Time (NTP)

Li-ion battery overcharge

So one day I left a Voyo A1 mini tablet charging for a little too long, I thought, oh well – I will replace the battery at a later time and just leave it in a box for now.

Leaving an over charged Li-ion battery in a box for 7 months isn’t the best things to do ….

IMG_20151119_190150

Sorting some things out some time later I found the unit and wondered why the box wouldn’t shut completely, a peak in side and I see the below! luckily the box wasn’t kept next to a heat source as i guess things could of been worse.

IMAG0046

Site Address Change

As you can see this blog is now being hosted from Blog.AdieNicholls.co.uk (or AdieNicholls.co.uk/blog).

In the past I have moved WordPress installs from development to live and also live migrations without any issues until I came to move this site.

I had carried out all the normal steps to moving a WP install;

  • Backup root folder
  • Backup database
  • Change site location in settings>general>WordPress Address (URL) and Site Address (URL)
  • Export database
  • Upload root folder
  • Import Database
  • Run the following SQL command to update any paths that are outstanding:

Continue reading Site Address Change

MS Windows Query Internet Explorer Version

The below script will remotely query MS Windows 7+ for what version of Internet Explore a PC has installed.

Download PSEXEC here

How to use:

Ensure you have PSEXEC installed and ready for use,  more info here

Save the below to a ‘.bat’ file of whatever name you like. On running the batch file you will be asked for a hostname, enter the hostname and press the enter key.

Once the Enter key is selected the system will return what version of IE is installed on the remote PC.

 

@echo off
REM *********************************************
REM A.Nicholls
REM http://www.adienicholls.co.uk/blogs
REM 25/05/2016
REM *********************************************

:start
REM Get remote PCs hostname
set /p id=Enter Hostname:

psexec \\%id% -h cmd /c reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v "svcVersion"

Goto Start
:end

MS Windows Remote Installs

Use this script to run a program remotely. In this scenario the script is used to install IE9 onto a remote MS Windows 7 machine.

PSTools Download Link

How to use:

Save the below script as a ‘.bat’ file.
Update the script to reflect the network share where the IE9 (or other) install / upgrade package is stored.

On running the script you will be shown a CMD box asking for an asset tag (also known as hostname). Enter the PC asset tag, select Enter… The Script will connect to the remote computer, copy the installation file over to a C:\temp folder, run the installer using the switches provided and the delete the file once completed.

The script should return an ‘error’ code of 0, this means the installation completed with no issues.

 

@echo off
REM *********************************************
REM A.Nicholls
REM http://www.adienicholls.co.uk/blogs
REM 25/05/2016
REM *********************************************

REM Get remote PCs hostname
set /p id=Enter Hostname:

REM Copy the install file from source to destination PC
robocopy \\Server\shared\ms\ie9 \\%id%\c$\temp\ *.exe /r:0 /w:0

REM executes the copied file through CMD
psexec \\%id% cmd.exe /c "c:\temp\IE9-Windows7-x86-enu.exe" /quiet /closeprograms /update-no /norestart

REM verifying return codes
ECHO ________________________________________________________________
ECHO (1)     Error, opps something went wrong
ECHO (0)     Installation Succeeded
ECHO ________________________________________________________________

REM Cleanup - Delete the previously copied file
psexec \\%id% cmd.exe /c DEL "c:\temp\IE9-Windows7-x86-enu.exe" /q

REM providing a cleaner exit code for the file deletion
if ERRORLEVEL 1 echo *****OOPS, couldnt remove the file*****
if ERRORLEVEL 0 echo cleanup completed

pause