Friday 22 July 2016

Execute windows commands from Raspberry Pi

On the Windows pc

on an elivated command prompt run:
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\system" /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

on the Raspberry Pi

sudo apt-get update
sudo apt-get install git dh-autoreconf autoconf libc6 samba-dev libtalloc-dev libtevent-dev
gcc-mingw-w64
git clone git://git.code.sf.net/p/winexe/winexe-waf winexe-winexe-waf
cd ./winexe-winexe-waf/source
sudo ./waf configure
sudo ./waf
sudo mkdir /usr/winexe
sudo cp * /usr/winexe/
sudo /usr/winexe/winexe -U USERNAME%PASSWORD --runas=USERNAME%PASSWORD  //IP 'ipconfig'

 If succsessfull this will return the ip settings on your windows pc.

NB! add %% after each line if you make a handsoff script.



Thursday 14 July 2016

"Everything" APT-GET in one command

If you are tired of all the apt-get commands all the time do the following.

sudo nano apg-fresh.sh

sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove && sudo apt-get autoclean

ctrl + o
ctrl + x

sudo chmod +x apg-fresh.sh

./apg-fresh.sh



This script will update, upgrade, autoremove and autoclean without any interaction. I.E keeping everything safe and clean.