Search Members Help

» Welcome Guest
[ Log In :: Register ]

 

[ Track This Topic :: Email This Topic :: Print this topic ]

reply to topic new topic new poll
Topic: ISODrive shell context menu, Right-click, choose Mount with ISODrive< Next Oldest | Next Newest >
 Post Number: 1
Galapo Search for posts by this member.

Avatar



Group: Members
Posts: 37
Joined: Oct. 2006
PostIcon Posted on: Oct. 15 2006,19:03  Skip to the next post in this topic. Ignore posts   QUOTE

Hi,

I have been a user of UltraISO for a while now, but haven't really had the need to join the forum. However, I felt I would join so I could pass on my AutoIT code that allows for the mounting of images via the windows shell context menu (the menu that appears when you right-click on a file. The code requires that the ISODrive be set up to use I:, but that can be changed by modifying the code below. Hope this is useful to somebody (it is for me, anyway).

Mount image.au3
CODE

#NoTrayIcon
DIM $password

$szLine = ""
For $i = 1 To $CmdLine[0]
  $szLine = $szLine & $CmdLine[$i]
  If $i < $CmdLine[0] Then $szLine = $szLine & " "
Next


If $szLine = "" Then
$contextmenu = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraISO\shell\Mount_with_&IsoDrive", "command")
   If $contextmenu = "" Then
$reg = FileOpen("C:\Program Files\UltraISO\drivers\isodrive.reg", 2 )
       FileWrite($reg, "Windows Registry Editor Version 5.00" & @CRLF)
FileWrite($reg, "" & @CRLF)
FileWrite($reg, "[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraISO\shell\Mount_with_&IsoDrive]" & @CRLF)
FileWrite($reg, '@="Mount with &IsoDrive"' & @CRLF)
FileWrite($reg, "" & @CRLF)
FileWrite($reg, "[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraISO\shell\Mount_with_&IsoDrive\command]" & @CRLF)
FileWrite($reg, '@="\"C:\\Program Files\\UltraISO\\drivers\\Mount image.exe\" %1"' & @CRLF)
FileClose($reg)
RunWait(@ComSpec & " /c " & 'c:\windows\system32\reg.exe import "C:\Program Files\UltraISO\drivers\isodrive.reg"', "", @SW_HIDE)
FileDelete("C:\Program Files\UltraISO\drivers\isodrive.reg")
   EndIf
MsgBox(0x40000, "", "Image could not be detemined...")
Else
If StringInStr($szLine, ".isz") Then
$password = InputBox("Mounting .ISZ file...", "If this image requires a password, please enter it below." & @CRLF & " " & @CRLF & "If no password is required, leave blank.", "", "*")
If @error = 1 Then
Exit
Else
   mount()
EndIf
Else
mount()
EndIf
EndIf

$ISODRIVE = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ISODrive\Parameters\Device0", "DRIVE")
$DRIVEREVERT = "i:"

If $ISODRIVE = "" Then
$ISODRIVE = $ISODRIVE & ":"
$isodriveinstall = FileOpen("C:\Program Files\UltraISO\drivers\IsoDrive_Install.cmd", 2 )
   FileWrite($isodriveinstall, "c:" & @CRLF)
   FileWrite($isodriveinstall, "cd\" & @CRLF)
   FileWrite($isodriveinstall, 'cd "C:\Program Files\UltraISO\drivers"' & @CRLF)
   FileWrite($isodriveinstall, 'isocmd -number 1' & @CRLF)
   FileWrite($isodriveinstall, 'isocmd -change 1 ' & $ISODRIVE & @CRLF)
FileWrite($isodriveinstall, 'isocmd -install' & @CRLF)
   FileClose ($isodriveinstall)
RunWait(@ComSpec & " /c " & '"C:\Program Files\UltraISO\drivers\IsoDrive_Install.cmd"', "", @SW_HIDE)
   FileDelete("C:\Program Files\UltraISO\drivers\IsoDrive_Install.cmd")
EndIf

Func mount()
$ISODRIVE = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ISODrive\Parameters\Device0", "DRIVE")
$ISODRIVE = $ISODRIVE & ":"
$mount = FileOpen("C:\Program Files\UltraISO\drivers\mountiso.cmd", 2 )
FileWrite($mount, "c:" & @CRLF)
FileWrite($mount, "cd\" & @CRLF)
FileWrite($mount, 'cd "C:\Program Files\UltraISO\drivers"' & @CRLF)
FileWrite($mount, 'isocmd -eject ' & $ISODRIVE & @CRLF)
FileWrite($mount, 'isocmd -mount ' & $ISODRIVE & ' "' & $szLine & '" ' & $password)
FileClose ($mount)
RunWait(@ComSpec & " /c " & '"C:\Program Files\UltraISO\drivers\mountiso.cmd"', "", @SW_HIDE)
FileDelete("C:\Program Files\UltraISO\drivers\mountiso.cmd")
EndFunc


Once compiled, the created file---which needs to be named Mount image.exe---needs to be placed in the following location: C:\Program Files\UltraISO\drivers\. Double-click it and the context menu registry entries will be installed and hopefully everything will work...

EDIT: The pasted code looks like it may have a few problems with wrapping, so I've attached the file if needed.


Edited by Galapo on Oct. 15 2006,19:07

Download attachment [ OCTET Stream ]
Number of downloads: 565
Offline
Top of Page Profile Contact Info 
 Post Number: 2
Galapo Search for posts by this member.

Avatar



Group: Members
Posts: 37
Joined: Oct. 2006
PostIcon Posted on: Oct. 15 2006,19:17 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

Not sure what's wrong with the forum, but can't edit my post after about five minutes (I could in the first couple of minutes). There could be a problem with the previous script. The attached file should makes a slight change.

Download attachment [ OCTET Stream ]
Number of downloads: 576
Offline
Top of Page Profile Contact Info 
 Post Number: 3
xoben Search for posts by this member.

Avatar



Group: Super Administrators
Posts: 2200
Joined: Nov. 2004
PostIcon Posted on: Oct. 15 2006,22:35 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

Thanks Galapo for sharing the scripts.

QUOTE
Not sure what's wrong with the forum, but can't edit my post after about five minutes

This problem should have been fixed now.
Offline
Top of Page Profile Contact Info 
 Post Number: 4
User 69 Search for posts by this member.

Avatar



Group: Members
Posts: 18
Joined: Jul. 2006
PostIcon Posted on: Oct. 16 2006,05:00 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

Thank you, Galapo,

it is a good Idea with the context menu.

I don't know anything about scripts. It seems to create a registry key. Does it do any thing else? What schould I do to deinstall?
Offline
Top of Page Profile Contact Info 
 Post Number: 5
Galapo Search for posts by this member.

Avatar



Group: Members
Posts: 37
Joined: Oct. 2006
PostIcon Posted on: Oct. 16 2006,18:24 Skip to the previous post in this topic.  Ignore posts   QUOTE


(User 69 @ Oct. 16 2006,09:00)
QUOTE
Thank you, Galapo,

it is a good Idea with the context menu.

I don't know anything about scripts. It seems to create a registry key. Does it do any thing else? What schould I do to deinstall?

Just delete the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraISO\shell\Mount_with_&IsoDrive

And delete the file "Mount image.exe" from C:\Program Files\UltraISO\drivers\

That should be it.

Regards,
Galapo.
Offline
Top of Page Profile Contact Info 
4 replies since Oct. 15 2006,19:03 < Next Oldest | Next Newest >

[ Track This Topic :: Email This Topic :: Print this topic ]


 
reply to topic new topic new poll

» Quick Reply ISODrive shell context menu
iB Code Buttons
You are posting as:

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code