
joshiieeii
Active Members-
Posts
137 -
Joined
-
Last visited
Everything posted by joshiieeii
-
Nice! Way more informative than @OSVersion
-
I wonder if you could use PSExec to kick off the beacon telnet program and then use it from there. The only problem I see is that if the machine is locked then you are going to have to rely on the beeps or CD tray popping out. Very cool.
-
Ok, I am not getting how this works. I start it up and nothing happens. Am I supposed to try to telnet into the machine now that is runnin this app?
-
Smtp Mailer That Supports Html And Attachments.
joshiieeii replied to Jos's topic in AutoIt Example Scripts
Thanks Jos! Great work by the way. That makes sense, now that I think about it. I will try it out. -
Smtp Mailer That Supports Html And Attachments.
joshiieeii replied to Jos's topic in AutoIt Example Scripts
Trying to figure out how I would add mutiple lines of HTML. Also trying to figure out how I would embed an image. Is this possible? How do you define this as the $as_Body variable? <HTML> <head> <title>Hello World</title> </head> <body> <img src="http://server/images/HelloWorld.gif" alt="Hello World"> <font color="yellow"> Hello World </font> </HTML> -
Ok, so I have several different model Dell machines that I want to make sure I have the latest drivers for when applying an OS to them. Doing this manually is a real pain since you have to check each and every component for an updated driver. Obviously you could do this automatically if you had the machine you wanted to check, but this is not cost effective to do. So, I figured I would try to come up with a script to automatically download the up to date driver/bios files for the models that I need. Dell does have a FTP site (ftp://ftp.us.dell.com/) that I have been successful in creating a script to pull all the BIOS files and then search for the ones I want. This is only because the BIOS files contain the model number (D630, D830, ect..). The drivers for other things have Dell's cryptic naming convention associated with them which kills the FTP search (ex. R234983.exe, R232983.exe). Edit: Here is an example of the website: Dell D820 Driver How would you go about this? Looking for ideas on how to approach the problem I am faced with.
-
Ok, so I found my own answer. I found this and adapted it to my situation: Func Main() Local $szXPath, $aNodeName, $find, $ns, $oXSD,$iNodeCount,$aAttrName[1],$aAttrVal[1],$ret_val $xmlFile = "C:\Documents and Settings\jmascote\My Documents\!!AUTOIT Scripts\BDD2007\Drivers.xml" $ns = "" $oXSD = _XMLFileOpen ($xmlFile, $ns) If @error Or $oXSD < 1 Then MsgBox(0, "Error", "There was an error opening the file " & $xmlFile) $oXSD = 0 Exit EndIf $szXPath = "//drivers" $iNodeCount = _XMLGetNodeCount($szXPath & "/*") MsgBox(0,"Node Count",$iNodeCount) $aNodeName = _XMLGetChildNodes ($szXPath); get a list of node names under this path If $aNodeName <> - 1 Then For $find = 1 To $aNodeName[0] ConsoleWrite($aNodeName[$find]& '[' & $find & ']'&@LF) ;It's better to use node index instead of node name as all node here have same name. _XMLGetAllAttrib($szXPath & "/*" & '[' & $find & ']',$aAttrName,$aAttrVal) _ArrayDisplay($aAttrName,$szXPath & "/*" & '[' & $find & ']') _ArrayDisplay($aAttrVal,$szXPath & "/*" & '[' & $find & ']') Next MsgBox(266288,"_XMLWrapper","Done") Else MsgBox(0, "Error:", "No nodes found for " & $szXPath) EndIf $oXSD = 0 EndFunc
-
Can anyone give me hand on grabbing the driver guid's? I tried this, but it only gives one guid and it's not in an array: $avFields = _XMLGetAttrib ("//drivers/*", "guid") See my original post HERE <drivers> <driver guid="{302cf53a-719d-4849-a4b3-0fc1751057c6}" enable="True"> <Name>NVIDIA Display nvdm.inf 7.15.10.9746</Name> <Manufacturer>NVIDIA</Manufacturer> <Version>7.15.10.9746</Version> <Source>.\Out-of-box Drivers\Display\nvd 7.15.10.9746\nvdm.inf</Source> <Type>Display</Type> <Platform>x86</Platform> <OSVersion>6.0</OSVersion> <PNPId>PCI\VEN_10DE&DEV_00C8&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_00C9&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_00CC&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0098&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0099&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0297&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0298&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0299&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029A&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029B&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029D&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_01C21028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_01CC1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_20031028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D8&SUBSYS_01CC1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D8&SUBSYS_01D71028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01DC&SUBSYS_01C81028</PNPId> </driver> <driver guid="{8e05109c-bf13-40fb-b653-da98547e5e30}" enable="True"> <Name>NVIDIA Display nvdm.inf 7.15.10.9746</Name> <Manufacturer>NVIDIA</Manufacturer> <Version>7.15.10.9746</Version> <Source>.\Out-of-box Drivers\Display\nvd 7.15.10.9746 (1)\nvdm.inf</Source> <Type>Display</Type> <Platform>x86</Platform> <OSVersion>6.0</OSVersion> <PNPId>PCI\VEN_10DE&DEV_00C8&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_00C9&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_00CC&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0098&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0099&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0297&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0298&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0299&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029A&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029B&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029D&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_01C21028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_01CC1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_20031028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D8&SUBSYS_01CC1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D8&SUBSYS_01D71028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01DC&SUBSYS_01C81028</PNPId> </driver> </drivers>
-
So I tried this and it doesn't return an array, it only returns one value if I use a msgbox. $avFields = _XMLGetAttrib ("//drivers/*", "guid") Edit: Found this code and it seems to work: Func Main() Local $szXPath, $aNodeName, $find, $ns, $oXSD,$iNodeCount,$aAttrName[1],$aAttrVal[1],$ret_val $xmlFile = "C:\Documents and Settings\jmascote\My Documents\!!AUTOIT Scripts\BDD2007\Drivers.xml" $ns = "" $oXSD = _XMLFileOpen ($xmlFile, $ns) If @error Or $oXSD < 1 Then MsgBox(0, "Error", "There was an error opening the file " & $xmlFile) $oXSD = 0 Exit EndIf $szXPath = "//drivers" $iNodeCount = _XMLGetNodeCount($szXPath & "/*") MsgBox(0,"Node Count",$iNodeCount) $aNodeName = _XMLGetChildNodes ($szXPath); get a list of node names under this path If $aNodeName <> - 1 Then For $find = 1 To $aNodeName[0] ConsoleWrite($aNodeName[$find]& '[' & $find & ']'&@LF) ;It's better to use node index instead of node name as all node here have same name. _XMLGetAllAttrib($szXPath & "/*" & '[' & $find & ']',$aAttrName,$aAttrVal) _ArrayDisplay($aAttrName,$szXPath & "/*" & '[' & $find & ']') _ArrayDisplay($aAttrVal,$szXPath & "/*" & '[' & $find & ']') Next MsgBox(266288,"_XMLWrapper","Done") Else MsgBox(0, "Error:", "No nodes found for " & $szXPath) EndIf $oXSD = 0 EndFunc;==>Main
-
Thanks PsaltyDS!! This helps immensely when pulling specifics from the xml's. You rock! AutoIT roxors! Now I can easily get arrays with the values I am looking for. It should be easier from this point on, wish me luck. Edit: Question: How would I pull the Driver GUID (it doesn't appear to follow the convention for the others)? <driver guid="{302cf53a-719d-4849-a4b3-0fc1751057c6}" enable="True">
-
Hey guys, So I am working on Vista deployments and Deployment 4 (also BDD 2007) and they do not handle the driver imports very well. Here are here the current issues I am attempting to resolve: Duplicate files/folders are present in the "Out of Box Drivers" folder -CompletedDuplicate entries are present in the "drivers.xml" file -CompletedThere is no way to easily manage the drivers and add them to drivergroupsI have successfully resolved the first two issues already (will post code soon, need to clean it up and make it pretty ), but I am running into a bit of trouble on the last one (mostly looking for ideas on how to deal with all this data, keep reading..). Drivergroups work like this: The GUID of the driver (taken from the drivers.xml file) is placed in DriverGroups.xml file under the respective driver group, right below the <Name>...</Name> tagsThe GUID is placed within <Driver>....</Driver> tags *See the Drivergroups.xml sampleSo for those of us who have not messed with Deployment 4 or the similiar BDD 2007 I will attempt to explain what I am trying to accomplish. Read the Drivergroups.xml and Drivers.xml filesUse the Name, Manufacturer, Version, Type and Platform data from each driver in Drivers.xmlFigure out how many Drivergroups there arePresent the drivers in a way that is easy to manipulate (I am envisioning have a list view and being able to right click multi selected items to groups and having the colors change accordingly.)Once the drivers are selected and added to a drivergroup, all the drivers' GUID's are added to their respective driver groupsKeep in mind that there could be hundreds possibly a thousand or so drivers to possibly sort through. Does anyone have any suggestions on how to effeciently manipulate this data? I am currently looking at using a Listview and enabling the right click to add the drivers to the groups. Here is a sample of the Drivers.xml: CODE<drivers> <driver guid="{302cf53a-719d-4849-a4b3-0fc1751057c6}" enable="True"> <Name>NVIDIA Display nvdm.inf 7.15.10.9746</Name> <Manufacturer>NVIDIA</Manufacturer> <Version>7.15.10.9746</Version> <Source>.\Out-of-box Drivers\Display\nvd 7.15.10.9746\nvdm.inf</Source> <Type>Display</Type> <Platform>x86</Platform> <OSVersion>6.0</OSVersion> <PNPId>PCI\VEN_10DE&DEV_00C8&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_00C9&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_00CC&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0098&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0099&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0297&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0298&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0299&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029A&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029B&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029D&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_01C21028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_01CC1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_20031028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D8&SUBSYS_01CC1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D8&SUBSYS_01D71028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01DC&SUBSYS_01C81028</PNPId> </driver> <driver guid="{8e05109c-bf13-40fb-b653-da98547e5e30}" enable="True"> <Name>NVIDIA Display nvdm.inf 7.15.10.9746</Name> <Manufacturer>NVIDIA</Manufacturer> <Version>7.15.10.9746</Version> <Source>.\Out-of-box Drivers\Display\nvd 7.15.10.9746 (1)\nvdm.inf</Source> <Type>Display</Type> <Platform>x86</Platform> <OSVersion>6.0</OSVersion> <PNPId>PCI\VEN_10DE&DEV_00C8&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_00C9&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_00CC&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0098&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0099&SUBSYS_019C1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0297&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0298&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_0299&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029A&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029B&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_029D&SUBSYS_019B1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_01C21028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_01CC1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D7&SUBSYS_20031028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D8&SUBSYS_01CC1028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01D8&SUBSYS_01D71028</PNPId> <PNPId>PCI\VEN_10DE&DEV_01DC&SUBSYS_01C81028</PNPId> </driver> </drivers> Here is a sample of the DriverGroups.xml: CODE<drivergroups> <drivergroup guid="{23377cce-aea6-4cc9-acd8-cfc6ad6d3e09}"> <Name>All Drivers</Name> </drivergroup> <drivergroup guid="{a87db1a3-6d07-47c7-a9b3-c480a35df4c7}"> <Name>Test</Name> <Driver>{c489e7fe-0ac4-4a63-ab36-2eeb575589f4}</Driver> </drivergroup> <drivergroup guid="{d0f9b120-db45-4a6e-a8fe-8afd0aaae2a9}"> <Name>Test1</Name> <Driver>{c489e7fe-0ac4-4a63-ab36-2eeb575589f4}</Driver> </drivergroup> <drivergroup guid="{1f5b9951-7b7d-4d07-b85d-a7e9bf35e0a3}"> <Name>Test3</Name> <Driver>{1f5b9951-7b7d-4d07-b85d-a7e9bf35e0a3}</Driver> <Driver>{c489e7fe-0ac4-4a63-ab36-2eeb575589f4}</Driver> </drivergroup> </drivergroups>
-
Imagex GUI Intended for use within WinPE 2.0 Note: you have to have imagex.exe in the same folder. Update 4-9-07: Added Poll image function to display what images are available within a wim file.Added Automatic Reboot functionality.gimagex.ini [CAPTURE] Source=C: Destination=MyWim.wim Compression=Fast Flags=Enterprise Config= Boot=0 Check=1 Name=My Vista Build Name Description=My Vista Build Description [APPLY] Source=M:\Vista.wim Destination=C: Verify=0 Name=1 [MAP] Letter=M: Share=\\networkshare\folder User=domain.com\TestUser gimagex.exe #include <Constants.au3> #include <GUIConstants.au3> #include <Array.au3> #include <Process.au3> #include <String.au3> #include <GuiTreeView.au3> Dim $avDriveMapAdd[7] $avDriveMapAdd[0] = "Unknown Error" $avDriveMapAdd[1] = "Undefined / Other error" $avDriveMapAdd[2] = "Access to the remote share was denied" $avDriveMapAdd[3] = "The device is already assigned" $avDriveMapAdd[4] = "Invalid device name" $avDriveMapAdd[5] = "Invalid remote share" $avDriveMapAdd[6] = "Invalid password" Dim $avPing [5] $avPing[0] = "Unknown Error" $avPing[1] = "Host is offline" $avPing[2] = "Host is unreachable" $avPing[3] = "Bad destination" $avPing[4] = "Other errors" ; Global Settings ; Dim $gCaptureSource Dim $gCaptureDestination Dim $gCaptureCompression Dim $gCaptureFlags Dim $gCaptureConfig Dim $gCaptureBoot Dim $gCaptureCheck Dim $gCaptureName Dim $gCaptureDescription Dim $gApplySource Dim $gApplyDestination Dim $gApplyVerify Dim $gApplyName Dim $imageinfo Dim $gMapLetter Dim $gMapUser Dim $gMapPassword Dim $gMapShare Dim $sIni = @ScriptDir & "\gimagex.ini" Dim $res ; ; Create the main GUI ; GUICreate("GImageX - ImageX GUI Wrapper", 640, 380, -1, -1 ) $hTab = GUICtrlCreateTab(10, 10, 620, 355) $BaseX = 20 $BaseY = 35 ; Drive Map Tab $hTab_0 = GUICtrlCreateTabItem(" Drive Map ") $CurX = $BaseX $CurY = $BaseY $CurY = $CurY + 10 GuiCtrlCreateGroup("Drive Mapping", $CurX+10, $CurY, 580, 135) $CurY = $CurY + 18 GUICtrlCreateLabel("Letter", $CurX+20, $CurY+3) $hMapLetter = GUICtrlCreateCombo("F:", $CurX+85, $CurY, 100, 500, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, "G:|H:|I:|J:|K:|L:|M:|N:|O:|P:|Q:|R:|S:|T:|U:|V:|W:|X:|Y:|Z:") $CurY = $CurY + 27 GUICtrlCreateLabel("UNC Path", $CurX+20, $CurY+3) $hMapShareEdit = GUICtrlCreateInput("\\Server\Sharename", $CurX+85, $CurY, 300) $CurY = $CurY + 27 GUICtrlCreateLabel("Username", $CurX+20, $CurY+3) $hMapUserEdit = GUICtrlCreateInput("Domain.com\%Username%", $CurX+85, $CurY, 300) $CurY = $CurY + 27 GUICtrlCreateLabel("Password", $CurX+20, $CurY+3) $hMapPasswordEdit = GUICtrlCreateInput("Password", $CurX+85, $CurY, 300, -1, $ES_PASSWORD) $hMapButtonGo = GUICtrlCreateButton("&Map!", $BaseX+500, $BaseY+290, 100) ; Capture Tab ; $hTab_1 = GUICtrlCreateTabItem(" Capture ") $CurX = $BaseX $CurY = $BaseY ; File Group $CurY = $CurY + 10 GuiCtrlCreateGroup("WIM Image", $CurX+10, $CurY, 580, 155) $CurY = $CurY + 18 GUICtrlCreateLabel("Source", $CurX+20, $CurY+3) $hCaptureSourceEdit = GUICtrlCreateInput("C:", $CurX+85, $CurY, 300) $hCaptureSourceBrowse = GUICtrlCreateButton("Browse", $CurX+395, $CurY-2) $CurY = $CurY + 27 GUICtrlCreateLabel("Destination", $CurX+20, $CurY+3) $hCaptureDestEdit = GUICtrlCreateInput("MyWim.wim", $CurX+85, $CurY, 300) $hCaptureDestBrowse = GUICtrlCreateButton("Browse", $CurX+395, $CurY-2) $CurY = $CurY + 27 GUICtrlCreateLabel("Compression", $CurX+20, $CurY+3) $hCaptureCompression = GUICtrlCreateCombo("Maximum", $CurX+85, $CurY, 100, 500, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, "Fast") $CurY = $CurY + 27 GUICtrlCreateLabel("Name", $CurX+20, $CurY+3) $hCaptureNameEdit = GUICtrlCreateInput("My Vista Image", $CurX+85, $CurY, 300) $CurY = $CurY + 27 GUICtrlCreateLabel("Description", $CurX+20, $CurY+3) $hCaptureDescEdit = GUICtrlCreateInput("My Vista Image Description", $CurX+85, $CurY, 300) ; Options Group $CurY = $CurY + 40 GuiCtrlCreateGroup("Options", $CurX+10, $CurY, 580, 100) $CurY = $CurY + 18 GUICtrlCreateLabel("/config", $CurX+20, $CurY+3) $hCaptureConfigEdit = GUICtrlCreateInput("", $CurX+85, $CurY, 300) $hCaptureConfigBrowse = GUICtrlCreateButton("Browse", $CurX+395, $CurY-2) $CurY = $CurY + 27 GUICtrlCreateLabel("/flags", $CurX+20, $CurY+3) $hCaptureFlagsEdit = GUICtrlCreateInput("Ultimate", $CurX+85, $CurY, 300) $CurY = $CurY + 27 $hCaptureBootCheck = GUICtrlCreateCheckbox("/boot (WinPE Images Only) ", $CurX+20, $CurY) $hCaptureCheckCheck = GUICtrlCreateCheckbox("/check", $CurX+190, $CurY) $hCaptureButtonGo = GUICtrlCreateButton("&Capture!", $BaseX+500, $BaseY+290, 100) ; ; Apply Tab ; $hTab_2 = GUICtrlCreateTabItem(" Apply ") $CurX = $BaseX $CurY = $BaseY ; File Group $CurY = $CurY + 10 GuiCtrlCreateGroup("WIM Image", $CurX+10, $CurY, 580, 205) $CurY = $CurY + 18 GUICtrlCreateLabel("1. Source", $CurX+20, $CurY+3) $hApplySourceEdit = GUICtrlCreateInput("MyWim.wim", $CurX+85, $CurY, 300) $hApplySourceBrowse = GUICtrlCreateButton("Browse", $CurX+395, $CurY-2) $CurY = $CurY + 27 GUICtrlCreateLabel ("Input Image Number", $CurX+15, $CurY+30, 70, 30) $hApplyName = GUICtrlCreateInput("1", $CurX+85, $CurY+30, 40, 20) $hApplyNameBrowse= GUICtrlCreateButton("2. Poll Image Number", $CurX+15, $CurY+1) $treeview = GUICtrlCreateTreeView ( 150, 90, 450, 120, BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE) $CurY = $CurY + 27 GUICtrlCreateLabel("Destination", $CurX+20, $CurY+103) $hApplyDestEdit = GUICtrlCreateInput("C:", $CurX+85, $CurY+100, 300) $hApplyDestBrowse = GUICtrlCreateButton("Browse", $CurX+395, $CurY+98) ; Options Group $CurY = $CurY + 40 GuiCtrlCreateGroup("Options", $CurX+10, $CurY+100, 580, 50) $CurY = $CurY + 18 Dim $hReboot = GUICtrlCreateCheckbox ( "Automatically Reboot", $CurX+20, $CurY+100, 130,15) $hApplyVerifyCheck = GUICtrlCreateCheckbox("/verify", $CurX+150, $CurY+100, 100, 15 ) GUICtrlSetState ($hReboot, $GUI_CHECKED) $hApplyButtonGo = GUICtrlCreateButton("&Apply!", $BaseX+500, $BaseY+290, 100) ; ; Set Default Options ; LoadSettings() SettingsToGUI() ; ; The GUI message loop ; GuiSetState() While 1 $msg = GuiGetMsg() Select ; General Messages Case $msg = $GUI_EVENT_CLOSE ExitLoop ; Capture Messages Case $msg = $hCaptureButtonGo DoCapture() Case $msg = $hCaptureSourceBrowse $sDir = BrowseForDirectory() if $sDir Then GUICtrlSetData($hCaptureSourceEdit, $sDir) Case $msg = $hCaptureDestBrowse $sFile = BrowseForWimToSave() if $sFile Then GUICtrlSetData($hCaptureDestEdit, $sFile) Case $msg = $hCaptureConfigBrowse $sFile = BrowseForConfig() If $sFile Then GUICtrlSetData($hCaptureConfigEdit, $sFile) ; Apply Messages Case $msg = $hApplyNameBrowse PollImage() Case $msg = $hApplyButtonGo DoApply() Case $msg = $hApplyDestBrowse $sDir = BrowseForDirectory() if $sDir Then GUICtrlSetData($hApplyDestEdit, $sDir) Case $msg = $hApplySourceBrowse $sFile = BrowseForWimToLoad() if $sFile Then GUICtrlSetData($hApplySourceEdit, $sFile) ; Drive Map Messages Case $msg = $hMapButtonGo DoMapping() Case Else ;;; EndSelect WEnd Exit ; ; FUNCTIONS ; Func BrowseForDirectory() $sDir = FileSelectFolder("Select source folder", "C:") If StringRight($sDir, 1) = "\" Then $sDir = StringTrimRight($sDir, 1) Return $sDir EndFunc Func BrowseForWimToSave() $sFile = FileSaveDialog( "Select destination file", "C:\", "WIM Files (*.wim)", 3) If @error Then Return "" If StringRight($sFile, 4) <> ".wIM" Then $sFile = $sFile & ".wim" Return $sFile EndFunc Func BrowseForWimToLoad() $sFile = FileOpenDialog( "Select source file", "C:\", "WIM Files (*.wim)", 3) If @error Then Return "" Return $sFile EndFunc Func BrowseForConfig() $sFile = FileOpenDialog("Select config file", @ScriptDir, "INI files (*.ini)", 1) If @error Or StringRight($sFile, 4) <> ".ini" Then Return "" Return $sFile EndFunc Func DoCapture() $sCmd = '"' & @ScriptDir & '\imagex.exe"' If $gCaptureConfig <> "" Then $sCmd = $sCmd & ' /config "' & $gCaptureConfig & '"' If $gCaptureCompression = "fast" Then $sCmd = $sCmd & " /compress fast" Else $sCmd = $sCmd & " /compress maximum" EndIf If $gCaptureCheck = 1 Then $sCmd = $sCmd & " /check" If $gCaptureBoot = 1 Then $sCmd = $sCmd & " /boot" If $gCaptureFlags <> "" Then $sCmd = $sCmd & ' /flags "' & $gCaptureFlags & '"' $sCmd = $sCmd & ' /capture "' & $gCaptureSource & '" "' & $gCaptureDestination & '"' $sCmd = $sCmd & ' "' & $gCaptureName & '" "' & $gCaptureDescription & '"' $ret = RunWait($sCmd, @WorkingDir, @SW_SHOW) SplashTextOn ( "Return Code", "Imagex.exe returned with code = " & $ret, 400, 200, -1, -1, 32, "Tahoma", 16, 500) sleep (3000) SplashOff () EndFunc Func PollImage () Dim $nitem, $nitem Dim $imageinfo = " " $read = GUICtrlRead ($hApplySourceEdit) $sCmd = "imagex.exe" If $read = "" Then MsgBox (48, "Input required", "Please select the source") Else $sCmd = $sCmd & ' /info "' & $read & '"' EndIf ;MsgBox(0, "scmd", $sCmd) Dim $ret = Run(@ComSpec & " /c " & $sCmd & '"', @ScriptDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD ) While 1 $line = StdoutRead($ret) If $line = "" Then ExitLoop $imageinfo = $imageinfo & $line ;MsgBox(0, "RunDOS", $line) If @error Then ExitLoop WEnd _GUICtrlTreeViewDeleteAllItems ($treeview) $aImageInfo = _StringBetween ( $imageinfo, "<name>", "</name>" ) $aImageDesc = _StringBetween ( $imageinfo, "<Description>", "</Description>" ) $aImageFileCount = _StringBetween ( $imageinfo, "<Filecount>", "</Filecount>" ) $aImageBuild = _StringBetween ( $imageinfo, "<Build>", "</Build>" ) $imagenumber = UBound ($aImageInfo, 1) $x = 0 Dim $nitem[$imagenumber] Do $nitem[$x] = GUICtrlCreateTreeViewItem ( "Image " & $x +1 & ": " & $aImageInfo[$x], $treeview ) GUICtrlCreateTreeViewItem ( "Description: " & $aImageDesc [$x], $nitem[$x] ) GUICtrlCreateTreeViewItem ( "File Count: " & $aImageFileCount [$x], $nitem[$x] ) GUICtrlCreateTreeViewItem ( "Build Version: " & $aImageBuild [$x], $nitem[$x] ) GUICtrlSetState($nitem[$x], $GUI_DEFBUTTON) $x = $x + 1 Until $x = $imagenumber EndFunc Func DoApply() $sCmd = '"' & @ScriptDir & '\imagex.exe"' If $gApplyVerify = 1 Then $sCmd = $sCmd & " /verify" $sCmd = $sCmd & ' /apply "' & $gApplySource & '" "' & $gApplyName & '" "' & $gApplyDestination & '"' $ret = RunWait($sCmd, @WorkingDir, @SW_SHOW) SplashTextOn ( "Return Code", "Imagex.exe returned with code = " & $ret, 400, 200, -1, -1, 32, "Tahoma", 16, 500) sleep (3000) SplashOff () $Rebootstate = GUICtrlRead ($hReboot) If $Rebootstate = 1 Then _RunDOS("Start wpeutil reboot") EndIf EndFunc Func DoMapping() $gMapLetter = IniRead($sIni, "MAP", "Letter", "V:") DriveMapDel($gMapLetter) $gMapShare = IniRead($sIni, "Map", "Share", "") $VistaAccount = GUICtrlRead ( $hMapUserEdit ) $VistaPwd = GUICtrlRead ( $hMapPasswordEdit ) $res = DriveMapAdd($gMapLetter, $gMapShare, 0, $VistaAccount, $VistaPwd) If $res Then ControlSetText("Mapping Drive", "", "Static1", "Drive successfully mapped!" ) sleep (2000) ;MsgBox(64, "Drive Mapping", "Drive successfully mapped!") Else SplashOff() MsgBox(16, "Drive Mapping", "Error mapping drive! Code: " & $avDriveMapAdd[@error]) EndIf EndFunc Func LoadSettings() $sIni = @ScriptDir & "\gimagex.ini" $gCaptureSource = IniRead($sIni, "CAPTURE", "Source", "C:") $gCaptureDestination = IniRead($sIni, "CAPTURE", "Destination", "MyWim.wim") $gCaptureCompression = IniRead($sIni, "CAPTURE", "Compression", "Maximum") $gCaptureFlags = IniRead($sIni, "CAPTURE", "Flags", "Ultimate") $gCaptureConfig = IniRead($sIni, "CAPTURE", "Config", "") $gCaptureBoot = IniRead($sIni, "CAPTURE", "Boot", "0") $gCaptureCheck = IniRead($sIni, "CAPTURE", "Check", "1") $gCaptureName = IniRead($sIni, "CAPTURE", "Name", "My Vista Build Name") $gCaptureDescription = IniRead($sIni, "CAPTURE", "Description", "My Vista Build Description") $gApplySource = IniRead($sIni, "APPLY", "Source", "C:") $gApplyDestination = IniRead($sIni, "APPLY", "Destination", "MyWim.wim") $gApplyVerify = IniRead($sIni, "APPLY", "Verify", "0") $gApplyName = IniRead($sIni, "APPLY", "Name", "My Vista Build Name") $gMapLetter = IniRead($sIni, "MAP", "Letter", "M:") $gMapShare = IniRead($sIni, "MAP", "Share", "\\Server\Share") $gMapUser = IniRead($sIni, "MAP", "User", "User") EndFunc Func SettingsToGUI() ; CAPTURE GUICtrlSetData($hCaptureSourceEdit, $gCaptureSource) GUICtrlSetData($hCaptureDestEdit, $gCaptureDestination) GUICtrlSetData($hCaptureCompression, $gCaptureCompression) GUICtrlSetData($hCaptureFlagsEdit, $gCaptureFlags) GUICtrlSetData($hCaptureConfigEdit, $gCaptureConfig) If $gCaptureBoot = 1 Then GUICtrlSetState($hCaptureBootCheck, $GUI_CHECKED) Else GUICtrlSetState($hCaptureBootCheck, $GUI_UNCHECKED) EndIf If $gCaptureCheck = 1 Then GUICtrlSetState($hCaptureCheckCheck, $GUI_CHECKED) Else GUICtrlSetState($hCaptureCheckCheck, $GUI_UNCHECKED) EndIf GUICtrlSetData($hCaptureNameEdit, $gCaptureName) GUICtrlSetData($hCaptureDescEdit, $gCaptureDescription) ; APPLY GUICtrlSetData($hApplySourceEdit, $gApplySource) GUICtrlSetData($hApplyDestEdit, $gApplyDestination) If $gApplyVerify = 1 Then GUICtrlSetState($hApplyVerifyCheck, $GUI_CHECKED) Else GUICtrlSetState($hApplyVerifyCheck, $GUI_UNCHECKED) EndIf GUICtrlSetData($hApplyName, $gApplyName) ; MAP GUICtrlSetData($hMapLetter, $gMapLetter) GUICtrlSetData($hMapShareEdit, $gMapShare) GUICtrlSetData($hMapUserEdit, $gMapUser) GUICtrlSetData($hMapPasswordEdit, $gMapPassword) EndFunc
-
Search within XML file and remove certain data
joshiieeii replied to joshiieeii's topic in AutoIt General Help and Support
Thanks Uten, That is an unexplored function for me......I am going to dive into that one!! -
Search within XML file and remove certain data
joshiieeii replied to joshiieeii's topic in AutoIt General Help and Support
Darnit....was browsing Example Scripts when I had the bright idea to create a topic....Please move to Help Category. -
Ok, so i have this XML file with a respectable number of lines in it. I want to search between the "<driver guid" and the "</driver>" and see if the "<source>" line has a "(?)" (?=number) in it. If it does, I want to delete everything from "<driver guid" to "</driver>" and continue to check the next set of "<driver guid" and "</driver>". I shortened the below code for sake of space, there are a random number of lines between "<driver guid" and "</driver>". Any ideas? <driver guid="{809f4069-0bbe-49cc-af58-4f75c296da74}" enable="True"> <Name>NVIDIA Display nvdm.inf 7.15.10.9746</Name> <Manufacturer>NVIDIA</Manufacturer> <Version>7.15.10.9746</Version> <Source>.\Out-of-box Drivers\Display\nvd 7.15.10.9746\nvdm.inf</Source> <Type>Display</Type> <Platform>x86</Platform> <OSVersion>6.0</OSVersion> <PNPId>PCI\VEN_10DE&DEV_00C8&SUBSYS_019C1028</PNPId> </driver> <driver guid="{a24db7b9-ec1b-45dc-8245-7b33da7d579a}" enable="True"> <Name>NVIDIA Display nvdm.inf 7.15.10.9746</Name> <Manufacturer>NVIDIA</Manufacturer> <Version>7.15.10.9746</Version> <Source>.\Out-of-box Drivers\Display\nvd 7.15.10.9746 (1)\nvdm.inf</Source> <Type>Display</Type> <Platform>x86</Platform> <OSVersion>6.0</OSVersion> <PNPId>PCI\VEN_10DE&DEV_00C8&SUBSYS_019C1028</PNPId> </driver>
-
Trying to remove the Administrator account from the Administrators group in VISTA. I tried the "net" method and get a 1371 error even when running as administrator. I am convinced the only way is through WMI. I have tried the below code in various configurations, with no luck. Anyone have any ideas? ;Remove Administrator for Administrators Group Dim $objgroup = ObjGet("WinNT://" & @ComputerName & "/Administrators") Dim $objuser = ObjGet("WinNT://" & @ComputerName & "/Administrator") $objgroup.remove($objuser)oÝ÷ ØZ½æ¥²kçb·Ø^«-)Þ)¶¬jëh×6$objgroup.remove($objuser.ADsPath) All the times I have tried, I keep getting a "The requested action with this object has failed." It references the last line. I can do it manually, but for some reason I can't script it. According to the MS site, I am formatting it correctly: IADsGroup::Remove
-
Try posting some of your code, you might be missing something. I have gotten it to work, so it's not an AutoIT issue.
-
I imagine everyone has heard about Vista, but what about BDD 2007? It is a MS provided deployment scenario that has a lot of potential, but like usual is ending up a little short. I was wondering if anyone would be interested in remaking the MS provided VB scripts into AutoIT and improving upon the process? Edit: I plan on working on the Lite Touch Scenario. The BDD 2007 is only a 30Mb download from the MS Site HERE There are about 10 scripts that would need to be remade in the AutoIT image. They are located in the Distribution share under scripts after you create a "Deployment Point". Keep in mind, these are some pretty complex scripts and would require some of the more *talented* scripters.
-
Can AutoIT "read" a text scrolling on a screen?
joshiieeii replied to Aquaphire's topic in AutoIt General Help and Support
People still play Diablo....wow Not sure you can do that to not answer your question. -
Have you tried running this command in a dos box manually? I suspect your command is flawed. I know for a fact that _RunDOS works wonderfully, there is something wrong with your command. It looks like your use of @scriptdir is used incorrectly and the ENTER is not supposed to be there either. RTFM! Edit: and your name is misleading, you are note elite =)
-
Detect Checked State Within Multiple Tabs
joshiieeii replied to joshiieeii's topic in AutoIt General Help and Support
Thanks Bala I guess I need help with giving the checkboxes a variable so I have something to actually check, how would I give the checkboxes variables based on $i?? So what I am trying to do is get a variable like this $tab0chk1, $tab0chk2, ect... $tab0var = IniReadSectionNames ($shareletter & "\config\Std_Applications.ini") If @error Then MsgBox(4096, "", "Error occurred, not able to find " & $shareletter & "\config\Std_Applications.ini") Else For $i = 1 To $tab0var[0] $tab0chk($i) = GUICtrlCreateCheckbox ( $tab0var[$i], $left, $top, 150, 15) ;Trying to give a variable relating to $i $top = $top + 20 If $top > 320 Then $left = 200 $top = 120 EndIf Next EndIf -
Ok, I have a basic GUI with 4 tabs. Within those 4 tabs are numerous checkboxes. I am trying to figure out how I would: 1) Disable the checking of anymore checkboxes upon clicking a button 2) Go through each tab and detect the checked state Ultimately, I plan on doing some checking to see if certain things are checked so that other things are added by default. Then write the results of the checked items to another ini file. Here is a sample of my code: #include <GUIConstants.au3> Dim $PCname = "Test" Dim $font="Arial" Dim $shareletter = "V:" Dim $sharepath = "\\share\folder" GUICreate ("Select Applications to Install") GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) GUICtrlCreateLabel ( "PC Name: ", 10, 375, 60, 15) $PCnameinput = GUICtrlCreateInput ( $PCName, 70, 370, 200, 20) GUIctrlSetState ($PCnameinput, $GUI_DISABLE) $tab=GUICtrlCreateTab (10,10,380,350) $tab0=GUICtrlCreateTabitem ("Configuration") $left = 30 $top = 120 GUICtrlCreateLabel ( "Select machine type: ", 15, 45, 120, 20) $PCDesktop = GUICtrlCreateRadio ( "Desktop", 140, 43, 80, 20) $PCLaptop = GUICtrlCreateRadio ( "Laptop", 220, 43, 80, 20) GUICtrlCreateGroup ("Standard Applications", 20, 100, 360, 250) $CreatePCappProfile = GUICtrlCreateButton ( "&Create PC Profile", 275, 365, 115, 30) $tab0var = IniReadSectionNames ($shareletter & "\config\Std_Applications.ini") If @error Then MsgBox(4096, "", "Error occurred, not able to find " & $shareletter & "\config\Std_Applications.ini") Else For $i = 1 To $tab0var[0] GUICtrlCreateCheckbox ( $tab0var[$i], $left, $top, 150, 15) $top = $top + 20 If $top > 320 Then $left = 200 $top = 120 EndIf Next EndIf ;$stdApps = $tab1=GUICtrlCreateTabitem ("Engineer Apps") $left = 15 $top = 40 $tab1var = IniReadSectionNames($shareletter & "\config\Eng_Applications.ini") If @error Then MsgBox(4096, "", "Error occurred, not able to find " & $shareletter & "\config\Eng_Applications.ini") Else For $i = 1 To $tab1var[0] GUICtrlCreateCheckbox ( $tab1var[$i], $left, $top, 150, 15) $top = $top + 20 If $top > 340 Then $left = 200 $top = 40 EndIf Next EndIf $tab2=GUICtrlCreateTabitem ("Dev Apps") $left = 15 $top = 40 $tab2var = IniReadSectionNames($shareletter & "\config\Dev_Applications.ini") If @error Then MsgBox(4096, "", "Error occurred, not able to find " & $shareletter & "\config\Dev_Applications.ini") Else For $i = 1 To $tab2var[0] GUICtrlCreateCheckbox ( $tab2var[$i], $left, $top, 150, 15) $top = $top + 20 If $top > 340 Then $left = 200 $top = 40 EndIf Next EndIf $tab3=GUICtrlCreateTabitem ("Other Apps") $left = 15 $top = 40 $tab3var = IniReadSectionNames($shareletter & "\config\Other_Applications.ini") If @error Then MsgBox(4096, "", "Error occurred, not able to find " & $shareletter & "\config\Other_Applications.ini") Else For $i = 1 To $tab3var[0] GUICtrlCreateCheckbox ( $tab3var[$i], $left, $top, 150, 15) $top = $top + 20 If $top > 340 Then $left = 200 $top = 40 EndIf Next EndIf GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $CreatePCappProfile WriteAppsIni () Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect Wend
-
does it work with VISTA ?
joshiieeii replied to silver217's topic in AutoIt General Help and Support
I guess I forgot to mention this as well, you have to disable one portion of the UAC or turn off UAC all together.