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.nichnetwork.co.uk
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

MS Windows Remotely Delete Profile Script

Use the below script to run a profile cleanup on a remote computer running MS Widows Vista or newer

You will need to download DelProf2 and save it to your PC or a shared network location. Download from here

How to use:

Save the below script as a ‘.bat’ file, Update the robocopy path of where your delprof2 application is being stored.

Running the batch file will present a CMD window asking for the asset tag (also known as hostname) of the PC this task is to be run on.

On entering an asset tag the script will start the remoteregistry service of the remote PC, copy the DelProf2 application across to the local PC and then run the program using the defined criteria

To customize the DelProf2 criteria see the above link for syntax and examples.

 

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

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

REM this line starts the remote registry service
psexec \\%id% cmd.exe /c "net start remoteregistry"

REM Copies the DelProf application to your local PC
robocopy \\Servername\Shared\DelProf c:\ DelProf2.exe /r:0 /w:0


REM Executes DelProf with a config
C:\DelProf2.exe -c:%id% /u /ed:admin* /d:90

pause

Raspberry Pi Base Image

Here is a quick instruction set on how to setup a Raspberry Pi Full Desktop Image with all the basic configuration completed so a fresh build can be put on an SD card from an image so you wont have to start from scratch for each new project/rebuild.

We will be using the official Raspbian Jessie OS but removing all the games and un-needed applications still keeping the desktop GUI, another stripped down image will be made with no GUI later.

**work in progress**

Continue reading Raspberry Pi Base Image

Raspberry Pi Slideshow .PPT .PPTX .ODP

The information below will help you to setup a Raspberry Pi with Raspbian OS that will play a slideshow/PowerPoint presentation using a PPT/PPTX or ODP file.

The system will be setup to automatically login to a desktop, load Libre Office Impress (PowerPoint alternative) and run a slide show presentation with custom slide show settings defined.

Why:

Instead of using a costly full blown MS Windows desktop PC we can use a Raspberry Pi that not only costs hundreds of pounds less to buy but also consumes a minor percentage of power that a full desktop uses as well as being small enough to attach to the rear of the display device.

Continue reading Raspberry Pi Slideshow .PPT .PPTX .ODP