Friday, January 15, 2010

How-To Run Programs On FAT32/16 Drives As Another User

Flash drives come from the factory FAT-formatted. This is recommended for purposes of speed and extending the drives life, AFAIK. If you want to run a portable application (Eg. one that doesn't require installation) from an external or flash drive, and you use Windows in a multiple user mode as recommended by Microsoft (where you use the computer as a regular user and install programs and perform maintenance as the administrator account), you're stuck in a predicament. Programs stored on FAT file-systems are not able to run as a user with different credentials (which means as the admin in the case of certain utilities which require direct disk access, MyDefrag for example). It's Microsoft's fault for not backporting certain things to the File Allocation Table (couldn't they store the extra ntfs stream data or extant data inside a text file in each directory)?

A solution I've found is to place the shortcut on your Desktop or Start Menu and modify the shortcut's properties to run as a different user (go to right-click, properties, shortcut, Advanced,  and select "Run with different credentials"). In the case of working on someone elses computer you can create a batch file on the portable drive itself which has the runas command, eg "runas /user:administrator Mydefrag.exe scripts\OptimizeMonthy.Myd". That's it!

No comments: