CoffeeFiend Posted August 3, 2010 Share Posted August 3, 2010 Why not just one one of the countless mkisofs frontends out there such as this one (open source, autoit; there's plenty of others too, and in pretty much any language you could ask for)? Isn't that what you're looking for (instead of stringing bits & pieces of 3 so-so scripts together)?Also this "LCISOcreator.exe" is this part even needed?Only if you want that particular app started when someone passes a drive name as an argument (it's meant to create ISOs from a disc in the said drive -- not that it even checks if it's a CD/DVD drive though) Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 3, 2010 Author Share Posted August 3, 2010 I am looking for something I can distribute, has to be really small, and must be super id*** proof in the end. (Hence the 3 choices only) Link to comment Share on other sites More sharing options...
CoffeeFiend Posted August 3, 2010 Share Posted August 3, 2010 I am looking for something I can distributeYou can do that with a number of those frontends -- pretty much all those who are open source (like the one I linked to, which was the first hit using Google)has to be really smallMost of the space will be taken by mkisofs in most cases and must be super id*** proof in the end. (Hence the 3 choices only)That can be done fairly easily...Anyhow. Writing such a script (or a HTA or whatever else) is really simple and quick. The main "hurdle" is knowing where you expect things like the bootsector to be stored (AFAIK you can't legally redistribute this either), and any particular tweaks/settings you'd like to use for mkisofs (if any). Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 3, 2010 Author Share Posted August 3, 2010 AFAIK you can't legally redistribute this eitherCrap...Ok I will look into the other options then.I was just pretty excited by what had gotten done so far.Thanks guys Link to comment Share on other sites More sharing options...
cdob Posted August 3, 2010 Share Posted August 3, 2010 The main "hurdle" is knowing where you expect things like the bootsector to be stored (AFAIK you can't legally redistribute this either)There is no need to redistribute the bootsector. It's stored inside spcmdcon.sys. Search for 0xfa 0x33 0xc0 0x8e second match and extract 2048 bytes. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted August 4, 2010 Share Posted August 4, 2010 There is no need to redistribute the bootsector. It's stored inside spcmdcon.sys. Search for 0xfa 0x33 0xc0 0x8e second match and extract 2048 bytes.That would be an option.Anyhow. Here's a quick & dirty VBScript that creates a bootable XP ISO, taking the path as it's only argument (it asks for it if it's invalid or not provided). It should do the trick.The CD is bootable and the files are added (that much is tested) but you *may* have to tweak msisofs' options (haven't actually checked if the whole install runs fine). If that helps, here's the list of cmd line args for mkisofs. Again, very little testing has been done as far as that part is concerned (one VM boots to the CD and that's about it). Feel free to rename the bootsector to whatever you wish instead of bootsect.bin... Option ExplicitConst bootsect = "bootsect.bin"Dim fso, wsh, shl, fld, src, locpath, validSet fso = CreateObject("Scripting.FileSystemObject")Set wsh = WScript.CreateObject("WScript.Shell")locpath=Left(WScript.ScriptFullName,(Len(WScript.ScriptFullName)-Len(Wscript.ScriptName)))If Not fso.FileExists(locpath & "mkisofs.exe") Then MsgBox "mkiofs.exe missing", 16, "Error" 'vbOKOnly=0 vbCritical=16 WScript.Quit(1)End Ifvalid = falseIf WScript.Arguments.Count = 1 Then src=WScript.Arguments(0) ValidateSourcePath()End IfIf Not valid Then Set shl=CreateObject("Shell.Application") While Not valid Set fld=shl.BrowseForFolder(0, "Select source",16,17) '16=BIF_EDITBOX; 17=ssfDRIVES If fld Is Nothing Then WScript.Quit(1) src=fld.Self.Path Set fld=Nothing ValidateSourcePath() Wend Set shl=NothingEnd IfIf Not fso.FileExists(src & "\" & bootsect) Then If Not fso.FileExists(locpath & "\" & bootsect) Then MsgBox "Boot sector missing (" & bootsect & ")", 16, "Error" WScript.Quit(1) Else fso.CopyFile locpath & bootsect, src & "\" End IfEnd Ifwsh.Run chr(34) & locpath & "\mkisofs.exe" & chr(34) & " -b " & chr(34) & bootsect & chr(34) & _ " -no-emul-boot -boot-load-seg 0x7C0 -boot-load-size 4 -hide " & _ chr(34) & bootsect & chr(34) & " -hide-joliet " & chr(34) & bootsect & chr(34) & _ " -hide boot.catalog -hide-joliet boot.catalog -relaxed-filenames -duplicates-once -iso-level 4 -J -l -joliet-long -allow-multidot " & _ "-sysid ""Win32"" -V ""WinXP"" -m thumbs.db -o " & chr(34) & fso.GetBaseName(src) & ".iso" & chr(34) & " " & chr(34) & src & chr(34)Sub ValidateSourcePath()If fso.FileExists(src) Then src=fso.GetParentFolderName(src)If Not fso.FolderExists(src & "\i386") Then Exit Subvalid = trueEnd SubAny changes you need, different language preferred, different mkisofs options, ... Whatever it is, just ask. Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 4, 2010 Author Share Posted August 4, 2010 Hmmm it loops at the browse for folder section. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted August 4, 2010 Share Posted August 4, 2010 Hmmm it loops at the browse for folder section.Is it really a XP CD you're browsing for? It tests to see if a i386 subfolder is in there. It could check for something else if you wanted, or blindly create it disregarding if it contains anything relevant. Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 4, 2010 Author Share Posted August 4, 2010 ** Slams head on keyboard.No it didn't. Can you add option 2 for data iso's also? Link to comment Share on other sites More sharing options...
CoffeeFiend Posted August 4, 2010 Share Posted August 4, 2010 Can you add option 2 for data iso's also?How about when it sees it's not a XP CD (no i386 subdir), it warns you and asks if you'd like to create a data CD instead (messagebox with yes/no btns)? There really isn't a great way to make "menus" using VBScript (the console input methods suck pretty darn badly; for starters, there's nothing in vbscript quite like _getch in C++/ReadKey in C#/choice.com in batch or whatever you'd want to call that) so you'd be looking at using a completely different language instead... Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 4, 2010 Author Share Posted August 4, 2010 That would actually be AWESOME! Link to comment Share on other sites More sharing options...
CoffeeFiend Posted August 4, 2010 Share Posted August 4, 2010 Ok, just a quick change to see if it behaves like you want it to:Option ExplicitConst bootsect = "bootsect.bin"Dim fso, wsh, shl, fld, src, locpath, valid, bootableSet fso = CreateObject("Scripting.FileSystemObject")Set wsh = WScript.CreateObject("WScript.Shell")locpath=Left(WScript.ScriptFullName,(Len(WScript.ScriptFullName)-Len(Wscript.ScriptName)))If Not fso.FileExists(locpath & "mkisofs.exe") Then MsgBox "mkiofs.exe missing", 16, "Error" 'vbOKOnly=0 vbCritical=16 WScript.Quit(1)End Ifvalid=falsebootable=falseIf WScript.Arguments.Count = 1 Then src=WScript.Arguments(0) ValidateSourcePath()End IfIf Not valid Then Set shl=CreateObject("Shell.Application") While Not valid Set fld=shl.BrowseForFolder(0, "Select source",16,17) '16=BIF_EDITBOX; 17=ssfDRIVES If fld Is Nothing Then WScript.Quit(1) src=fld.Self.Path Set fld=Nothing ValidateSourcePath() Wend Set shl=NothingEnd IfIf bootable And Not fso.FileExists(src & "\" & bootsect) Then If Not fso.FileExists(locpath & "\" & bootsect) Then MsgBox "Boot sector missing (" & bootsect & ")", 16, "Error" WScript.Quit(1) Else fso.CopyFile locpath & bootsect, src & "\" End IfEnd IfIf bootable Then wsh.Run chr(34) & locpath & "\mkisofs.exe" & chr(34) & " -b " & chr(34) & bootsect & chr(34) & _ " -no-emul-boot -boot-load-seg 0x7C0 -boot-load-size 4 -hide " & _ chr(34) & bootsect & chr(34) & " -hide-joliet " & chr(34) & bootsect & chr(34) & _ " -hide boot.catalog -hide-joliet boot.catalog -relaxed-filenames -duplicates-once -iso-level 4 -J -l -joliet-long -allow-multidot " & _ "-sysid ""Win32"" -V ""WinXP"" -m thumbs.db -o " & chr(34) & fso.GetBaseName(src) & ".iso" & chr(34) & " " & chr(34) & src & chr(34) Else wsh.Run chr(34) & locpath & "\mkisofs.exe" & chr(34) & " -relaxed-filenames -duplicates-once -iso-level 4 -J -l -joliet-long -allow-multidot " & _ "-sysid ""Win32"" -V ""Data Disc"" -m thumbs.db -o " & chr(34) & fso.GetBaseName(src) & ".iso" & chr(34) & " " & chr(34) & src & chr(34)End IfSub ValidateSourcePath()If fso.FileExists(src) Then src=fso.GetParentFolderName(src)If Not fso.FolderExists(src) Then Exit SubIf fso.FolderExists(src & "\i386") Then valid=true bootable=true Else If MsgBox("The specified folder doesn't contain Windows XP" & chr(13) & chr(10) & "Create a data CD instead?", 36, "Warning") = 6 Then 'vbYesNo=4 vbQuestion=32 vbYes=6 valid=true bootable=false End IfEnd IfEnd SubAgain, I can't vouch for the specific mkisofs options, I'll let you test that stuff If you want to change anything else like where the ISO gets created just let me know. Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 4, 2010 Author Share Posted August 4, 2010 OK next test is done!That seemed to work properly except I cannot find the .iso :SAlso it suggested adding rock ridge to the parameters. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted August 4, 2010 Share Posted August 4, 2010 That seemed to work properly except I cannot find the .iso :SRight now, it gets created wherever you've put the vbscript. Like my previous post says, just let me know where you want it.Also it suggested adding rock ridge to the parameters.I'll wait for a list of known working mkiofs parameters to update that Right now it runs either:"C:\whatever\path\to\mkisofs.exe" -b "bootsect.bin" -no-emul-boot -boot-load-seg 0x7C0 -boot-load-size 4 -hide "bootsect.bin" -hide-joliet "bootsect.bin" -hide boot.catalog -hide-joliet boot.catalog -relaxed-filenames -duplicates-once -iso-level 4 -J -l -joliet-long -allow-multidot -sysid "Win32" -V "WinXP" -m thumbs.db -o "whatever.iso" "c:\here\be\dragons\XP"for a bootable XP CD, or for a data CD:"C:\whatever\path\to\mkisofs.exe" -relaxed-filenames -duplicates-once -iso-level 4 -J -l -joliet-long -allow-multidot -sysid "Win32" -V "Data Disc" -m thumbs.db -o "whatever.iso" "c:\somewhere\here\there\no\over\here\or\whatever"You can try to sort those from a command line perhaps. Find out what works. Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 4, 2010 Author Share Posted August 4, 2010 (edited) Ah then I think there is an issue. The folder was IN the same folder as the script.Anyways I would like the iso the be put in the same dir as the source folder please. Edited August 4, 2010 by Kelsenellenelvian Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now