![]() ![]() |
May 23 2008, 05:22 PM
Post
#81
|
|
|
Group: Members Posts: 3 Joined: 28-April 08 Member No.: 189054 OS: none
|
I'm still getting "clone DST unknown" in ghost.
---- Update: Fixed the DST error by changing the default location.... The last error I get is a: AutoIT Error Line -1: Error: Unable to execute the external program. The system cannot find the file specified. This post has been edited by sinecure: May 27 2008, 03:20 PM |
|
|
|
Jul 20 2008, 08:21 AM
Post
#82
|
|
|
Group: Members Posts: 1 Joined: 20-July 08 Member No.: 201696 OS: none
|
I am having an issue with listing the available images in my directories. It creates buttons for the folders in the path specified, but when I click on one, I recieve the following run time error:
error could not complete the operation due to error 80041002 if I debug it, this is the line in question: For each objFile in colFileList Thanks for any info. |
|
|
|
Jul 28 2008, 09:23 AM
Post
#83
|
|
|
Group: Members Posts: 3 Joined: 31-January 07 Member No.: 124370
|
Hello,
I need help, please. I run this script wizard.hta but radio button and description file htm not display. Here's my code. '**************************************************************************** '* enumImages '* find images and create radio buttons '**************************************************************************** 'this sub is a little messy because of limitations of win32_shortcutfile and need to go between fso and wmi for different info 'also, without the advantages of .net sorting classes, the old bubble sorting is not the funnest Sub enumImages(fileName) Dim colFilelist, objFile, strButtons, objShortcut, colTargetList, objTarget, x, y, strKey, strItem ReDim arrButtons(1,-1) 'reset display element style details.innerHTML = "" details.style.visibility = "hidden" ' strButtons = "<table id=buttonTable>" 'enumerate ghost image shortcuts in specific images subfolder from enumDirs Set colFileList = objWMIService.ExecQuery _ ("ASSOCIATORS OF {Win32_Directory.Name='z:\winpe\" & fileName & "'} Where ResultClass = CIM_DataFile") 'find ghost image shortcut targetpath (fso) For each objFile in colFileList If objFile.Extension = "lnk" Then Set objShortcut = objShell.CreateShortcut(objFile.name) 'find ghost image shortcut target (wmi) Set colTargetList = objWMIService.ExecQuery _ ("Select * from CIM_Datafile Where name = '" & replace(objShortcut.targetpath,"\","\\") & "'") 'add radio button label (from fso) and radio button target (from wmi) to an array For each objTarget in colTargetList ReDim Preserve arrButtons(1,UBound(arrButtons,2)+1) arrButtons(0,UBound(arrButtons,2)) = objShortcut.Description arrButtons(1,UBound(arrButtons,2)) = "<Input type=radio name=radioList id='" & objTarget.Drive & objTarget.Path & objTarget.fileName &_ "' onClick=showRadioInfo>" & objShortcut.Description & "</BUTTON><BR>" Next End If Next 'perform a a shell sort of the string array based on button label For x = 0 To UBound(arrButtons,2) - 1 For y = x To UBound(arrButtons,2) If StrComp(arrButtons(0,x),arrButtons(0,y),vbTextCompare) > 0 Then strKey = arrButtons(0,x) strItem = arrButtons(1,x) arrButtons(0,x) = arrButtons(0,y) arrButtons(1,x) = arrButtons(1,y) arrButtons(0,y) = strKey arrButtons(1,y) = strItem End If Next Next 'create combined buttons html code from sorted buttons array For x = 0 To UBound(arrButtons,2) strButtons = strButtons & "<tr><td id=buttonTd>" & arrButtons(1,x) & "</td></tr>" Next ' strButtons = strButtons & "</table>" 'create a start button with start image command and append and post resulting html to body body.innerHTML = strBody & strButtons & "<BR><HR><BR><button id=start Accesskey=S onclick=doTask(strTaskValue)><U>S</U>tart Image!</BUTTON><BR>" start.style.visibility="hidden" End Sub
Attached File(s)
|
|
|
|
Jul 28 2008, 09:03 PM
Post
#84
|
|
|
Group: Members Posts: 3 Joined: 31-January 07 Member No.: 124370
|
Hello,
This script in HTA not show radio button For each objTarget in colTargetList ReDim Preserve arrButtons(1,UBound(arrButtons,2)+1) arrButtons(0,UBound(arrButtons,2)) = objShortcut.Description arrButtons(1,UBound(arrButtons,2)) = "<Input type=radio name=radioList id='" & objTarget.Drive & objTarget.Path & objTarget.fileName &_ "' onClick=showRadioInfo>" & objShortcut.Description & "</BUTTON><BR>" Next I create one simply script in vbs, name is testpath.vbs and resume object objtarget.drive, objtarget.path and objtarget.filename not run correctly. Cant i help me for this issue? testpath.vbs strcomputer="." dim objshell, objfso, objwmiservice, strDrive set objshell = createobject("wscript.shell") set objfso = createobject("scripting.filesystemobject") set objwmiservice = getobject ("winmgmts:\\" & strcomputer & "\root\cimv2") dim colsubfolders, objfolder, filename set colsubfolders = objwmiservice.execquery _ ("Associators of {win32_directory.name='z:\winpe'} where assocclass = win32_subdirectory resultrole = partcomponent") for each objfolder in colsubfolders filename = objfolder.filename wscript.echo objfolder.name next for each objfolder in colsubfolders filename = objfolder.filename wscript.echo filename next dim colfilelist, objfile, objshorcut, coltargetlist, objtarget set colfilelist = objwmiservice.execquery _ ("Associators of {win32_directory.name='z:\winpe\" & filename & "'} where resultclass = CIM_DataFile") for each objfile in colfilelist if objfile.extension = "lnk" then set objshortcut = objshell.createshortcut(objfile.name) set coltargetlist = objwmiservice.execquery _ ("select * from CIM_DataFile where name = '" & replace(objshortcut.targetpath,"\","\\") & "'") wscript.echo objfile.name wscript.echo objshortcut.description for each objtarget in coltargetlist wscript.echo objtarget.drive wscript.echo objtarget.path wscript.echo objtarget.filename next end if next My hta not show radio buttons Thanks for help me.... |
|
|
|
Jul 31 2008, 07:46 AM
Post
#85
|
|
|
Group: Members Posts: 3 Joined: 31-January 07 Member No.: 124370
|
Ok, nevermind
I found this solutions. All shortcut's and path's have the same letter drive. Thanks Hello, This script in HTA not show radio button For each objTarget in colTargetList ReDim Preserve arrButtons(1,UBound(arrButtons,2)+1) arrButtons(0,UBound(arrButtons,2)) = objShortcut.Description arrButtons(1,UBound(arrButtons,2)) = "<Input type=radio name=radioList id='" & objTarget.Drive & objTarget.Path & objTarget.fileName &_ "' onClick=showRadioInfo>" & objShortcut.Description & "</BUTTON><BR>" Next I create one simply script in vbs, name is testpath.vbs and resume object objtarget.drive, objtarget.path and objtarget.filename not run correctly. Cant i help me for this issue? testpath.vbs strcomputer="." dim objshell, objfso, objwmiservice, strDrive set objshell = createobject("wscript.shell") set objfso = createobject("scripting.filesystemobject") set objwmiservice = getobject ("winmgmts:\\" & strcomputer & "\root\cimv2") dim colsubfolders, objfolder, filename set colsubfolders = objwmiservice.execquery _ ("Associators of {win32_directory.name='z:\winpe'} where assocclass = win32_subdirectory resultrole = partcomponent") for each objfolder in colsubfolders filename = objfolder.filename wscript.echo objfolder.name next for each objfolder in colsubfolders filename = objfolder.filename wscript.echo filename next dim colfilelist, objfile, objshorcut, coltargetlist, objtarget set colfilelist = objwmiservice.execquery _ ("Associators of {win32_directory.name='z:\winpe\" & filename & "'} where resultclass = CIM_DataFile") for each objfile in colfilelist if objfile.extension = "lnk" then set objshortcut = objshell.createshortcut(objfile.name) set coltargetlist = objwmiservice.execquery _ ("select * from CIM_DataFile where name = '" & replace(objshortcut.targetpath,"\","\\") & "'") wscript.echo objfile.name wscript.echo objshortcut.description for each objtarget in coltargetlist wscript.echo objtarget.drive wscript.echo objtarget.path wscript.echo objtarget.filename next end if next My hta not show radio buttons Thanks for help me.... |
|
|
|
Aug 8 2008, 10:54 AM
Post
#86
|
|
|
Group: Members Posts: 1 Joined: 8-August 08 Member No.: 204522 OS: none
|
Awesome utility! I am so glad you shared this!!!
Update: After playing with this I realize I need to be able to use different ghost switches for different images. It appears that the way it is currently coded, all images will use the same switches. Is there an easy way to change that or has anyone already added that functionality? Thanks... This post has been edited by jalexander319: Aug 8 2008, 03:31 PM |
|
|
|
Aug 21 2008, 04:26 PM
Post
#87
|
|
|
Group: Members Posts: 6 Joined: 16-August 07 Member No.: 151012 OS: Vista Ultimate x86
|
this is an awesome utility but i need some help. i have couple of image with different file extension ( gho, wim, pqi). how can i get button once check use the appropiate radio button to use correct imaging software.
|
|
|
|
Oct 24 2008, 01:42 PM
Post
#88
|
|
|
Newbie Group: Members Posts: 24 Joined: 5-April 07 Member No.: 134295
|
Awesome utility! I am so glad you shared this!!! Update: After playing with this I realize I need to be able to use different ghost switches for different images. It appears that the way it is currently coded, all images will use the same switches. Is there an easy way to change that or has anyone already added that functionality? Thanks... In our shop, we've modified the script to run a CMD file that includes the specific switch for that image, rather then reference the image itself. Yes, it's an extra step to create that CMD for each image, but we require that degree of control. |
|
|
|
Nov 16 2008, 01:07 AM
Post
#89
|
|
|
Group: Members Posts: 3 Joined: 13-November 08 Member No.: 218627 OS: none
|
|
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 8th January 2009 - 12:48 AM |