The way I like to develop is to create specific virtual machines for my web development.
The chore is to start the machine, mount the file system and then open up your IDE. All a nuisance that takes time. So, I’ve taken to writing a simple Bash script that will do the grunt work for you. All you have to do is put in your settings, save it and run it!
This will mount the VM’s web folder onto your file system and let you know it’s connected. All you need to do is then start your IDE of choice! Continue reading Start and connect to your VirtualBox VM with a simple script
I’ve been setting up a new backup regime on a hosted server that I’m helping to maintain.
One of the key issues right now is that it is there isn’t a solid provided backup regime, so I’ve spent the day playing around with different Linux backup solutions trying to get to the bottom of a simple, yet robust way of backing up.
I like rsync, but the problem is that you can’t use it’s hard linking feature over secure shell. As such, incremental backups are a pain.
I was about to give up on it, and work out a convoluted tar process when it occurred to me that the hard links might still be possible.
And to that end, I wrote this script: Continue reading rsync and the Hard Link Limitation
For shutting down multiple computers on a network:
<code>for /L %C in (1,1,30) do shutdown -f -s -t 0 -m \\ict-%C</code>
This shuts down all Windows computers named ict-X where X is a number from 1 to 30.
I had a little trouble with an HP Printer driver that was causing the Vista PCs to hang at logon.
Without going into the specifics of the problem (which comes down to poor HP drivers), I needed a way to ensure that the driver wouldn’t be active the next time that a user logged onto a computer.
A bit of quick thinking, and I quickly knocked up this command, that will enumerate all users in a folder and make the appropriate change while they are offline. Hurrah!
<code>for /D %D in (\\domain.local\users\*.*) DO (
reg load HKU\UserLoad %D\profile.V2\ntuser.dat
reg delete "HKU\UserLoad\Printers\Connections\,,domainsrv1,Suite Mono Printer" /f
reg delete "HKU\UserLoad\Printers\Connections\,,domainsrv1,Suite Colour Printer" /f
reg unload HKU\UserLoad
This assumes that all of your users live in \\domain.local\users and that you are cleaning up vista profiles. Needless to say, you’d probably want to adjust this if you need to do something similar.
Following on from my remove ranger script, here is a VBScript that will automatically install Ranger packages without the need for the Ranger software on the network.
It’s a little rough around the edges but it gets the job done. At the moment, it doesn’t report any failures if a file cannot be copied etc.
Download the Ranger Install Package Script and save the file as ranger_installer.vbs. Now just drag a package folder onto the script to install.
Note that the code has been removed from this page to prevent WordPress from stripping tags
Sometimes it might be necessary to remove Sentinel’s Ranger software from a computer with the minimum of fuss. Even though there is a removal user account. For instance, this may not work.
So here’s a handy script to automitcally disable Ranger on a workstation. This returns some Windows settings back to normal and backs up the Ranger computer info. Just save the code as DeRanger.cmd and run it on any machine that you want to uninstall Ranger.
If you’re having trouble logging into a workstation, either logon as a local administrator or use the Task Manager to stop rgrUIniut.exe in the Processes tab.
::Stop ranger services
Net Stop ClntCMan
Net Stop SecMon
Net Stop RMNETMON
Net Stop RMNetworkMonitorService
::Remove ranger from winlogon and reset Windows Shell
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v UserInit /t REG_SZ /f /d C:\WINDOWS\system32\userinit.exe
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /f /d Explorer.exe
::Disable ranger services
reg add "HKLM\SYSTEM\CurrentControlSet\Services\ClntCMan" /v Start /t REG_DWORD /f /d 4
reg add "HKLM\SYSTEM\CurrentControlSet\Services\SecMon" /v Start /t REG_DWORD /f /d 4
reg add "HKLM\SYSTEM\CurrentControlSet\Services\RMNETMON" /v Start /t REG_DWORD /f /d 4
reg add "HKLM\SYSTEM\CurrentControlSet\Services\RMNetworkMonitorService" /v Start /t REG_DWORD /f /d 4
::Rename Ranger Registry
reg copy "HKLM\SOFTWARE\Hyperion Security Software" "HKLM\SOFTWARE\Hyperion Security Software_backup" /s /f
reg delete "HKLM\SOFTWARE\Hyperion Security Software" /f
::Rename Rnager Installation Folder
rename "%programfiles%\Ranger" Ranger_
shutdown -f -r -t 0</code>