halikus Posted September 17, 2011 Share Posted September 17, 2011 Hi all. Im fairly new to Autoit and have been trying my best with simple scripting to the point i made a gui with a good 60 commands (a DVD autorun menu, 844 lines by hand). Im at the point now im trying to refine my commands and add the type of flexibility to my GUI that i chose autoit for in the first place. My (main) problem is choosing a variable within a command. For the sake of my question, i will use oscdimg.exe and making a DVD. Im very good at reversing code and learning from other examples, so this one seems complicated yet generic enough that it will aid me in other commands elsewhere. Up until now, its been working fine for me saving to a preordained location. My problem is (in this example) that it saves to a specific place, and if you are on a DVD your save location can't be the script directory (not writable), so i have 2 hardcoded saves. Case $Button98 runWait(@COMSPEC & ' /c boot\autorun\oscdimg.exe -oc -t4/20/1969,4:20:00 -h -u2 -lWIN7 -m -bboot\etfsboot.com %CD% ./Win_oscdimg_BCD.iso') ; Case $Button99 runWait(@COMSPEC & ' /c boot\autorun\oscdimg.exe -oc -t4/20/1969,4:20:00 -h -u2 -lWIN7 -m -bboot\etfsboot.com %CD% %systemdrive%\Win_oscdimg_BCD.iso') Simple enough and works well. What i want to do is choose the save location, and perhaps even the source directory. So far i have a command to pick a save location, and want to know how to incorporate the $var part in the making of the ISO to the $var part in where you choose the save location. I would also like the root a default for the source, but a popup window to choose the source if possible. I like simplicity but want more out of this, and im stumped. If anyone can help assemble this properly its greatly appreciated. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=Autorun.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1_1 = GUICreate("DVD Root Autorun and ISO Makers", 604, 504, 125, 40) $Button1 = GUICtrlCreateButton("Make ISO and save", 1, 1, 300, 40) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $var = FileSaveDialog( "Chooe where to save ISO", @ScriptDir, "Iso (*.iso)", 2) runWait(@COMSPEC & ' /c boot\autorun\oscdimg.exe -oc -t4/20/1969,4:20:00 -h -u2 -lWIN7 -m -bboot\etfsboot.com %CD $var', @ScriptDir) EndSwitch WEndd I think it should be runWait(@COMSPEC & ' /c 'boot\autorun\oscdimg.exe -oc -t4/20/1969,4:20:00 -h -u2 -lWIN7 -m -bboot\etfsboot.com %CD' & $var', @ScriptDir) but it doesnt work. Oh, and you need oscdimg.exe in boot\autorun Also, here is my autorun i handmade to prove i tried to learn and google my inquiry You can see why im finally asking questions on forums after looking at my haggered code. Any suggestions or keywords on how to improve it are allways appreciated. I abide by the KISS principal though (Keep It Simple Stupid). expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=Autorun.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; 804 (width >), 504 (for 800x600 Length ^ v), 200 screen position left and right , 50 screen position up and down ;BIG Menu (3 wide) $Form1_1 = GUICreate("DVD Root Autorun and ISO Makers", 604, 504, 125, 40) ;SMALL Menu (2 wide) ;$Form1_1 = GUICreate("DVD Root Autorun and ISO Makers", 413, 233, 225, 138) ; 1 (constant) , "1" button position down v (same x2 rows), 300 (button width >) (constant) , + 15 or 30 or 60(length down constant) ; 300 (half way, where button starts) , "1" button position down v (same x2 rows), 300 (button width >) (constant) , + 15 or 30 or 60(length down constant) ; $Button1 = GUICtrlCreateButton("Run ssWPI Silent Apps Installer GUI", 1, 1, 300, 40) $Button2 = GUICtrlCreateButton("Install DVD to USB", 300, 1, 300, 45) $Button3 = GUICtrlCreateButton("HDD BCD Boot addons", 300, 45, 300, 45) $Button4 = GUICtrlCreateButton("System Info", 1, 42, 300, 20 ) $Button5 = GUICtrlCreateButton("Enter OS User Settings", 1, 60, 300, 33 ) ; $Button20 = GUICtrlCreateButton("User Account 2 (Autologon)", 6, 94, 192, 20) $Button21 = GUICtrlCreateButton("Folder Settings", 206, 94, 95, 20) $Button22 = GUICtrlCreateButton("Shared Folders", 306, 94, 95, 20) $Button23 = GUICtrlCreateButton("Device Manager", 406, 94, 192, 20) ; $Button24 = GUICtrlCreateButton("Control Panel", 1, 115, 200, 28) $Button25 = GUICtrlCreateButton("Disk Management", 200, 115, 200, 28) $Button26 = GUICtrlCreateButton("Computer Management", 400, 115, 200, 28) ; $Button27 = GUICtrlCreateButton("MY-uninstaller", 6, 144, 192, 22) $Button29 = GUICtrlCreateButton("www MS Updates", 406, 144, 192, 22) $Button30 = GUICtrlCreateButton("Backup HD Letter and Shared Dir Reg", 206, 144, 192, 22) ; ; $Button41 = GUICtrlCreateButton("Check Activation Status", 200, 170, 200, 33) $Button42 = GUICtrlCreateButton("EasyBCD (Edit BCD)", 400, 170, 200, 33) ; ; $Button43 = GUICtrlCreateButton("Install Windows 7 REG tweaks", 1, 205, 300, 50) $Button44 = GUICtrlCreateButton("Split INSTALL.wim", 300, 205, 150, 33) $Button45 = GUICtrlCreateButton("Merge INSTALL.swm", 450, 205, 150, 33) $Button46 = GUICtrlCreateButton("Delete un-needed files from DVD", 300, 240, 300, 20) ; ; $Button60 = GUICtrlCreateButton("VHD Menu c:\", 1, 265, 80, 33) $Button61 = GUICtrlCreateButton("VHD Menu d:\", 80, 265, 80, 33) $Button62 = GUICtrlCreateButton("VHD Menu e:\", 160, 265, 80, 33) $Button63 = GUICtrlCreateButton("VHD Menu f:\", 240, 265, 80, 33) $Button64 = GUICtrlCreateButton("VHD Menu g:\", 320, 265, 80, 33) $Button65 = GUICtrlCreateButton("VHD Menu h:\", 400, 265, 80, 33) $Button66 = GUICtrlCreateButton("Copy Installer To HDD", 480, 265, 120, 33) ; ; $Button70 = GUICtrlCreateButton("Edit Grub4DOS Menu.lst", 1, 304, 350, 20) $Button71 = GUICtrlCreateButton("Edit isolinux.cfg (CD)", 350, 304, 125, 20) $Button72 = GUICtrlCreateButton("Edit syslinux.cfg (USB)", 475, 304, 125, 20) ; ; $Button28 = GUICtrlCreateButton("***SYSprep Win7***", 1, 325, 600, 20) ;$Button74 = GUICtrlCreateButton("Edit Autounattend_BLANK.xml", 250, 325, 177, 20) ;$Button75 = GUICtrlCreateButton("Edit Autounattend_ADMIN.xml", 425, 325, 177, 20) ; ; $Button90 = GUICtrlCreateButton("ISOlinux ISO (mkisofs) (ROOT)", 1, 345, 300, 25) $Button91 = GUICtrlCreateButton("ISOlinux ISO (mkisofs) %Systemdrive%", 300, 345, 300, 25) ; $Button92 = GUICtrlCreateButton("BCDW ISO (mkisofs) (ROOT)", 1, 370, 300, 25) $Button93 = GUICtrlCreateButton("BCDW ISO (mkisofs) %Systemdrive%", 300, 370, 300, 25) ; $Button94 = GUICtrlCreateButton("XP CD (MUST add XP i386) (mkisofs) (ROOT)", 1, 395, 300, 25) $Button95 = GUICtrlCreateButton("XP CD (MUST add XP i386) (mkisofs) %Systemdrive%", 300, 395, 300, 25) ; $Button96 = GUICtrlCreateButton("Grub4DOS ISO (mkisofs) (ROOT)", 1, 420, 300, 40) $Button97 = GUICtrlCreateButton("Grub4DOS ISO (mkisofs) %Systemdrive%", 300, 420, 300, 40) ; $Button98 = GUICtrlCreateButton("BCD ISO (Win7 DVD Default) (oscdimg) (ROOT)", 1, 460, 300, 40) $Button99 = GUICtrlCreateButton("BCD ISO (Win7 DVD Default) (oscdimg) %Systemdrive%", 300, 460, 300, 40) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('ssAppsInstalls\!!!!ssWPI\ssWPI.exe') ; Case $Button2 Run('Autorun.cmd') ; Case $Button3 $Form1_1 = GUICreate("HDD BCD Installer", 413, 230, 225, 138) $Button1 = GUICtrlCreateButton("Install Grub4DOS to HDD BCD", 8, 8, 400, 50) $Button2 = GUICtrlCreateButton("Install WindowsPE to HDD BCD", 8, 70, 400, 50) $Button3 = GUICtrlCreateButton("Install VHD to HDD BCD", 8, 140, 400, 50) ; GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit ; Case $Button1 Run('boot\ADD_GRUB_BCD_HDD.bat') ; Case $Button2 Run('boot\autorun\WINpe_HDD_BCD.bat') ; Case $Button3 Run('boot\autorun\VHD\Apps\BCD_HDD_VHD.bat') ; EndSwitch WEnd ; Case $Button4 Run('boot\autorun\SystemInfo.exe') Case $Button5 Run('boot\autorun\Settings\Settings.exe') ; ; Case $Button20 Run('Control userpasswords2') ; Case $Button21 Run('c:\Windows\System32\rundll32.exe shell32.dll,Options_RunDLL 7') ; Case $Button22 Run('mmc.exe fsmgmt.msc') ; Case $Button23 Run('mmc.exe devmgmt.msc') ; Case $Button24 Run('control.exe') ; Case $Button25 Run('mmc.exe diskmgmt.msc') ; Case $Button26 Run('mmc.exe compmgmt.msc') ; Case $Button27 Run('boot\autorun\myuninst.exe') ; Case $Button28 $answer = MsgBox(4, "SYSprep|", "THIS IS FOR ADVANCED USERS ONLY!!! This will revert you Windows install back to an UNinstalled state keeping changes. Your computer needs to be restarted once to fully update ur system. Do u want to SYSprep? The command used is %systemdrive%\Windows\system32\sysprep\sysprep.exe /generalize /oobe /shutdown.", 60) If $answer = 7 Then Exit EndIf ;runWait(@COMSPEC & ' /c "%systemdrive%\Windows\system32\sysprep\sysprep.exe /generalize /oobe /shutdown"') runWait(@COMSPEC & ' /c "%systemdrive%\Windows\system32\sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:boot\autorun\VHD\c\Overlay\Autounattend.xml"') ; Case $Button29 run(@COMSPEC & ' /c "%windir%\system32\wuapp.exe startmenu"') ; ; Case $Button30 $answer = MsgBox(4, "Drive and Shares Backup|", "This will backup your harddrive Letters and Shares to a reg file on the system drive. Run them and reboot after an install to restore settings. You can also place this in boot\autorun\tweaks or in the OEM folder in the Winbuilder", 60) If $answer = 7 Then Exit EndIf Run('REGEDIT /E "c:\1Drive_names_Backup.reg" "HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices"', @ScriptDir) Run('REGEDIT /E "c:\2Shares_Backup.reg" "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares"', @ScriptDir) ;Run('REGEDIT /E "./1Drive_names_Backup.reg" "HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices"', @ScriptDir) ;Run('REGEDIT /E "./2Shares_Backup.reg" "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares"', @ScriptDir) ; ; Case $Button41 Run(@comspec &" /C slui.exe","", @SW_HIDE) Run(@comspec &" /C slmgr -xpr","", @SW_HIDE) Run(@comspec &" /C slmgr.vbs -dli","", @SW_HIDE) Run(@comspec &" /C slmgr.vbs -dlv","", @SW_HIDE) ; Case $Button42 Run('boot\autorun\EasyBCD\EasyBCD.exe') ; ; Case $Button43 Run('boot\autorun\TWEAKS.exe') ;Run('regedit.exe /s "boot\autorun\RegTweaks\TWEAKS_FULL.reg"', @ScriptDir) ; Case $Button44 runWait(@COMSPEC & ' /c "boot\autorun\VHD\imagex.exe /split sources/install.wim sources/install.swm 500"') RunWait(@comspec & ' /C "del sources\install.wim"',"", @SW_HIDE) ; Case $Button45 runWait(@COMSPEC & ' /c "boot\autorun\VHD\imagex.exe /ref sources/install*.swm /check /export sources/install.swm * sources/install.wim *"') RunWait(@comspec & ' /C "del sources\*.swm"',"", @SW_HIDE) Case $Button46 $answer = MsgBox(4, "Slim DVD|", "This will delete files not needed to slim the DVD. Inside DVD:\Sources ALL THAT IS NEEDED is Start.exe, install.wim and boot.wim. There is an $OEM$ directory in sources that you can use to add files on the fly. The ACTUAL $OEM$ folder used is inside the WinPE on X:\Windows\system32\$OEM$ and copies itself during install, but these files will be overwritten by anything added to the other $OEM$. When booted into WinPE, you can also add files to the X:\Windows\system32\$OEM$ folder as its a ram drive and therefore writeable (unlike a DVD). All the files needed for installation are already in x:\sources, so i utilize that to save space. This deletes the un nessesary files for a clean look.", 60) If $answer = 7 Then Exit EndIf Run('Autorun.cmd') ; ; Case $Button60 ;Run('boot\autorun\VHD\VHD_RUN.exe') ;RunWait(@comspec & ' /C echo f | XCOPY /Y /E /I /Q /H "boot\autorun\VHD\*" %systemdrive%\Windows\VHD',"", @SW_HIDE) ;FileCreateShortcut(@WindowsDir & "\VHD\VHD_RUN.exe",@DesktopDir & "\VHD Control Panel.lnk", @SW_MINIMIZE) ;Run(@comspec & ' /C %systemdrive%\Windows\VHD\VHD_RUN.exe',"", @SW_HIDE) ;exit $Form1_1 = GUICreate("VHD Installer C DRIVE", 413, 230, 225, 138) $Button1 = GUICtrlCreateButton("Create C:\WIN.vhd (16gig)", 8, 8, 187, 33) $Button2 = GUICtrlCreateButton("Physical Drive (HDD) to VHD", 216, 8, 187, 33) $Button3 = GUICtrlCreateButton("VHD Commands.txt", 8, 48, 187, 33) $Button4 = GUICtrlCreateButton("Add C:\WIN.vhd to BCD", 216, 48, 187, 33) $Button5 = GUICtrlCreateButton("Make LastOS x86 to c:\WIN.vhd", 8, 88, 187, 25) $Button6 = GUICtrlCreateButton("Make LastOS x64 to c:\WIN.vhd", 216, 88, 187, 25) $Button7 = GUICtrlCreateButton("C:\install.wim sku1 to C:\WIN.vhd", 8, 120, 187, 15) $Button8 = GUICtrlCreateButton("C:\install.wim sku2 to C:\WIN.vhd", 8, 136, 187, 15) $Button9 = GUICtrlCreateButton("Open Overlay folder", 216, 120, 187, 25) $Button10 = GUICtrlCreateButton("C:\install.wim sku4 to C:\WIN.vhd", 8, 154, 187, 15) $Button11 = GUICtrlCreateButton("C:\install.wim sku5 to C:\WIN.vhd", 8, 172, 187, 15) $Button12 = GUICtrlCreateButton("Capture V:\ To C:\install.wim", 216, 155, 187, 33) $Button13 = GUICtrlCreateButton("MOUNT C:\WIN.vhd to v:\", 8, 190, 187, 33) $Button14 = GUICtrlCreateButton("UN-MOUNT C:\WIN.vhd from v:\", 216, 190, 187, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('DiskPart /s boot/autorun/VHD/c/C_Create.txt') Case $Button2 Run('boot\autorun\VHD\Apps\disk2vhd.exe') Case $Button3 Run('notepad.exe "boot\autorun\VHD\Apps\VHD.txt"') Case $Button4 Run('boot\autorun\VHD\Apps\BCD_HDD_VHD.bat') Case $Button5 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\C_Wim2VHD_x32.bat') Case $Button6 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\C_Wim2VHD_x64.bat') Case $Button7 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:c:\install.wim /sku:1 /vhd:c:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button8 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:c:\install.wim /sku:2 /vhd:c:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button9 Run('explorer ' & "boot\autorun\VHD\Apps\Overlay") Case $Button10 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:c:\install.wim /sku:4 /vhd:c:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button11 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:c:\install.wim /sku:5 /vhd:c:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button12 Run('boot\autorun\VHD\Apps\imagex.exe /compress maximum /capture V: "c:\install.wim" "Windows 7 Ultimate"') Case $Button13 Run('DiskPart /s boot/autorun/VHD/c/C_MountV.txt') Case $Button14 Run('DiskPart /s boot/autorun/VHD/c/C_UnmountV.txt') EndSwitch WEnd ; ; ; Case $Button61 ;Run('boot\autorun\VHD\VHD_RUN.exe') ;RunWait(@comspec & ' /C echo f | XCOPY /Y /E /I /Q /H "boot\autorun\VHD\*" %systemdrive%\Windows\VHD',"", @SW_HIDE) ;FileCreateShortcut(@WindowsDir & "\VHD\VHD_RUN.exe",@DesktopDir & "\VHD Control Panel.lnk", @SW_MINIMIZE) ;Run(@comspec & ' /C %systemdrive%\Windows\VHD\VHD_RUN.exe',"", @SW_HIDE) ;Exit $Form1_1 = GUICreate("VHD Installer D DRIVE", 413, 230, 225, 138) $Button1 = GUICtrlCreateButton("Create D:\WIN.vhd (16gig)", 8, 8, 187, 33) $Button2 = GUICtrlCreateButton("Physical Drive (HDD) to VHD", 216, 8, 187, 33) $Button3 = GUICtrlCreateButton("VHD Commands.txt", 8, 48, 187, 33) $Button4 = GUICtrlCreateButton("Add D:\WIN.vhd to BCD", 216, 48, 187, 33) $Button5 = GUICtrlCreateButton("Make LastOS x86 to D:\WIN.vhd", 8, 88, 187, 25) $Button6 = GUICtrlCreateButton("Make LastOS x64 to D:\WIN.vhd", 216, 88, 187, 25) $Button7 = GUICtrlCreateButton("D:\install.wim sku1 to D:\WIN.vhd", 8, 120, 187, 15) $Button8 = GUICtrlCreateButton("D:\install.wim sku2 to D:\WIN.vhd", 8, 136, 187, 15) $Button9 = GUICtrlCreateButton("Open Overlay folder", 216, 120, 187, 25) $Button10 = GUICtrlCreateButton("D:\install.wim sku4 to D:\WIN.vhd", 8, 154, 187, 15) $Button11 = GUICtrlCreateButton("D:\install.wim sku5 to D:\WIN.vhd", 8, 172, 187, 15) $Button12 = GUICtrlCreateButton("Capture V:\ To D:\install.wim", 216, 155, 187, 33) $Button13 = GUICtrlCreateButton("MOUNT D:\WIN.vhd to v:\", 8, 190, 187, 33) $Button14 = GUICtrlCreateButton("UN-MOUNT D:\WIN.vhd from v:\", 216, 190, 187, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('DiskPart /s boot/autorun/VHD/d/D_Create.txt') Case $Button2 Run('boot\autorun\VHD\Apps\disk2vhd.exe') Case $Button3 Run('notepad.exe "boot\autorun\VHD\Apps\VHD.txt"') Case $Button4 Run('boot\autorun\VHD\Apps\BCD_HDD_VHD.bat') Case $Button5 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\D_Wim2VHD_x32.bat') Case $Button6 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\D_Wim2VHD_x64.bat') Case $Button7 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:d:\install.wim /sku:1 /vhd:d:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button8 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:d:\install.wim /sku:2 /vhd:d:\WIN.vhd /UNATTEND:boot\autorun\VHD\d\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Overlay') Case $Button9 Run('explorer ' & "boot\autorun\VHD\Apps\Overlay") Case $Button10 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:d:\install.wim /sku:4 /vhd:d:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button11 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\WimToVHD.wsf /wim:d:\install.wim /sku:5 /vhd:d:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button12 Run('boot\autorun\VHD\Apps\imagex.exe /compress maximum /capture V: "d:\install.wim" "Windows 7 Ultimate"') Case $Button13 Run('DiskPart /s boot/autorun/VHD/d/D_MountV.txt') Case $Button14 Run('DiskPart /s boot/autorun/VHD/d/D_UnmountV.txt') EndSwitch WEnd ; ; ; Case $Button62 ;Run('boot\autorun\VHD\VHD_RUN.exe') ;RunWait(@comspec & ' /C echo f | XCOPY /Y /E /I /Q /H "boot\autorun\VHD\*" %systemdrive%\Windows\VHD',"", @SW_HIDE) ;FileCreateShortcut(@WindowsDir & "\VHD\VHD_RUN.exe",@DesktopDir & "\VHD Control Panel.lnk", @SW_MINIMIZE) ;Run(@comspec & ' /C %systemdrive%\Windows\VHD\VHD_RUN.exe',"", @SW_HIDE) ;exit $Form1_1 = GUICreate("VHD Installer E DRIVE", 413, 230, 225, 138) $Button1 = GUICtrlCreateButton("Create E:\WIN.vhd (16gig)", 8, 8, 187, 33) $Button2 = GUICtrlCreateButton("Physical Drive (HDD) to VHD", 216, 8, 187, 33) $Button3 = GUICtrlCreateButton("VHD Commands.txt", 8, 48, 187, 33) $Button4 = GUICtrlCreateButton("Add E:\WIN.vhd to BCD", 216, 48, 187, 33) $Button5 = GUICtrlCreateButton("Make LastOS x86 to E:\WIN.vhd", 8, 88, 187, 25) $Button6 = GUICtrlCreateButton("Make LastOS x64 to E:\WIN.vhd", 216, 88, 187, 25) $Button7 = GUICtrlCreateButton("E:\install.wim sku1 to E:\WIN.vhd", 8, 120, 187, 15) $Button8 = GUICtrlCreateButton("E:\install.wim sku2 to E:\WIN.vhd", 8, 136, 187, 15) $Button9 = GUICtrlCreateButton("Open Overlay folder", 216, 120, 187, 25) $Button10 = GUICtrlCreateButton("E:\install.wim sku4 to E:\WIN.vhd", 8, 154, 187, 15) $Button11 = GUICtrlCreateButton("E:\install.wim sku5 to E:\WIN.vhd", 8, 172, 187, 15) $Button12 = GUICtrlCreateButton("Capture V:\ To E:\install.wim", 216, 155, 187, 33) $Button13 = GUICtrlCreateButton("MOUNT E:\WIN.vhd to v:\", 8, 190, 187, 33) $Button14 = GUICtrlCreateButton("UN-MOUNT E:\WIN.vhd from v:\", 216, 190, 187, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('DiskPart /s boot/autorun/VHD/e/E_Create.txt') Case $Button2 Run('boot\autorun\VHD\Apps\disk2vhd.exe') Case $Button3 Run('notepad.exe "boot\autorun\VHD\Apps\VHD.txt"') Case $Button4 Run('boot\autorun\VHD\Apps\BCD_HDD_VHD.bat') Case $Button5 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\E_Wim2VHD_x32.bat') Case $Button6 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\E_Wim2VHD_x64.bat') Case $Button7 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:d:\install.wim /sku:1 /vhd:d:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button8 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:d:\install.wim /sku:2 /vhd:d:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button9 Run('explorer ' & "boot\autorun\VHD\Apps\Overlay") Case $Button10 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:d:\install.wim /sku:4 /vhd:d:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button11 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:d:\install.wim /sku:5 /vhd:d:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button12 Run('boot\autorun\VHD\Apps\imagex.exe /compress maximum /capture V: "e:\install.wim" "Windows 7 Ultimate"') Case $Button13 Run('DiskPart /s boot/autorun/VHD/e/E_MountV.txt') Case $Button14 Run('DiskPart /s boot/autorun/VHD/e/E_UnmountV.txt') EndSwitch WEnd ; ; ; Case $Button63 ;Run('boot\autorun\VHD\VHD_RUN.exe') ;RunWait(@comspec & ' /C echo f | XCOPY /Y /E /I /Q /H "boot\autorun\VHD\*" %systemdrive%\Windows\VHD',"", @SW_HIDE) ;FileCreateShortcut(@WindowsDir & "\VHD\VHD_RUN.exe",@DesktopDir & "\VHD Control Panel.lnk", @SW_MINIMIZE) ;Run(@comspec & ' /C %systemdrive%\Windows\VHD\VHD_RUN.exe',"", @SW_HIDE) ;exit $Form1_1 = GUICreate("VHD Installer F DRIVE", 413, 230, 225, 138) $Button1 = GUICtrlCreateButton("Create F:\WIN.vhd (16gig)", 8, 8, 187, 33) $Button2 = GUICtrlCreateButton("Physical Drive (HDD) to VHD", 216, 8, 187, 33) $Button3 = GUICtrlCreateButton("VHD Commands.txt", 8, 48, 187, 33) $Button4 = GUICtrlCreateButton("Add F:\WIN.vhd to BCD", 216, 48, 187, 33) $Button5 = GUICtrlCreateButton("Make LastOS x86 to F:\WIN.vhd", 8, 88, 187, 25) $Button6 = GUICtrlCreateButton("Make LastOS x64 to F:\WIN.vhd", 216, 88, 187, 25) $Button7 = GUICtrlCreateButton("F:\install.wim sku1 to F:\WIN.vhd", 8, 120, 187, 15) $Button8 = GUICtrlCreateButton("F:\install.wim sku2 to F:\WIN.vhd", 8, 136, 187, 15) $Button9 = GUICtrlCreateButton("Open Overlay folder", 216, 120, 187, 25) $Button10 = GUICtrlCreateButton("F:\install.wim sku4 to F:\WIN.vhd", 8, 154, 187, 15) $Button11 = GUICtrlCreateButton("F:\install.wim sku5 to F:\WIN.vhd", 8, 172, 187, 15) $Button12 = GUICtrlCreateButton("Capture V:\ To F:\install.wim", 216, 155, 187, 33) $Button13 = GUICtrlCreateButton("MOUNT F:\WIN.vhd to v:\", 8, 190, 187, 33) $Button14 = GUICtrlCreateButton("UN-MOUNT F:\WIN.vhd from v:\", 216, 190, 187, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('DiskPart /s boot/autorun/VHD/f/F_Create.txt') Case $Button2 Run('boot\autorun\VHD\Apps\disk2vhd.exe') Case $Button3 Run('notepad.exe "boot\autorun\VHD\Apps\VHD.txt"') Case $Button4 Run('boot\autorun\VHD\Apps\BCD_HDD_VHD.bat') Case $Button5 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\F_Wim2VHD_x32.bat') Case $Button6 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\F_Wim2VHD_x64.bat') Case $Button7 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:f:\install.wim /sku:1 /vhd:f:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button8 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:f:\install.wim /sku:2 /vhd:f:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button9 Run('explorer ' & "boot\autorun\VHD\Apps\Overlay") Case $Button10 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:f:\install.wim /sku:4 /vhd:f:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button11 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:f:\install.wim /sku:5 /vhd:f:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button12 Run('boot\autorun\VHD\Apps\imagex.exe /compress maximum /capture V: "f:\install.wim" "Windows 7 Ultimate"') Case $Button13 Run('DiskPart /s boot/autorun/VHD/f/F_MountV.txt') Case $Button14 Run('DiskPart /s boot/autorun/VHD/f/F_UnmountV.txt') EndSwitch WEnd ; ; ; Case $Button64 ;Run('boot\autorun\VHD\VHD_RUN.exe') ;RunWait(@comspec & ' /C echo f | XCOPY /Y /E /I /Q /H "boot\autorun\VHD\*" %systemdrive%\Windows\VHD',"", @SW_HIDE) ;FileCreateShortcut(@WindowsDir & "\VHD\VHD_RUN.exe",@DesktopDir & "\VHD Control Panel.lnk", @SW_MINIMIZE) ;Run(@comspec & ' /C %systemdrive%\Windows\VHD\VHD_RUN.exe',"", @SW_HIDE) ;exit $Form1_1 = GUICreate("VHD Installer G DRIVE", 413, 230, 225, 138) $Button1 = GUICtrlCreateButton("Create G:\WIN.vhd (16gig)", 8, 8, 187, 33) $Button2 = GUICtrlCreateButton("Physical Drive (HDD) to VHD", 216, 8, 187, 33) $Button3 = GUICtrlCreateButton("VHD Commands.txt", 8, 48, 187, 33) $Button4 = GUICtrlCreateButton("Add G:\WIN.vhd to BCD", 216, 48, 187, 33) $Button5 = GUICtrlCreateButton("Make LastOS x86 to G:\WIN.vhd", 8, 88, 187, 25) $Button6 = GUICtrlCreateButton("Make LastOS x64 to G:\WIN.vhd", 216, 88, 187, 25) $Button7 = GUICtrlCreateButton("G:\install.wim sku1 to G:\WIN.vhd", 8, 120, 187, 15) $Button8 = GUICtrlCreateButton("G:\install.wim sku2 to G:\WIN.vhd", 8, 136, 187, 15) $Button9 = GUICtrlCreateButton("Open Overlay folder", 216, 120, 187, 25) $Button10 = GUICtrlCreateButton("G:\install.wim sku4 to G:\WIN.vhd", 8, 154, 187, 15) $Button11 = GUICtrlCreateButton("G:\install.wim sku5 to G:\WIN.vhd", 8, 172, 187, 15) $Button12 = GUICtrlCreateButton("Capture V:\ To G:\install.wim", 216, 155, 187, 33) $Button13 = GUICtrlCreateButton("MOUNT G:\WIN.vhd to v:\", 8, 190, 187, 33) $Button14 = GUICtrlCreateButton("UN-MOUNT G:\WIN.vhd from v:\", 216, 190, 187, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('DiskPart /s boot/autorun/VHD/g/G_Create.txt') Case $Button2 Run('boot\autorun\VHD\Apps\disk2vhd.exe') Case $Button3 Run('notepad.exe "boot\autorun\VHD\Apps\VHD.txt"') Case $Button4 Run('boot\autorun\VHD\Apps\BCD_HDD_VHD.bat') Case $Button5 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\G_Wim2VHD_x32.bat') Case $Button6 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\G_Wim2VHD_x64.bat') Case $Button7 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:g:\install.wim /sku:1 /vhd:g:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button8 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:g:\install.wim /sku:2 /vhd:g:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button9 Run('explorer ' & "boot\autorun\VHD\Apps\Overlay") Case $Button10 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:g:\install.wim /sku:4 /vhd:g:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button11 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:g:\install.wim /sku:5 /vhd:g:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button12 Run('boot\autorun\VHD\Apps\imagex.exe /compress maximum /capture V: "g:\install.wim" "Windows 7 Ultimate"') Case $Button13 Run('DiskPart /s boot/autorun/VHD/g/G_MountV.txt') Case $Button14 Run('DiskPart /s boot/autorun/VHD/g/G_UnmountV.txt') EndSwitch WEnd ; ; ; Case $Button65 ;Run('boot\autorun\VHD\VHD_RUN.exe') ;RunWait(@comspec & ' /C echo f | XCOPY /Y /E /I /Q /H "boot\autorun\VHD\*" %systemdrive%\Windows\VHD',"", @SW_HIDE) ;FileCreateShortcut(@WindowsDir & "\VHD\VHD_RUN.exe",@DesktopDir & "\VHD Control Panel.lnk", @SW_MINIMIZE) ;Run(@comspec & ' /C %systemdrive%\Windows\VHD\VHD_RUN.exe',"", @SW_HIDE) ;exit $Form1_1 = GUICreate("VHD Installer H DRIVE", 413, 230, 225, 138) $Button1 = GUICtrlCreateButton("Create H:\WIN.vhd (16gig)", 8, 8, 187, 33) $Button2 = GUICtrlCreateButton("Physical Drive (HDD) to VHD", 216, 8, 187, 33) $Button3 = GUICtrlCreateButton("VHD Commands.txt", 8, 48, 187, 33) $Button4 = GUICtrlCreateButton("Add H:\WIN.vhd to BCD", 216, 48, 187, 33) $Button5 = GUICtrlCreateButton("Make LastOS x86 to H:\WIN.vhd", 8, 88, 187, 25) $Button6 = GUICtrlCreateButton("Make LastOS x64 to H:\WIN.vhd", 216, 88, 187, 25) $Button7 = GUICtrlCreateButton("H:\install.wim sku1 to H:\WIN.vhd", 8, 120, 187, 15) $Button8 = GUICtrlCreateButton("H:\install.wim sku2 to H:\WIN.vhd", 8, 136, 187, 15) $Button9 = GUICtrlCreateButton("Open Overlay folder", 216, 120, 187, 25) $Button10 = GUICtrlCreateButton("H:\install.wim sku4 to H:\WIN.vhd", 8, 154, 187, 15) $Button11 = GUICtrlCreateButton("H:\install.wim sku5 to H:\WIN.vhd", 8, 172, 187, 15) $Button12 = GUICtrlCreateButton("Capture V:\ To H:\install.wim", 216, 155, 187, 33) $Button13 = GUICtrlCreateButton("MOUNT H:\WIN.vhd to v:\", 8, 190, 187, 33) $Button14 = GUICtrlCreateButton("UN-MOUNT H:\WIN.vhd from v:\", 216, 190, 187, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('DiskPart /s boot/autorun/VHD/h/H_Create.txt') Case $Button2 Run('boot\autorun\VHD\Apps\disk2vhd.exe') Case $Button3 Run('notepad.exe "boot\autorun\VHD\Apps\VHD.txt"') Case $Button4 Run('boot\autorun\VHD\Apps\BCD_HDD_VHD.bat') Case $Button5 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\H_Wim2VHD_x32.bat') Case $Button6 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('boot\autorun\VHD\Apps\H_Wim2VHD_x64.bat') Case $Button7 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:h:\install.wim /sku:1 /vhd:h:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button8 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:h:\install.wim /sku:2 /vhd:h:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button9 Run('explorer ' & "boot\autorun\VHD\Apps\Overlay") Case $Button10 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:h:\install.wim /sku:4 /vhd:h:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button11 $answer = MsgBox(4, "Wim2VHD|", "This will not work from CD or DVD as it creates a logfile and needs to be writeable. This WILL work from USB or HDD", 60) If $answer = 7 Then Exit EndIf Run('cscript boot\autorun\VHD\Apps\WimToVHD.wsf /wim:h:\install.wim /sku:5 /vhd:h:\WIN.vhd /UNATTEND:boot\autorun\VHD\Apps\Overlay\Autounattend.xml /MERGEFOLDER:boot\autorun\VHD\Apps\Overlay') Case $Button12 Run('boot\autorun\VHD\Apps\imagex.exe /compress maximum /capture V: "h:\install.wim" "Windows 7 Ultimate"') Case $Button13 Run('DiskPart /s boot/autorun/VHD/h/H_MountV.txt') Case $Button14 Run('DiskPart /s boot/autorun/VHD/h/H_UnmountV.txt') EndSwitch WEnd Case $Button66 RunWait(@comspec & ' /C echo f | XCOPY /Y /E /I /Q /H "boot\autorun\VHD\*" %systemdrive%\Windows\VHD',"", @SW_HIDE) FileCreateShortcut(@WindowsDir & "\VHD\VHD_RUN.exe",@DesktopDir & "\VHD Control Panel.lnk", @SW_MINIMIZE) ; Case $Button70 Run('notepad.exe "boot\grub\menu.lst"') ; Case $Button71 Run('notepad.exe "boot\isolinux\isolinux.cfg"') ; Case $Button72 Run('notepad.exe "boot\syslinux\syslinux.cfg"') ; ;Case $Button74 ;Run('notepad.exe "sources\$OEM$\$$\Setup\Settings\Autounattend_TIMEZONES.txt"') ;Run('notepad.exe "sources\$OEM$\$$\Setup\Settings\Autounattend_BLANK.xml"') ; ; Case $Button75 ;Run('notepad.exe "sources\$OEM$\$$\Setup\Settings\Autounattend_TIMEZONES.txt"') ;Run('notepad.exe "sources\$OEM$\$$\Setup\Settings\Autounattend_ADMIN.xml"') ; ; Case $Button90 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -iso-level 4 -volid "ISOlinux" -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -hide boot.catalog -duplicates-once -c boot/isolinux/boot.cat -o Win_mkisofs_ISOLinux.iso ./') ; Case $Button91 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -iso-level 4 -volid "ISOlinux" -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -hide boot.catalog -duplicates-once -c boot/isolinux/boot.cat -o %systemdrive%\Win_mkisofs_ISOLinux.iso ./') ; Case $Button92 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -iso-level 4 -volid "BCDW" -b boot/loader.bin -no-emul-boot -boot-load-size 4 -hide loader.bin -hide boot.catalog -duplicates-once -o Win_mkisofs_BCDW.iso ./') ; runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -iso-level 4 -force-uppercase -volid "BCDW" -b boot/loader.bin -no-emul-boot -boot-load-size 4 -hide loader.bin -hide boot.catalog -duplicates-once -o Win_mkisofs_BCDW.iso ./') ; runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -relaxed-filenames -d -D -J -b bcdw/loader.bin -no-emul-boot -boot-load-size 4 -o Win_bcdw.iso ./') ; Case $Button93 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -iso-level 4 -volid "BCDW" -b boot/loader.bin -no-emul-boot -boot-load-size 4 -hide loader.bin -hide boot.catalog -duplicates-once -o %systemdrive%\Win_mkisofs_BCDW.iso ./') ; runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -iso-level 4 -force-uppercase -volid "BCDW" -b boot/loader.bin -no-emul-boot -boot-load-size 4 -hide loader.bin -hide boot.catalog -duplicates-once -o Win_mkisofs_BCDW.iso ./') ; runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -relaxed-filenames -d -D -J -b bcdw/loader.bin -no-emul-boot -boot-load-size 4 -o Win_bcdw.iso ./') ; Case $Button94 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) ;runWait(@COMSPEC & ' /c boot\autorun\cdimage.exe -lWINcd -oc -t4/20/1969,4:20:00 -h -u2 -m -bboot\etfsboot.com %CD% Win_cdimage.iso') runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -b boot/autorun/XP.bin -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -iso-level 2 -J -joliet-long -l -D -relaxed-filenames -N -V NRMSVOL_EN -v -x .DS_Store -o Win_mkisofs_XP.iso ./') ; Case $Button95 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) ;runWait(@COMSPEC & ' /c boot\autorun\cdimage.exe -lWINcd -oc -t4/20/1969,4:20:00 -h -u2 -m -bboot\etfsboot.com %CD% "%systemdrive%\Win_cdimage.iso"') runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -b boot/autorun/XP.bin -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -iso-level 2 -J -joliet-long -l -D -relaxed-filenames -N -V NRMSVOL_EN -v -x .DS_Store -o %systemdrive%\Win_mkisofs_XP.iso ./') ; Case $Button96 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -R -b boot/grub/grldr -no-emul-boot -boot-load-size 4 -J -joliet-long -l -D -relaxed-filenames -o ./Win_mkisofs_Grub4DOS.iso %CD%') ; Case $Button97 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) runWait(@COMSPEC & ' /c boot\autorun\mkisofs.exe -R -b boot/grub/grldr -no-emul-boot -boot-load-size 4 -J -joliet-long -l -D -relaxed-filenames -o %systemdrive%\Win_mkisofs_Grub4DOS.iso %CD%') ; Case $Button98 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) runWait(@COMSPEC & ' /c boot\autorun\oscdimg.exe -oc -t4/20/1969,4:20:00 -h -u2 -lWIN7 -m -bboot\etfsboot.com %CD% ./Win_oscdimg_BCD.iso') ; Case $Button99 RunWait(@comspec & ' /C "ren boot\autorun\W7USBDVD\USB7.ini USB7.txt"',"", @SW_HIDE) runWait(@COMSPEC & ' /c boot\autorun\oscdimg.exe -oc -t4/20/1969,4:20:00 -h -u2 -lWIN7 -m -bboot\etfsboot.com %CD% %systemdrive%\Win_oscdimg_BCD.iso') ; EndSwitch WEnd 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