Ever logged on to your machine and wanted lots of software to load. You can use a batch file to start multiple programs instead of clicking on all of the shortcuts. The software should load quicker and only requires one click.
Open a text editor such as notepad and use the following syntax to load the software exe’s…
start C:”\Program Files\Mozilla Firefox\firefox.exe”
start C:\”Program Files\Adobe\Adobe Dreamweaver CS4\Dreamweaver.exe”
start C:\”Program Files\GlobalSCAPE\CuteFTP 8 Professional\cuteftppro.exe”
You can add as many instances of software as you like and even have multiple batch files specifically for what you want to do on the computer. Once you’ve added all of the instances you need then go to save and call the file load-software.bat
Make sure the file doesn’t have a .txt extension and ends in .bat
When developing in PHP it’s easier to deal with errors when you see them in your browser. It’s the quickest and easiest way to see them and eventually fix them. This solution will use PHP 5.2.8.
For this example I’ll be using the php.ini file on a Windows operating system. You should find the php.ini in the following directory..
C:\Program Files\PHP\php.ini
Open this file in a text editor such as Notepad.
On line 354 there should be a line which reads: error_reporting = E_ALL. Make sure this is uncommented (remove any semi-colon from the left of that line). On line 373 these should be a line which reads: display_errors = Off.
Edit that line so it reads display_errors = On. Save the php.ini file and restart your web server – the quickest way to do this is to bring up a command prompt and type “iisreset“.
Be aware that display_errors should only be turned on in a development environment for test purposes only!
If your company is looking to beef up its security somewhat then a free and flexible proxy is a good thing to have. A proxy such as squidnt sits between your users and the Internet and handles requests, usually for websites. It can provide protection for users and use a web cache to make browsing faster. SquidNT is a free Windows version of the popular linux based proxy.
In this How To Solutions guide I’ll walk you through …
- installing SquidNT
- configuring browsers to use the proxy
- Using user authentication across a Windows domain
- Blocking websites of your choice
- Accessing and reviewing web logs of sites users have visited
I write this merely because nearly all of the documentation is for Linux or is outdated and not centralised. This was installed on a Windows XP machine but I imagine it will work on Windows Server 2003 too.
Installing SquidNT
Download SquidNT 2.7 here – you’re looking under binaries for 2.7 STABLE5, the Standard build type which is in zip format.
Unzip the squid file to your desktop. This should create a squid folder – move it into your C: drive at the top level. Don’t put it in Program Files! Squid doesn’t like spaces in folder structures.
Open up CMD by clicking Start > Run > typing “cmd” > OK. Type in the following commands, pressing Enter after each line.
cd c:\squid
cd sbin
squid.exe -i |
Leave the cmd window open. This will install SquidNT as a Windows service – starting it when the computer first boots.
In Windows Explorer navigate to C:\squid\etc. Rename the four files in there so that the .default extensions are removed from all of them.
Next we will create the Squid cache directories. This should improve browser performance by caching websites locally reducing the need to download each item on the webpage. Create the directories by again using CMD to run the following command:
We can now start Squid running. Open up Windows services by clicking Start > Control Panel > Administrative Tools > Services. You should see Squid listed there – right click it and Start.
Configuring Browsers
Firefox (v2)
Tools > Options > Advanced > Network tab > Settings.
Click on “Manual proxy configuration” and enter the IP of the machine which SquidNT was installed. For the port use 3128 (the squid default).
Internet Explorer (v7)
Tools > Internet Options > Connections tab > LAN Settings
Under the proxy server section click the “Use a proxy server for your LAN” box. For the server use the IP of the machine SquidNT was installed on and use port 3128 (the default for Squid).
Testing
Once the settings are saved in the browser of your choice then test to make sure you can still access websites. You can see the access logs if you navigate to C:\squid\var\logs\access.log and open it in a text editor.
User Authentication on a Windows domain
If you’re going to run the Squid proxy over a Windows domain using Active Directory then rather than log an IP address you can set Squid to log authenticated users. This comes in particular use when reviewing the logs later on.
Open up Windows Services (Control Panel > Administrative Tools > Services) and stop Squid. You need to go to C:\squid\etc and open the squid.conf file in a text editor.
Go to line 292 which should be a blank line below “#auth_param basic casesensitive off”. Paste in the following and leave a blank line below it.
auth_param ntlm program c:/squid/libexec/mswin_ntlm_auth.exe
auth_param ntlm children 5 |
We then determine the access control list (ACL) that will allow only authenticated users on the network to go through the proxy. Navigate to line 623 (it might be a few lines more due to the previous input!) and look for the blank line below “acl CONNECT method CONNECT”. Paste in the following
| acl localnet proxy_auth REQUIRED src 10.0.0.1/255 |
Note: Change th IP range to suit your specific network. I have used 10.0.0.x as an example but you may use another range.
Once that is pasted in scroll down again until line 649 (again this will be lower due to the two previous pastes. Look for the line that reads “http_access deny manager”. Under that line paste the following…
| http_access allow localnet |
At this point you should save the squid.conf file and restart Squid as a Windows Service. Go back to your favourite web browser and make sure you can still access sites. Again you can check the access logs (C:\squid\var\logs\access.log) to make sure the Windows authentication is being recorded.
Blocking Websites
A very good reason to use a web proxy is to block websites across a network that could be potentially harmful. Again we’ll need to use the squid.conf file to declare which sites to block.
Open up squid.conf and look for where you pasted in “acl CONNECT method CONNECT” around line 628. Create a new blank line BELOW this line. It should be directly above an earlier line you pasted in (acl localnet proxy_auth REQUIRED src 10.0.0.1/255). Paste in the contents below making sure to edit the URLs. I have used Facebook and Myspace as an example but you can use anything.
acl facebook url_regex facebook.com
acl myspace url_regex myspace.com |
This should create something that looks like what is in the box below.
acl CONNECT method CONNECT
acl facebook url_regex facebook.com
acl myspace url_regex myspace.com
acl localnet proxy_auth REQUIRED src 10.0.0.1/255 |
Now let’s look for line 655 (again it will be somewhere near there but depends on the earlier pastes). Look for the line that reads “# Only allow cachemgr access from localhost”. Make the http_access lines read like in the box below. It is important to make sure “http_access allow localnet” is the last line in this section. If you have added more sites to be blocked then use “http_access deny name”, where ‘name’ is what you defined in the acl section (acl name url_regex urlforname.com).
http_access allow manager localhost
http_access deny manager
http_access allow manager localhost
http_access deny manager
http_access deny facebook
http_access deny myspace
http_access allow localnet |
Lastly scroll up to line 613 (or there abouts). Look for the section that reads like the box below. We don’t want to include this section so put a hash sign (#) before each acl statement.
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network |
Save squid.conf and close the file. Restart the Squid service and make sure your browsers can see the Internet.
Reviewing Web Logs
To review Squid logs I wouldn’t recommend opening the log file in a text editor. I’ve previously used Kraken Reports though it’s not very nice to look at. In fact all free Squid log analysers for Windows I’ve seen are fairly horrible. It would be nice to find a well made one that was more flexible.
If you have an Abit IP35-E motherboard and your computer suddenly wont boot then this is the help you need.
The Problem: You go to turn on your computer and all the power and fans come on but there is no POST (power on self test) beep and the machine wont boot. Instead the computer just stays on with the screen remaining blank.
Solution: Firstly turn the machine off and remove all of your USB devices and any other non essential adapters. Boot up the computer and you should get an error message..
| BIOS ROM Checksum Error |
| Detecting floppy drive A media |
| Drive A error. System halt |
This will lead you to believe and many people will inform you that you need to flash the BIOS. This isn’t true. That’s because without getting to some kind of command prompt this is impossible.
The Solution: Remove your RAM! If you have two or more sticks then remove them until you have just one and try booting up again. Make sure to try each stick of RAM on its own. If you only have one stick of RAM then I’d suggest borrowing the same kind or any compatible memory you can get your hands on.
Your computer should boot normally and possibly bring up an error about not being able to detect the CPU. You should be prompted to press F1 to continue, do that and you should go into Windows. I then powered back down and put the stick of RAM back in and again Windows booted fine but only listed one stick (1GB) as being installed.
And in case you’re wondering the RAM is Crucial Ballistix (I think it’s the DDR2 PC2-6400/DDR2-800).
Click on Start, then Run. In the run dialogue box type cmd and click OK.
This will open a DOS prompt usually pointing to your users My Documents folder in Documents and Settings.
If you wanted to get to a folder called Movies on your E drive then you would type:
E: and then “cd Movies“. This is demonstrated in the image below.

To create the list then type “dir > movielist.txt” naming the text file anything you want. If you want to only export the file names without the file size details then use “dir /b > movielist.txt“. The movielist.txt file will be within the directory it has listed.
Often at work I need to use another PC or log onto a server. Windows systems don’t have remote desktop working by default so rather than have to walk somewhere I’d rather just do it remotely. Here’s how…
Firstly click on Start and then Run. In the box type in “regedit” and hit Enter.
Then click on File and Connect Network Registry as shown in the image below.

This will allow you to connect to another computers registry settings and make the needed changes.
In the next box you can enter the name of the remote computer or browse for it. This will work if you’re on either a Windows workgroup or on a domain. See the image below.

Once you’ve selected the computer click OK and the computer should now be listed in your Registry Editor at the bottom on the left. You need to navigate your way through the hierarchy and go to the following directory: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server.
Clicking on the Terminal Server folder you should see the window on the right populate with about 20 files. Look for fDenyTSConnections. Right click it and click Modify. A box similar to the one below should appear. Simply change the Value Data from 1 (Remote Desktop enabled) to 0 (Remote Desktop enabled).

Once this is changed then click OK to save the change. Remote Desktop will only be enabled once the machine is rebooted; this can also be done remotely. Open up a command prompt (Start > Run > “cmd“) and type: “shutdown -m \\WORKGROUP\PROMETHEUS -r” changing the computer name to the one you connected to.
Just yesterday on New Years Eve 2008 Google did their quarterly PageRank (PR) update. How To Solutions jumped from PR3 to PR4 – back to where it was shortly before this site went live. Not only that but some of the individual pages got their own PageRank.
SQL Week by Week – Now PR2
How To Audit Your Computer – Now PR2
Changing the default font in Office 2007 – Now PR2
How to add a HTML signature to Outlook 2007 – Now PR2
Javascript Wildcard with jQuery – Now PR2
How to add my blog to Google Blog Search – Now PR2
It seems that Google has ranked these pages as they are some of the older and better established pages on the site. Not only that but these pages perform the best through organic search (users typing a search term directly into Google and coming to the site). Considering I have very very few inbound links then the increased PR should greatly help the strength of the site. The How To Install Trac on Windows guide still gets the most daily traffic but this is purely from links and not Google searches.
In 2009 How To Solutions hope to provide more technology solutions. These will probably be based around more javascript, PHP/ASP, SQL, and Wordpress/SEO matters. One of these days I’ll actually put up a form on the contact page.
This is the scenario: You have VPN access to a LAN running on a Windows domain. Once you connect through the VPN you don’t want to remote desktop to a machine but you still need access to the shared network drives that you would get via active directory.
So the easiest solution is to create a batch file that will map to to where the shared drive is using proper Windows authentication across the domain. This is what you need in the batch file.
NET USE Z: \\targetIP\drivename password /USER:domain\username /SAVECRED /PERSISENT:YES
So for How To Solutions it could be something like…
NET USE Z: \\192.168.0.1\solutions$ passw0rd /USER:HowToSolutions\admin /SAVECRED /PERSISENT:YES
This assume that…
- 192.168.0.1 – This is the local IP address of the target machine sharing the drive.
- solutions$ – Is the name of the folder on the target machine.
- passw0rd – Is the password used for your username.
- HowToSolutions – This is the Windows domain you’ve VPN’d to.
- admin – Is the username of the Windows account
- SAVECRED – To use credentials previously saved by the user
- PERSISTENT:YES – This will connect the share the next time you logon.
Put the single line in Notepad or something similar and save it as connect.bat. Now whenever you connect remotely to a network you can access the shared drives. It will use your Windows credentials so make sure you have sharing permissions on any folder/subfolders you try and access.
Background
By default Internet Explorer 7 (IE7) includes header and footer text onto web pages that are printed out. This is fine for most users as be default it lists the date & time and the URL. But you may want a clean page when printing or customised text for the date time etc. Here’s the How To Solutions guide.
Removing the Header Footer Text
In Internet Explorer go to File > Page Setup. You’ll see a box like the one below. In the Headers and Footers section you can remove the default text (&w&bPage &p of &P and &u&b&d). Just delete those bits and press OK.

Creating Custom Header Footer Text
You can also create custom header footer text to print out only the information you want to appear on every page. Use the set of functions below to create your own header footer text.
- &w – Window Title
- &u – Page URL
- &d – Date in short format
- &D – Date in long format
- &t – Time in regular format as shown on the clock
- &T – Time in 24-hour format
- &p – Current page number
- &P – Total number of pages
- &b – right align the next text. (You can see it in the default header, where &b is placed before the Page text)
- &b[TEXT]&b – If you surround the text in &b on either side, it will center the text.
- && – A single ampersand (&)
And that’s how to delete or edit the header footer text that appears when printing from Internet Explorer 7.
Ever created a new signature file in Microsoft Outlook and when you go to send a new message an ActiveX control box appears telling you of an error? Here’s a quick fix that will stop the error from appearing but let you keep your fancy signature.
The Error Message
One or more ActiveX controls could not be displayed because either:
1) Your current security settings prohibit running ActiveX controls on this page, or
2) You have blocked a publisher of one of the controls.
As a result, the page may not display correctly.
The Fix
Firstly, let’s locate your signature folder. Copy one of the following lines (starting at the first %) depending on what your operating system is.
- Vista: %userprofile%\AppData\Roaming\Microsoft\Signatures
- XP-2003: %userprofile%\Application Data\Microsoft\Signatures
Click on Start and then Run – paste the line you copied into the Run box and hit Enter.
You should see 3 files created for your signature file (in .htm, .txt and .rtf formats). If you can’t see the file extensions, go to Tools / Folder Options / View and untick ‘Hide extensions for known file types’, or right-click the file and select ‘Properties’ to determine the file type.
Open the .htm signature file in Notepad or any other text editor. Then go to Edit > Find and type in “object”. You should see that the text editor has highlighted a bit of the signature code. Look for the bit that looks something like this:
<OBJECT id=ieooui classid=clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D></OBJECT>.
Simply remove that whole bit – everything from <OBJECT to /OBJECT>. Save the file and to make sure the ActiveX object doesn’t come back I recommend making the file read only – do this by right clicking the file, going to Properties and making ‘Read-only’ checked.
Go back to Outlook and when you go to send a new message, no more annoying ActiveX object warning.