How to auto-mount images (no gui shown)
#1
Posted 17 December 2008 - 12:19 AM
The action that should follow: the image will automatically be mounted in a virtual CD/DVD drive, without showing the ImgDisk GUI.
Is this possible?
Also, I do not understand 2 options in the GUI wen I mount an ISO CD or DVD image: "Removable media" and "read-only media". When I mount an ISO image to CD/DVD-ROM, these options should always be checked (at least by default) and read-only so you cannot uncheck it, right?
#2
Posted 17 December 2008 - 07:48 AM
Is it possible to change the behaviour of the command that is launched when I right-click a common image file like .ISO, choose "Mount as Imgdisk Virtual disk".
The action that should follow: the image will automatically be mounted in a virtual CD/DVD drive, without showing the ImgDisk GUI.
Is this possible?
You can create a new menu item for this if you like.
Under HKCR\*\shell create a new subkey and name it for example ImDiskAutoMount. Create a subkey under that key and name it command. Edit the default value for that key and type imdisk -a -f "%L" -m #:
Something like that should work.
Also, I do not understand 2 options in the GUI wen I mount an ISO CD or DVD image: "Removable media" and "read-only media". When I mount an ISO image to CD/DVD-ROM, these options should always be checked (at least by default) and read-only so you cannot uncheck it, right?
The checkboxes you are mentioning have no effect for CD/DVD images. But it is still useful to show the GUI so that drive letter and other settings can be changed before mounting the image.
#3
Posted 17 December 2008 - 09:30 AM
http://www.xs4all.nl...dios/Associate/
http://students.kenn...hext_index.html
jaclaz
#4
Posted 17 December 2008 - 10:57 AM
And jaclaz thanks! But I prefer changing it directly in the registry
I have another question that's not related to my previous questions but it might not be worth creating a new topic: I would like to integrate this application in my unattended windows cd, I have add applications to this cd so that if I need a fresh windows install, all my favourite applications are automatically installed.
But I couldn't find a silent switch for imgdisk? If there really isn't one, I am going to create an AutoIt script wich will automatically press OK during imgdisk install.
#5
Posted 17 December 2008 - 12:15 PM
The install package uses 7-zip sfx module which takes a -y switch for silent start. This means:But I couldn't find a silent switch for imgdisk? If there really isn't one, I am going to create an AutoIt script wich will automatically press OK during imgdisk install.
imdiskinst.exe -y...should install everything automatically.
There are also different ways to use scripts to copy necessary files to right places and create the services. The imdisk.inf file in the install package will tell you pretty much what is needed, but essentially something like this:
copy %source%\imdisk.exe %SystemRoot%\system32\ copy %source%\imdsksvc.exe %SystemRoot%\system32\ copy %source%\imdisk.cpl %SystemRoot%\system32\ copy %source%\imdisk.sys %SystemRoot%\system32\drivers\ sc create imdisk type= kernel start= demand error= ignore binPath= system32\drivers\imdisk.sys DisplayName= "ImDisk Virtual Disk Driver" sc create imdsksvc type= own start= demand error= ignore binPath= imdsksvc.exe DisplayName= "ImDisk Virtual Disk Driver Helper"
#6
Posted 17 December 2008 - 05:52 PM
I played with the registry for a while because the "%L" part wasn't working, don't know why, but now it does work. I've created a .reg file that will remove the "mount with Imdisk" option since it is shown for all file types, even non-image files. And it will create a command for image files to mount directly to a virtual drive
The upload function gives me an error so I uploaded the .reg file here:
http://ifile.it/j31z...mountoption.reg
#7
Posted 17 December 2008 - 07:32 PM
No problem!Thanks for the switch, I've created a lot of 7z SFX's with Oleg's modified SFX module so I recognize the -y I should have tried that myself before asking!
Your .reg file removes the mount menu item even for many image file types, for example .vfd, .vhd, .img, .sdi and a few others. This could still be useful if you never mount such image files or if you only mount them from command line or Control Panel. Also, the .reg file breaks other associations of for example .iso files, so if you have a menu option for burning an .iso to a CD it will be removed by this .reg file...I played with the registry for a while because the "%L" part wasn't working, don't know why, but now it does work. I've created a .reg file that will remove the "mount with Imdisk" option since it is shown for all file types, even non-image files. And it will create a command for image files to mount directly to a virtual drive
Otherwise it is of course a good idea!
#8
Posted 17 December 2008 - 07:55 PM
Actually it was an existing reg file I used in combination with Daemontools and Daemonscript. I modified it to work with ImDisk.
I've spend enough time on it for today, might post a better regfile later.
#9
Posted 21 December 2008 - 11:29 PM
This works very well in my XP (HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\--) and is just what I was looking for - Thank you!You can create a new menu item for this if you like.
Under HKCR\*\shell create a new subkey and name it for example ImDiskAutoMount. Create a subkey under that key and name it command. Edit the default value for that key and type imdisk -a -f "%L" -m #:
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users