Jump to content

crump

Members
  • Posts

    7
  • Joined

  • Last visited

crump's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. yes and you have to register it before using it.
  2. hi not sure what you wanna do here, but if you're trying to download a file from the internet, look into InetGet function.
  3. Hi DerekL GImagex has com interface that you can use with your code. for windows 7, download gimagex beta, and there is a help file with vb code, you should check that out. and also this COMRef will help you. to use it in autoit scripting is very easy also. just register the dll file with regsvr32[read help file] and then I can do this. $initWimCtrl = ObjCreate("GimageX.GimageXCtrl") $initWimCtrl.Source = "O:\WIMs\Windows_XP_New_Remake.wim" $initWimCtrl.ImageIndex = 1 $initWimCtrl.GetIMageInfo MsgBox(1,"",$initWimCtrl.ImageName) and just a reminder, in your code $SelectedWim = FileOpenDialog("Open wim file:", "X:\", "Image (*.wim)", 2)that "2" would probably not be working in pe3, at least not for me edit: Somehow I can't use GImageX v2.0.17 to work with above code, GImageX v2.0.16 BETA works fine, am I missing something? or it only works with AIK2 but not AIK3?
  4. yes, it is possible. things you need: koda gui designer; autoit help file; autoit diskpart duf, or diskpart script; imagex
  5. sorry guys, the code has no problem.. the problem was that when I put it in boot.wim, i forgot to commit the image. stupid me
  6. can't find edit button... when copying I made a mistake. $winFind =_checkWindowsFolder() should go before $checkRegOK = _checkREG() so the code is Global $WinFolder ="" Global $regFileLoc[6] $checkRegOK = _checkREG() $winFind =_checkWindowsFolder() .... Or if there's better way to do it, please share.
  7. Hi everyone. I'm a total newbie to this autoit scripting, so is to this programming sort of thing. I have a problem with this code i've been writing for a few days. I'm building a GUI for my PE cd. this gui will become a loader for all of the tools that I included in my pe to replace PExplorer.exe. Unfortunately I have this problem I can't overcome with. So basically what I'm trying to do is: 1, pe loads, then this cpe09load.exe will be the shell replacement. I has 2 windows, one is to show all the tools in this cd, i named it "frmCPE09"; another is "frmWindows", which has a listbox, and a button. Initially, both are hidden. 2, at start-up, function "_checkWindowsFolder()" check all the hard drives, to see if there are folder name "windows" 3, If a drive contain a folder named "windows", save it to a array, and then continue until all the hard drive are checked. 4, then it will write things in that array to the listbox, then show "frmWindows" windows, therefore user can choose one and then write it to another var for later.(like _checkREG()). and then make "frmCPE09" visible. when I type all the codes and then test it in a real windows, this works, everything acts as expected. But when I put it in the pe, the "frmWindows" doesn't show, it will directly goes to "frmCPE09". whither there is a drive with "windows" folder or not. oh and I made my pe based on AIK 3.0(windows7) thanks in advanced. #AutoIt3Wrapper_icon=..\cpe09icon.ico #AutoIt3Wrapper_outfile=Build\cpe09load.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ;#include <7zip.au3> ;#include <FindCD.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form=d:\cpe09.kxf $frmCPE09 = GUICreate("CPE v. 0.9", 485, 571) GUISetOnEvent($GUI_EVENT_CLOSE, "frmCPE09Close") GUISetOnEvent($GUI_EVENT_MINIMIZE, "frmCPE09Minimize") GUISetOnEvent($GUI_EVENT_MAXIMIZE, "frmCPE09Maximize") GUISetOnEvent($GUI_EVENT_RESTORE, "frmCPE09Restore") ;;;; lots of button controls to launch apps. $frmWindows = GUICreate("Select Windows Location", 372, 205, 192, 114) $lstWindows = GUICtrlCreateList("", 16, 8, 329, 97) GUISetOnEvent($GUI_EVENT_CLOSE, "frmWindowsClose") $btnWindowsSel = GUICtrlCreateButton("OK", 136, 136, 75, 25) GUICtrlSetOnEvent(-1, "btnWindowsSelClick") Global $WinFolder ="" Global $regFileLoc[6] $checkRegOK = _checkREG() $winFind =_checkWindowsFolder() While 1 Sleep(100) WEnd Func _checkWindowsFolder() Local $winDrive[4] ;Local $frmWindows $findHDD = DriveGetDrive( "fixed" ) if $findHDD[0] > 1 Then for $i = 1 to $findHDD[0] if FileExists($findHDD[$i] & "\windows") Then $winDrive[$i] = $findHDD[$i] & "\Windows\" $winDrive[0] = $i for $i2 = 1 to $winDrive[0] GUICtrlSetData($lstWindows, $winDrive[$i2]) Next EndIf Next GUISetState(@SW_SHOW,$frmWindows) Else GUISetState(@SW_HIDE,$frmWindows) GUISetState(@SW_SHOW,$frmCPE09) EndIf EndFunc Func btnWindowsSelClick() $winPath = GUICtrlRead($lstWindows) If $winPath = "" Then MsgBox(1,"Error","Please select a Windows Folder.") Sleep(1000) Else $winFolder = $winPath GUISetState(@SW_HIDE,$frmWindows) GUISetState(@SW_show,$frmCPE09) EndIf EndFunc Func _checkREG() Local $regFileNames = StringSplit("system,software,SECURITY,sam",",") Local $regFileFolder = $WinFolder & "\system32\config\" for $i = 1 to $regFileNames[0] $regFileLoc[$i] = $regFileFolder & $regFileNames[$i] if FileExists($regFileLoc[$i]) Then $checkRegOK = 1 $regFileLoc[0] = $i Else $checkRegOK = 0 ExitLoop EndIf Next EndFunc Func frmCPE09Maximize() EndFunc Func frmCPE09Minimize() EndFunc Func frmCPE09Restore() EndFunc Func frmWindowsClose() GUISetState($frmWindows,@SW_HIDE) EndFunc ; other functions.
×
×
  • Create New...