Posts

Nike+ is awesome

I have been looking to start exercising again recently as I have seen my weight slightly creep up and more importantly my general fitness has been pretty poor. I had to walk up the stairs at a Tube station in London due to the escalators being broken and I was out of breathe at the top. This was the straw that broke the camels back. For my birthday I asked my girlfriend for Nike+. It is a system which has a sensor in your shoe and this connects to either a iPod nano, iPhone, iPod touch or Nike wrist band. This collects data on distance run, time, calories burnt etc. I wasn't quite sure what to expect when I got this for iPod Nano but I was pleasantly surprised. I hooked up the sensor (hidden beneath the left trainer of my Nike+s) to test it and it looked great. You can get feedback on how far you have run, and current pace. Brilliant! The best bit about this though is the community feel at the Nike+ site. When you sync your iPod it will send your results to Nike+ if you cho...

List Add/Remove Programs on Remote Computer

Quite a handy little script for listing programs showing as installed on a remote location without having to check the registry. Modify the computer name in the script. To output the file to a text file, run from dos with a >c:\output.txt command. __________ On Error Resume Next Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 arrComputers = Array("COMPUTERNAMEHERE") For Each strComputer In arrComputers WScript.Echo WScript.Echo "==========================================" WScript.Echo "Computer: " & strComputer WScript.Echo "==========================================" Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32Reg_AddRemovePrograms", "WQL", _ wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each objItem In colItems WScript.Echo "DisplayName: "...

Running a process on a remote machine SILENTLY

Below is the contents of a script to run a process on a remote workstation. It will only run the program silently in the background. As you can't interact this is obviously only recommended to be run on processes which don't require any interaction. The process will run as the user you run the VBS script as, on the workstation specified in the script. ________ strComputer = "remotecomputername" strCommand = "notepad.exe" Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objProcess = objWMIService.Get("Win32_Process") errReturn = objProcess.Create(strCommand, null, null, intProcessID) If errReturn = 0 Then Wscript.Echo "notepad.exe was started with a process ID: " & intProcessID Else Wscript.Echo "notepad.exe could not be started due to error: " & errReturn End If __________

GP Templates for disabling removable devices

Below is a template for additional group policies for enabling/disabling removable devices and detailed in http://support.microsoft.com/kb/555324 Details of how to import the template into a Group Policy are in http://support.microsoft.com/kb/323639 under How to Load the Administrative Template. You may need to select View and untick Show Policies Only for the options to appear under the custom template folder. __________________ CLASS MACHINE CATEGORY !!category CATEGORY !!categoryname POLICY !!policynameusb KEYNAME "SYSTEM\CurrentControlSet\Services\USBSTOR" EXPLAIN !!explaintextusb PART !!labeltextusb DROPDOWNLIST REQUIRED VALUENAME "Start" ITEMLIST NAME !!Disabled VALUE NUMERIC 3 DEFAULT NAME !!Enabled VALUE NUMERIC 4 END ITEMLIST END PART END POLICY POLICY !!policynamecd KEYNAME "SYSTEM\CurrentControlSet\Services\Cdrom" EXPLAIN !!explaintextcd PART !!labeltextcd DROPDOWNLIST R...

Forcing the regional settings via Group Policy using custom templates

Forcing the settings via Group Policy using custom templates --------------------- You may want to read up on Group Policy if you're not familiar with it first. Download and a regional setting .adm file (settings below) into C:\WINDOWS\INF on the domain controller. From Active Directory Users and Computers create a new container and place the users to wish to be affected into that container. Create a new group policy, attach it to the container and edit the settings. Note: This is a user configured policy and not a computer policy and will affect all users that are listed in the container that you attach it too. Click on Administrative Templates underneath User Configuration and select Add/Remove Templates . Browse for the File->Open , and select C:\WINDOWS\INF\RegionalSettings.adm . Close the Add/Remove Templates window. From the group policy window select View->Filtering and untick Only show configured policy settings and Only show policy setti...

Synching Time with Specific Server

Put the below into a .vbs files which will set client to sync time with specified server... dim wshShell set wshShell = CreateObject("Wscript.Shell") wshShell.Run "net time \\SERVERNAME /set /yes", true

Sybase - Restoring Master Dump Process

Restoring a master dump file into a blank Sybase set-up. Install Sybase. Stop services. Rename your current D:\Sybase\Data\master.dat to .old. Change to D:\Sybase\ASE-12_5\bin in CMD Create an empty master db by typing sqlsrvr -d d:\Sybase\Data\master.dat -z 2k -b 40960 this will create a master device which is 80MB in size. Then make a copy RUN_SQLBOX.bat and called it something like MasterRecover.bat . Run it . This will leave a batch file version of the Sybase service running. Don't close it. Load up another CMD window and connect using isql. The SA password will be blank at this point. You need to set the master DB to use more of the master device in order to load the dump. Type alter database master on default "60M" go You then need to change the Sybase backup server name. Type: update sysservers set srvnetname = "SQLBOX_BS" (or whatever the backup servname should be) where srvname ="SYB_BACKUP" go Start the Sybase...