The first thing I do when getting to a new public XP machine is to run a few batch files to stop a whole bunch of processes that are not needed while I do my work.

This only works if I am an administrator, but sadly enough on most public machines this is still the case.

Also most machines run DeepFreeze, so any changes I make are undone at the next reboot.

The batch files I am using are:
  • FixRegistry.cmd fixes some things in the registry, which makes it easier to execute the other batch files.
  • saj.cmd (stop-all-junk): stops unneeded services and kills many common unwanted applications
  • sas.cmd (stop-all-services): stops additional services that are not really needed.
  • sarj.cmd (stop-all-root-junk): Stops some processes that I can not stop as a normal admin, I need to run it with this special command:
    psexec.exe -s C:\bin\sarj.cmd
This runs the batch as the "System" user, make sure you use the full path to the batch file.

You can download the batch files from my download page.

If you don't already have the SysInternals PsTools package, you can download it here
 
Categories: IT Pro | Work on the road

October 9, 2009
@ 02:52 AM

When travelling around the world I plug in my USB devices in countless public computers.

Many viruses use the autorun.inf file to spread themselves around. When plugging in a USB device into an infected computer the virus copies itself into a hidden location, often the Recycler directory and adds a autorun.inf file in the root of the device to automatically start itself on the next computer.

An easy way to notice whether you may have a virus on your device is to create your own autorun.inf and assign an icon to the device.

Create a text file with the name autorun.inf and place it into the root of your device. The content should look like this:

[autorun]
icon=panama.ico

Now place the icon file "panama.ico" into the root of the device as well. The next time you plug in your device the Windows dialog will look like this:

Windows New Device dialog

Notice the icon in the top left corner. If you do not see your icon, you know something has overwritten your autorun.inf, most likely a virus.

What to do in this case? Check my post Manually finding and removing malware

I prepared some icon files in case you do not have any:

icons

icons.zip (27.17 KB)
 
Categories: Work on the road

June 19, 2009
@ 10:02 PM

In the old days rebuilding a Windows machine involved a day or so of post-installation work to set up applications and customize the environment.

Because I travel a lot without a computer I love using 'portable' software that runs from a USB stick. The same software also comes in handy on my home machines.

After a new Windows setup I install only my main work applications: Office, Visual Studio, SQL Server. Then I map two partitions usually from an external drive (so I can move it around). One partition has all my data and the other one has many applications that don't require any installation.

There are dozens of these applications that don't require a set-up procedure, copying them into a folder on a hard drive is enough. These apps fall into two categories, portable apps, that are especially written to not use the registry or documents and settings and only write to there own 'application folder' Many of these can be found at http://portableapps.com. The second category is software that wasn't created as portable but still runs without installation. All kinds of little tools do this and also many small to medium size dot.net applications.

Some issues:

Some apps still write to the registry, the users home directory or isolated storage. So if you are concerned about any privacy data there, make sure to delete this data manually after you are done.

File associations do not work because they are not created during setup (as there was none). If you really need them, you can create them yourself.

Other considerations:

dot.net was created with 'standalone' apps in mind. There are not suppose to use the registry and can be deployed using xcopy (just copy the files). However if you are using the built-in way to save user settings, they go into the user's home directory. Visual Studio promotes to package applications into msi files that can be installed by the end user. These leave entries in the 'installed applications' section of the registry to allow un-installation. I much rather put them into a zip file, the user can see what he/she gets and can just delete the folder if the program is no longer needed. Ideally the program has a feature to delete any saved user settings, as these are hard to find.

If you are only sporadically using some big application like Visual Studio, consider installing it once into a Virtual Machine and then moving/copying it between machines or installations of Windows.

Some standalone Apps I am using:

  • Portable Firefox (portableapps.com)
  • Portable OpenOffice
  • Portable SevenZip
  • Paint.net
  • LiveWriter
  • SharpDevelop
  • Portable Chrome
  • Xamp (Apache, MySQL, Php)
  • Python
  • All sysinternals tools
  • VLCPortable
  • Foxit

Links:
 
Categories: IT Pro | Work on the road

June 19, 2009
@ 06:49 PM

Version: 19-June-2009

As I am going into my fourth year of traveling around the world, I've seen many different setups for shared Windows machines.

I'm using Internet Cafes and PCs in hostels for all my computer usage and the number of viruses and messed up machines I encounter is just amazing.

In Asia in 2005-2007 there were still some Windows 98s around but now in Latin America I only see XP and Vista machines, so I wont talk about Windows 9x, that's a whole different game.

There are a few different ways of how PCs are usually set up:

  1. Bare bones OS, users run as administrator
  2. As 1 but with some AntiVirus software installed
  3. As 2 but users run as standard user
  4. Some software like Deep Freeze is used. This creates a snapshot of an install and than reapplies that snapshot every time the machine boots. So all changes during a user sessions are discarded after a reboot. Microsoft's free SteadyState could be used as well, but I've never seen it in the wild.

In addition to the many many commercial shops run some sort of Cybercafe software that tracks the usage time of the customer and reports back to a central server so the customer can be charged when leaving. The software often adds some restrictions as well, like disallowing access to the registry, taskmanager or cmd.exe. Again many times the users still runs as administrator.

So option 4 doesn't sound too bad, doesn't it, lets explain why it isn't a good option. Take the Oasis hostel in Granada, Nicaragua. Deep Freeze 5 was installed about 15 months ago, every morning after booting up, a clean system was on the machine, problem was it was an unpatched system. Within an hour, Conficker came in from the network and other viruses joined in from USB sticks. For the rest of the day these suckers would do their work and would spread to other USB devices. Having AntiVirus software didn't help much because the virus definitions were totally out of date, as any updates would be overwritten every morning.

So none of these ways are perfect and some cost money. Lets try to solve the problem with builtin/free tools.

First, let's think about what a typical user wants to do on the computer:

  • Surf the Internet
  • Use Skype
  • Use Office
  • Copy photos from a camera to another USB device or upload them to the Internet.
  • Burn files onto CD or DVD
  • Download free music or podcasts and put it on a iPod or another player.
  • View PDF documents
  • Use Chat/Instant Messaging applications

So here's my proposed solution for a fairly secure public Windows machine:

Setup:

  • Install XP or Vista
    Always use a fully licensed version, otherwise certain updates may not work.
  • Apply all Microsoft updates and patches
    Use Internet Explorer and go to update.microsoft.com, I recommend also installing the latest version of the dot.net framework and Silverlight
  • Turn off Fast User switching
    This just confuses uses and may lead to both admin and standard user logged on at the same time, something we don't want.
    Open the control panel and then the 'user accounts' section. Click on 'Change the way users log on or off', untick 'Use fast user switching'.
  • Use a strong password for the administrator account
  • Make sure the Windows Firewall is on
    In the control panel, click on 'Security Center'
  • Make sure Windows Auto update is set to auto download and auto install.
    This makes sure updates are applied when running as standard user. In the control panel, click on 'Security Center' and check the settings for 'Automatic Updates'
  • Install a free Anti Virus package like AVGFree and make sure it is set to update the virus definitions once a day.
  • Make sure autorun is turned off
  • Install alternative keyboard layouts such as Spanish and Hebrew
    In control panel open the 'Date, time, language and regional options' section. Check the checkbox for 'Install files for complex script...'. This is required for Hebrew.
    The click on 'add other languages' and then on the 'Details' button. There you can add additional input languages. Also click on the 'Language bar' button and make sure the language bar is shown so the use can change the language.
  • Install other Software
  • DO NOT install:
    • Adobe Acrobat Reader
      too big and slow, many security problems
    • Nero
      too big and installs too many things you don't want
    • iTunes
      too big, also may delete people's music when trying to sync
    • Any browser plugins and toolbars,
      these are some times nice to have to not necessary.
  • Make sure the installed software doesn't autostart but put an icon on the 'all users' desktop.
    Put a shortcut into C:\Documents and Settings\All Users\Desktop
  • For Vista and Windows 7, turn off UAC.
    The user should not be able to access admin features and should not be prompted for an Admin password.  On the other hand, when using Internet Explorer UAC is valuable for security reasons.
  • Create a new user account.
    Use the 'user accounts' section in control panel. Lets call it 'user'. For convenience reasons with an empty password.
  • Set the autologin to the new user.
  • Make sure the user is only in the user's group not in the administrators group.
    This means the user only has write access to the user's own home directory (C:/documents and settings/username or C:/users/username) and can't change anything else in the system.
  • If you have additional partitions, make sure the user doesn't have write permissions.
    !Explain how to do this!
  • Create a html page that explains the usage of DeepBurner and Floola to users who are used to Nero and iTunes. Put the file on the All Users desktop.
    !A sample file should be created!
  • Optional: Set read-only permissions to the HKCU-Run section in the registry and the Startup folder. This prevents most applications from auto-starting.
    !Explain how to do this!

The user can now do all the things he/she wants to do but can't screw up the system itself. New software and viruses may be installed but they can only affect the user's home directory.

You could now create an disk image of the system and use it for other computers. After using the image make sure to apply all updates.

Maintenance:

Over time the user's home directory is getting messed up with photos, documents and software. So once a week or so you should log on as the administrator and do some clean-up:

  • Delete the user's profile, but not the user itself.
    This deletes everything the user added and brings the system back into a clean state.
    Do do this log off the standard user and log in as the administrator. In the start menu right click on 'My Computer' and choose properties. Under the 'Advanced' tab, click on the 'Settings' button in the 'User Profiles' section. There chose the User account and click 'delete'.
    You can also download a tool from Microsoft to delete the profile from the command line and create a batch file to do this.
  • Windows, Office and your AntiVirus software should be up to date because of auto-update but you should check the third party software for new versions. Another reason to keep the number of these applications low.
  • Log on as the standard user to create a new clean profile.
  • Optional: Set read-only permissions again.

 
Categories: IT Pro | Work on the road

I am in a hostel in Costa Rica and all over the PCs here, the BV:AutoRun-G[Wrm] Virus is popping up when people are using their thumbdrives.

You can delete the autorun.inf file in the root of the drive but it keeps coming back.

avast Antivirus keeps poping up alerts, but a full scan doesn't find any problems.

I searched a little bit but couldn't find a proper solution, formatting the drive didn't help people and the Flash Disinfector tool doesn't seem work either.

I am not an administrator on the machines here, so my tool usage is limited. I can not use Procman.exe to find out who is writing the files after they have been deleted.

Nevertheless, two other SysInternal Tools came to the rescue.

Steps to remove the bugger:
  1. Download 'progexp.exe' and 'Autoruns.exe' from http://live.sysinternals.com
  2. Open the autorun.inf file in a text-editor and find out which executable it is starting.
  3. Start progexp.exe and under the 'Find' menu open 'Find handle or dll'. In the 'Handle or DLL substring' put the name of the executable found in step 2. Most likely you will find it in the explorer.exe process. In my case the virus attached itself to the Windows Explorer process.
  4. Still in progexp.exe find Explorer.exe in the process list and kill it. Now the virus is no longer active on your system.
  5. Delete autorun.inf on your thumbdrive and also all content of the Recycler bin, both on the removable drive and on the local drives.
  6. Open autoruns.exe, click the Logon tab, under the HKCU\Software\Microsoft\Windows\CurrentVersion\Run section may be an entry that points to an executable in the recycle bin. You should have deleted this file in step 5, but also delete the entry here.
  7. Your done, copy 'progexp.exe' and 'Autoruns.exe' to your thumbdrive so you have them handy for the next time you are running into a similar problem.

Update: It looks like the virus is always using explorer.exe, so you can just kill it with Task Manager and then use msconfig.exe to remove the Run entry, or even regedit.exe. So you don't need any external programs, I still recommend the SysInternals tools though.
This shows that often you don't need any dubious third party removal tools to get rid of a virus.

For more information about removing viruses, please check my article Manually finding and removing malware
 
Categories: IT Pro | Work on the road

Over at TechEd South East Asia I had an argument with Clemens Vasters about whether it is safe to do online banking on a machine in an Internet cafe. He said it's absolutly crazy, just like having unprotected sex. I agree it's not a good idea but I'm on the road for 13 months now and have no choice other that check my account once in a while and transfer some and pay bills. I wouldn't say I'm unprotected though. Here's a list of things I do when before I connect to my bands web site:

  • I check the location for any cameras that may record my screen
  • I make sure I have administrative rights, otherwise I'm going on to the next place.
  • I use task manager to check for the obvious viruses
  • I plug in my USB drive to get access to all my tools.
  • I execute my script to kill all user processes.
  • I manually check how well that worked and kill the remaining application.
  • I shut down all third party and non-essential Microsoft services, I really should write a script for this too.
  • I run the www.sysinternals.com RootkitRevealer to find any root kits, which are not visible to the Windows API or Anti-Virus software. This takes a while to run and you have to look at the results carefully.
  • I use Firefox to connect to my bank's site, never use IE, it's much easier to track keyboard and mouse clicks in Internet Explorer.
  • I double check that I'm using SSL/https and that the certificate looks okay.

I would say that I'm now possibly more secure than many workstations within Microsoft, just look at all the stuff those guys are having on their laptops during presentations.


 
Categories: Work on the road

When working on my asp.net projects on the road I never had Visual Studio, so for the first time I had to look into how to compile my projects from the command line.

I started using simple batch files like this one:
%windir\Microsoft.NET\Framework\v1.1.4322\csc.exe /target:library  /debug /reference:TweeNet.Topas.Business\bin\TweeNet.Lib.Core.dll;
TweeNet.Topas.Business\bin\TweeNet.Lib.Data.dll;
TweeNet.Topas.Business\bin\TweeNet.Lib.Web.dll;
TweeNet.Topas.Business\bin\interop.saxfilelib.dll /out:TweeNet.Topas.Business\bin\TweeNet.Topas.Business.dll /resource:TweeNet.Topas.Business\helpers\atom\mediatypes.txt
/recurse:TweeNet.Topas.Business\*.cs
Note that this is all on one line and it compiles all C# source files in a certain directory. A full description of the compiler switches is in the SDK.

I then moved on to use response files which are pretty much the same but a bit cleaner:
/target:library
/out:TweeNet.Topas.UI.Web\bin\TweeNet.Topas.Business.dll
/debug
/nologo
/reference:TweeNet.Topas.UI.Web\bin\TweeNet.Lib.Core.dll
/reference:TweeNet.Topas.UI.Web\bin\TweeNet.Lib.Data.dll
/reference:TweeNet.Topas.UI.Web\bin\TweeNet.Third.Util.dll
/recurse:TweeNet.Topas.Business\*.cs
solutioninfo.cs
put this in a text file 'biz.rsp' and then use it in another batch:
%tndndir\csc.exe @biz.rsp
This assumes I navigated into my working directory or have it in my path. Rather than hardcoding the compiler
here, I use a environment variable %tndndir  pointing to %windir\Microsoft.NET\Framework\vx.x.xxxx\. This way I can easly switch between 1.1 and 2.0 without having to change any of these batch files.

When I moved over version 2.0 of the framework, it all became easier because you can now use your Visual Studio project files as 'make' files.
With MSBuild, the new Microsoft build system you can do somthing like:
%tndndir\msbuild.exe core\TweeNet.Lib.Core.csproj /t:Build /nologo
This means you can use the same project files when at work using Visual Studio and when on the road with just the framework. Of course you need the project file in the first place. If you don't have Visual Studio 2005, they are a bit of a pain to create manually, but you can always get one of the free Express versions to do this for you.

If you are using ASP.Net it's also a good idea after building your project to compile the whole thing including the stuff in the aspx files.
%tndndir\aspnet_compiler.exe -v /topas14/ -p \www\TopasSolution\TweeNet.Topas.UI.Web

For most of my web projects I'm using the old 1.1 web project type. You can do this in Visual Studio 2005 by installing the Visual Studio 2005 Web Application Projects. Back on the road however I don't have Visual Studio and don't need to install the whole lot. Just download the msi file and extract the file 'Microsoft.WebApplication.targets' I'm using the Less MSIƩrables utility for this. Copy the target file onto your USB drive and use a batch file like this to copy it to the correct location:

mkdir "%ProgramFiles%\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications"
copy Microsoft.WebApplication.targets "%ProgramFiles%\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications\"



 
Categories: Work on the road

Often Internet Cafes lock down their XP version to prevent user from doing any damage (and that's in general a good thing), but sometimes you want to do some things that they don't allow you to. Here are some workarounds, the tools mentioned here are describes in the Working from a USB drive entry.

Downloads are disabled in IE
  • Use Firefox for downloads
  • Use a command line tool

Some drives are hidden in Windows Explorer
  • Use File Manager (winfile.exe)
  • Use cmd.exe

Access to Task Manager or the registry is denied by policies

  • Use Process Explorer or Regworks who don't care about the policies
  • If you have admin rights and access to the run command, you can change the policies by copying the following code into a file named openup.vbs and the execute it using cscript.exe openup.vbs
      Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")

      Call SetValue("DisableRegistryTools",0)
      Call SetValue("DisableTaskMgr",0)

      Function SetValue(sKeyName,iValue)

         Const HIVE = &H80000001
         oReg.SetDWORDValue HIVE,"Software\Microsoft\Windows\CurrentVersion\Policies\System",sKeyName,iValue

      End Function

No run command in the Start Menu
Open to C:\windows\system32\cmd.exe or  4NT.exe from your USB drive via Windows Explorer.


 
Categories: Work on the road

July 21, 2006
@ 10:35 AM

For the first 9 months of my round the world trip I hardly touched a keyboard, except for the occassional email check. But after loosing my travel campanion and getting a bit tired of travelling all the time, I started spending more time in Internet cafes around South east Asia. Taking software and data with you on the road is easy these days, all you need is a USB memory device (USB drive) and an XP box somewhere. I'm a Microsoft guy, so please no comments about 'you should boot into your own Linux from your USB drive'. Taking a laptop with me was never an option. I travel around a lot and want to keep my bag light, it's heavy enough already. I started out with an old 64Meg memory stick which shows 'Microsoft .Net Server' in faded letters on its side and also a 5Gig Rio Carbon audio player which I used mostly for listing to music and DotNetRocks podcasts. The Rio became very unreliable when connected to a PC and the stick was getting too small. Luckily I won an 2Gig IPOD Nano at a lucky draw in Bangkok and that's what I use for all my software work. The other two I still use as backup devices.

Web Browsing

The most used application while on the road is certainly a web browser. Yes IE is on every box and why should I care about security issues on a machine in an internet cafe? Well I do care about it because I have my USB drive with my data attached to the box. Also I used Firefox since its Phoenix days and just prefer to browse the public internet with Firefox. If you install Firefox once, you can just copy the Application files over to your USB drive and use it on other machines without installing, however extensions may not work and your preferences are stored in 'Documents and Settings' on the hard drive. One day I discovered 'Portable Firefox', a standard Firefox with a startup wrapper around it that stores all extensions and user files in its Application folder on the USB drive. No data is left on the hard drive. This means you can even store some of your less important passwords for sites in cookies. The only issues I have about this are:

  • I would like to store all my data under a single folder on the USB drive rather than within the Firefox folder.
  • When a new version of Firefox is released it seems to take some weeks before an updated version of Portable Firefox becomes available. However if you install the new version locally and then copy all files from "C:\Program Files\Mozilla Firefox" to \PortableFirefox\App\firefox you get the latest version. No changes have to be made to the wrapper. This worked for me from 1.5.0.3 to 1.5.0.3, for bigger updates it may not work.

Email

I'm using email since 1991, way before the web and never made the switch to web based services. Even with the new Ajax features in the new versions of Yahoo mail or Windows Live mail, the web can never deliver the richness of a proper Windows application.

There is also a portable version of Thunderbird available but as I'm using 'TheBat' as my email client at home, this option was not for me. I do actually have a web based email account as well but doesn't use it very much.

So I wrote two batch files that add and remove Registry entries needed for The Bat! before and after I use the program. Just after I started my trip RiT Labs, the makers of TheBat released a special version to be used on a USB drive called Voyager and it works perfect without any registry entries or any files of the hard drive. It even encrypts your mail data so if you loose your device, it's not accessible to others.

  • It does cost money
  • It also stores data within its application folder.

Office

When writing long entries for my travelog I rather use a proper word processor rather than a rich HTML input box, I also used Excel to manage my travel expenses in spreadsheet. On many PCs you can find pirated version of Microsoft Office but it's not always there. The solution comes from Portable Apps, they have a version of Open Office for the road which is perfectly sufficient for 95% of all non-coporate office work and is similar enough to MS office to get into it quickly. Of course it's free.

Photo editing

I have a map on my travel site which shows my current location and my previous route. I also sometime want to edit some photos I took before I upload them to Flickr. There is mspaint.exe in XP but it's very limited. I had a look at Paint.NET some years ago and as a .net application it runs within having to be installed. The latest version is very powerful and more than enough for what I need to do. You need .net 2.0 for the lastest version but I still found version 2.5 which is the last one that works with .Net 1.1 which is more common in Internet Cafes.

Instant Messengers

I don't really do messenging but just in case I need it, I set myself up with Portable Gaim again from Portable Apps, it supports all the major services in a single app.

Media Players

In most cases these builtin Windows Media Player is suffient but sometimes I want to watch a Quicktime video and don't want to install ITunes (you have to search hard to find a standalone version of the Quicktime played these days). So Portable VLC comes to the rescue. It plays Quicktime and most other formats and in at least one case even played Movie DVDs without installing any additional decoders.

Talking about ITunes, what a pain that software is! You have to install 40Meg just to add a song to your Music player. It also doesn't seems to be very traveller friendly. I put some photos onto the IPOD and changed all possible settings to manual. Still at the next Internet Cafe ITunes synced the photo folder with the MyPhotos on the hard drive which was empty, so ITunes deleted all the photos on the IPOD. Also even though an MP3 file is stored on the IPOD in MP3 format, I can't copy it back onto a hard disk. I can use Explorer and find the file in a hidden directory but the file name has been changed and I have a hard time finding the right file. But there are many third party tools out there that allow you to copy music files back and forth. I use Yamipod which comes as a single .exe and it doesn't require any setup. So much for user friendlyness Apple!. I also considered running NTFS on my IPOD because FAT32 looses sectors once in a while, much more frequent than on a normal hard drive. But Apple doesn't support this and music playback may not work anymore.

Console Tools

My central command line tools is 4NT, see my separate entry for it. The registered version reads the key from the registry but you can just download the latest version, put it on your USB drive and use it for up to 30 days, it's not likely you spend longer at the same computer in the same Internet Cafe in the same place. I have a whole bunch of command line apps and all of them run without setup or registry entries. I would even say that's the nature of command line apps. I may look closer at these later in details, most important is the PsTools Suite  from SysInternals.

GUI Tools

Just a short list of some tools I use and that work perfectly on a USB drive or without reinstalling on you next Windows setup for that matter.

File Manager (Winfile.exe), practically unchanged from the NT3.1 and comes in a single small file. You can get it from NT4 Service Pack 6. After 12 years with NT I never made the switch to Windows Explorer even for my day to day work. Old habits die hard. I know there are many powerful Explorer replacements out there but I never really got into any of them. I love the simplicity and practicality of the two window approach. It also it much faster displaying lists of files because it doesn't have to load any of the icons. Extensions like File Manager StepUP or 'FM Applic' (which I can't find online anymore) are helpful and when using them along with context.exe you can even get the Explorer Context menu for a file in File Manager. However these extensions don't work without setup. Try to find out what's really in your Font folder or the Global Assembly Cache, impossible in Windows Explorer which also may hides whole drives due to software policies. Use File Manager instead, it shows always the raw files. But don't get too excited, winfile.exe will no longer work under Windows Vista, read more.

Sysinternals tools - As Scott Hanselman says 'These guys are gods' and in addition to the command line tools their GUI stuff is just as good. Autoruns, FileMon, RegMon and Process Explorer and musts and all their stuff runs without setup consisting normally of just one file. Old versions of the monitor programs has separate driver files but these are now part of the executable and are installed temporarilty when the app starts.

Notepad2 or any other good notepad replacement, a decent text editor is just essentials for any type of work.

Foxit Reader is a free PDF reader that comes in a single file and works great from a USB drive, now you never have to use Acrobat Reader anymore. They just release a beta for version 2.0

.Net Tools

The two I use the most are Reflector and RegexDesigner.NET but most small .net tools work fine standalone. If there install something into the GAC, you may just copy the files into the Apps bin folder and it should work on the next machine, use File Manager or the command file to do this. I really don't like the fact the .Net is great for xcopy deployment and then most tools come with MSI installers and then just copy 5 files into a single directory (But you don't know that and this black box could do all kinds of things to your machine). A simple zip files with the files is much nicer and feels much safer. The MSI package also leaves an entry in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall which fills up the list of installed software.

Developer Tools

Dependency Walker used to come with the SDK and NT resource kits and even in these .NET days it is still are very valueable to to find out about broken application.

SharpDevelop is a free IDE for .Net languages C#, VB.NET and Boo and works great from a USB drive except that in my case it doesn't seems to remember the location of the code completion database and asked me again to create a new one on every new machine.

.Net Framework

Both the runtime and the SDK have to be installed (no surprise here) but having copies of the setup programs on your USB drive allows you to install them in a few minutes. Usually no reboots but you have to have admin rights. The SDK tools themselves work standalone, so you can copy them onto your USB drive once.

Web Development

Surprisingly many Internet Cafes use the administator user for their customers, so you have all control over the box and can even do web development by installing a web server. If you have XP Pro you can install IIS, I didn't have an XP CD with me and in some countries I couldn't find any Cafes that had one either. So I'm carrying the IIS files from SP2 with me, there are about 6Meg and I just have them on my USB drive. Below is a list with all the files you need.

If you only have an XP home edition you can use the Cassini web server, several different versions are available online.

If you have moved to 2.0 like me, you can use the ASP.Net development web server that comes with any Visual Studio version. It also comes with the 2.0 Framework SDK but that's also 400 MB and you don't want to install either the SDK or Visual Studio on a machine just for an hours work. You actually only need three files to get the web server to work: WebDev.WebServer.EXE, WebDev.WebServer.exe.manifest and WebDev.WebHost.dll. Just copy them into any directory on your USB drive and use them from there. You need to copy them from a box with Visual Studio or the SDK installed. The first two files are in \WINDOWS\Microsoft.NET\Framework\v2.0.50727 the last one is in \Windows\assembly\GAC_32\WebDev.WebHost\8.0.0.0__b03f5f7f11d50a3a\ To get to the last one use cmd.exe because Windows Explorer hides the real GAC content from you. I use a small batch file to start the web server:

start /B \apps\webserver\WebDev.WebServer.EXE /port:80 /path:\mywebsite\wwwroot\

The /B switch of the start command makes sure it doesn't start a new console windows, which would be useless because the server doesn't
output any status or debug messages.

Others

If your favourite apps require some registry settings to work, export them into a .reg file using Regedit.exe. Then create two batch files to add and remove the settings before and after you are using the app of a third party machine. A batch file for setup could look like this:

regedit.exe /i /s app1.reg
regedit.exe /i /s app2hklm.reg
regedit.exe /i /s app2hkcu.reg

and for clean up:

regedit.exe /u /s app1.reg
regedit.exe /u /s app2hklm.reg
regedit.exe /u /s app2hkcu.reg

Most apps use settings in both Local Machine and Current User hives so make sure you export both.

copyiisfiles.zip (.9 KB)
 
Categories: Tools | Work on the road