Jump to content

FileDisk virtual disk driver for Windows NT/2K/X


Recommended Posts

FileDisk by Bo Branten

FileDisk is a virtual disk driver for Windows NT/2000/XP that uses one or more files to emulate physical disks. A console application is included that let you dynamically mount and unmount files. FileDisk can also use CD-images.

Latest news: Works on Windows XP, FileDisk images can be stored on network drives, support for CD-images, support for UNC paths, support for sparse files.

FileDiskExt.dll shell extension to handle iso files written by Sherpya.

Note: Sherpya plug-in is written for WinPe and the inf file should be modifed for use with regular Windows.

You can try my own FileDisk.inf installer (FileDiskExt.dll renamed to FileDisk.dll) to copy three files and install the Shell Extension.

; Inf file author: Bilou Gateux 
;
; FileDisk by Bo Branten
; http://www.acc.umu.se/~bosse/
; FileDisk Shell Extension by Sherpya
; http://oss.netfarm.it/winpe/

; uninstall feature don't works
;

[version]
signature="$Chicago$"
SetupClass=BASE
AdvancedINF=2.5, "%ERROR_WRONG_ADVPACK_VERSION%"

[DefaultInstall]
RequiredEngine = Setupapi,%ERROR_ENGINE_NOTFOUND%
CopyFiles=ThisDll.ShellExt.Install,ThisDll.inf.install,ThisDll.exe.install,ThisDll.sys.install
AddReg=ThisDll.Add.Reg,ThisDll.Uninst.Reg

[DefaultUninstall]
DelFiles=ThisDll.ShellExt.Install,ThisDll.inf.install,ThisDll.exe.install,ThisDll.sys.install
DelReg=ThisDll.Add.Reg,ThisDll.Uninst.Reg

[ThisDll.Add.Reg]
HKCR,CLSID\{844449EE-53BC-4b46-8AC4-EAF476C1CF3B},,,"%Content_DESC%"
HKCR,CLSID\{844449EE-53BC-4b46-8AC4-EAF476C1CF3B}\InProcServer32,,,"%11%\%SubDir%\%ThisDll%"
HKCR,CLSID\{844449EE-53BC-4b46-8AC4-EAF476C1CF3B}\InProcServer32,ThreadingModel,,"Apartment"

HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ShellExtensions\Approved"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ShellExtensions\Approved",{844449EE-53BC-4b46-8AC4-EAF476C1CF3B},,%Content_DESC%

HKCR,.iso,,,"ISOImage"
HKCR,.iso,"InfoTip",,%FileDiskTIPS%

HKCR,ISOImage\,,,%ISOImage%
HKCR,ISOImage\CLSID,,,"{844449EE-53BC-4b46-8AC4-EAF476C1CF3B}"
HKCR,ISOImage\DefaultIcon,,,"%11%\%SubDir%\%ThisDll%,-4"

HKCR,ISOImage\Shell\Open,,,""
HKCR,ISOImage\Shell\Open\Command,,,"rundll32 %11%\%SubDir%\%ThisDll%,MountIso %L"

HKCR,ISOImage\ShellEx\ContextMenuHandlers\{844449EE-53BC-4b46-8AC4-EAF476C1CF3B},,,""

HKCR,Drive\Shellex\ContextMenuHandlers\FileDisk
HKCR,Drive\Shellex\ContextMenuHandlers\FileDisk,,,{844449EE-53BC-4b46-8AC4-EAF476C1CF3B}

[ThisDll.Uninst.Reg]
HKLM,SoftWare\Microsoft\Windows\CurrentVersion\Uninstall\FileDiskExt,,,
HKLM,SoftWare\Microsoft\Windows\CurrentVersion\Uninstall\FileDiskExt,"DisplayName",,%Content_DESC%
HKLM,SoftWare\Microsoft\Windows\CurrentVersion\Uninstall\FileDiskExt,"UninstallString",,"rundll.exe setupx.dll,InstallHinfSection DefaultUnInstall 4 %17%\filedisk.inf"

[ThisDll.ShellExt.Install]
FileDisk.dll

[ThisDll.inf.install]
FileDisk.inf

[ThisDll.exe.install]
FileDisk.exe

[ThisDll.sys.install]
FileDisk.sys

[DestinationDirs]
ThisDll.ShellExt.Install=11,%SubDir%; to System32\%SubDir%
ThisDll.exe.Install=11; to System32
ThisDll.sys.install=11,%Drivers%; to System32\Drivers
ThisDll.inf.install=17; Inf SubDir

[SourceDisksNames]
55="FileDisk 1.1","",1

[SourceDisksFiles]
%ThisDll%=55

[Strings]
Content_DESC = "FileDisk"
SubDir = "ShellExt"
Drivers = "Drivers"
ThisDll = "FileDisk.dll"
ISOImage = "CD-ROM ISO Image"
FileDiskTIPS = "FileDisk"
Reg_Path_Run = "Software\Microsoft\Windows\CurrentVersion\RunOnce\Setup"

Installation:

Extract FileDisk.exe FileDisk.sys and FilediskExt.dll from Sherpya filedisk-1.1.cab archive to a temp folder, Rename FileDiskExt.dll to FileDisk.dll, copy and paste my code edit and save it to filedisk.inf, copy and paste my code edit and save it to filedisk.cmd

To install the kernel-mode device driver FileDisk.sys, i'm using INSTDRVW.EXE console tool:

FILEDISK.CMD

ECHO OFF
:: FileDisk is a virtual disk driver for Windows NT/2000/XP that uses one or more files to emulate physical disks.
:: http://www.acc.umu.se/~bosse/
:: Copy files and set registry keys and values
rundll32 advpack.dll,LaunchINFSection .\filedisk.inf ,DefaultInstall
:: Install Kernel-Mode Device Driver
INSTDRVW.EXE FileDisk %SYSTEMROOT%\SYSTEM32\DRIVERS\filedisk.sys
:: Set Number of Devices
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\FileDisk\Parameters" /v NumberOfDevices /t REG_DWORD /d 4 /f

Link to comment
Share on other sites


Yes it's another idea i would like to use.

As filedisk can handle IMG files (and not only ISO), we can store some valuable data into an img file and mount it when needed. No left data on the local Hard Drive.

I need to have the ability to use command line tool to run it unattended. Reading the features of TrueCrypt, it seems possible to use it with command lines. :)

Link to comment
Share on other sites

2 comments:

For mounting images, why not to use Vitual Clone Drive from Slysoft (Free) ? Seem to be more porwerfull in terms of CD images types handling capacity. Or DaemonTools but limited to ISO.

For valuable data, I suggest to use encrypted volumes rather than just imgs. For such uses jetico products (Bestcrypt) are good, but you can also use Cryptainer (LE is free but limited) or other tools.

Link to comment
Share on other sites

2 comments:

For mounting images, why not to use Vitual Clone Drive from Slysoft (Free) ? Seem to be more porwerfull in terms of CD images types handling capacity. Or DaemonTools but limited to ISO.

For valuable data, I suggest to use encrypted volumes rather than just imgs. For such uses jetico products (Bestcrypt) are good, but you can also use Cryptainer (LE is free but limited) or other tools.

Need only a fast command line tool to mount standard ISO images during UA install. I don't want (need) any GUI. End users don't need to have access to this kind of tools on the installed boxes.

Installing the ShellExtension DLL is not mandatory.

As pointed by Jaclaz, TrueCrypt seems to be a good solution for mounting encrypted containers from the command line.

For my own usage, i can use various solutions.

@buletov

Is your question related to my batch files using filedisk ?

IF :yes: you can hardcoding the letter of mounted image in !mount.cmd batch file.

Just replace %FirstAvailableDriveLetter% with the letter you want to use. I have set the letter through variable to be more versatile.

Link to comment
Share on other sites

For RAW images, not ISO, I still prefer Ken Kato's VDK one:

http://www.msfn.org/board/index.php?showtopic=26216&hl=

as it can be installed, started, stopped, etc. directly.

As ken's is a derivative from Bo's Filedisk, I wonder if it can be "extended" to read ISO files too.

@Bilou_Gateux

I have updated the pseudo GUI for ken's VDK, you can find it at the above link.

jaclaz

Link to comment
Share on other sites

Hi @all,

i need help with filedisk. Does anybody know how to use junction points in combination with filedisk. (e.g. mount image to %SystemDrive%\Programs), or does anybody knows an other commandlinetool to mount imagefiles?

Greetz + thanks in advance

Arndt

Link to comment
Share on other sites

Once the image has been mounted and assigned a drive letter, junction should work allright.

You can try Ken Kato's VDK (see my post above) too.

The problem is, if I am not mistaken, is that junctions ONLY work on the same volume.

jaclaz

Link to comment
Share on other sites

Thank you,

but as i realized this day, junction points (or symlinks) are a ntfs5 feature.

The real story is that Windows has had symbolic links since Windows 2000, or more specifically, NTFS 5.0.

I needed soething like this for cdfs, so i guess there is no way for me...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...