vickerps Posted December 5, 2007 Share Posted December 5, 2007 (edited) Hi , change in hta code this parameters from WINDOWSTATE = normalto WINDOWSTATE = fullscreenbyeHiFirst of all well done with this exactly what i have been looking for.I am trying to get this to run in full screen without any joy. I have edited the wizard.hta and set it to Fullscreen but this dosn't do anything?UpdateSorted it you need to set it to WINDOWSTATE=maximize Edited December 5, 2007 by vickerps Link to comment Share on other sites More sharing options...
vickerps Posted December 5, 2007 Share Posted December 5, 2007 Hi having problems point to the path of my ghost32.exeI have a mapped drive f:\ which contain ghost32.exeI edited the line <Button id=ghost onclick=doTask('"%programfiles%\ghost8\ghost32.exe"')>Ghost</BUTTON> to<Button id=ghost onclick=doTask('"f:\ghost32.exe"')>Ghost</BUTTON> This doesn't work. I am new to this kind of coding can anyone help please Link to comment Share on other sites More sharing options...
vickerps Posted December 7, 2007 Share Posted December 7, 2007 Ok I have another Q.I would like to change the Buttons being generated by the folder name (HP, DELL, ETC)to be a dropdown list box.the reason for this is that i have a lot of folders which makes way to many buttons.Anyone help me with this as i am only just learning the HTM coding Link to comment Share on other sites More sharing options...
Stratuscaster Posted December 13, 2007 Share Posted December 13, 2007 Hi having problems point to the path of my ghost32.exeI have a mapped drive f:\ which contain ghost32.exeI edited the line <Button id=ghost onclick=doTask('"%programfiles%\ghost8\ghost32.exe"')>Ghost</BUTTON> to<Button id=ghost onclick=doTask('"f:\ghost32.exe"')>Ghost</BUTTON> This doesn't work. I am new to this kind of coding can anyone help pleaseThis drove me bonkers for quite some time.I created a variable called "ghoCmd"ghocmd = "%comspec% /c t:\11\ghost32.exe"Then I created a new subroutine:'****************************************************************************'* doGhost'****************************************************************************Sub doGhost(doMe) objShell.Run ghoCmdEnd SubAnd then I set my button to this:<Button class='tool' id=ghost onclick=doGhost('')>Ghost 11</BUTTON> Might be overkill - but it works. Link to comment Share on other sites More sharing options...
Stratuscaster Posted December 13, 2007 Share Posted December 13, 2007 Ok I have another Q.I would like to change the Buttons being generated by the folder name (HP, DELL, ETC)to be a dropdown list box.the reason for this is that i have a lot of folders which makes way to many buttons.Anyone help me with this as i am only just learning the HTM codingAs an alternative, a co-worker wound up creating 26 copies of the HTA and modifying them to only pull items matching the first letter.So there's a small HTA that shows the A-Z buttons, then each button launches it's own HTA for that 'letter.'Not elegant, but again - it works. Link to comment Share on other sites More sharing options...
Stratuscaster Posted December 13, 2007 Share Posted December 13, 2007 (edited) The tool button would be fine with me, Could you share your syntax? I keep trying, but Im messing something up and cant get it to run.ThanksKen.I set a variable:walker = "%comspec% /c t:\11\GhWalk32.exe"I create a new subroutine:'****************************************************************************'* doGhostWalker'****************************************************************************Sub doWalker(doMe) objShell.Run walkerEnd SubAnd my button is:<Button class='tool' id=notepad onclick=doWalker('')>GhostWalker</BUTTON> Edited December 13, 2007 by Stratuscaster Link to comment Share on other sites More sharing options...
vickerps Posted December 21, 2007 Share Posted December 21, 2007 Hi Guy Done itChange the buttons to a combo box. Open the wizard.hta and cut this in place of the one already there. (i have tried to upload this as well)Sub enumDirsDim colSubfolders, objFolder, fileName'enumerate folders in images folder Set colSubfolders = objWMIService.ExecQuery _ ("Associators of {Win32_Directory.Name='z:\'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent")'create html buttons from each folder namestrBody = strBody &_"<select size='1' name='DropDown1'" For Each objFolder in colSubfolders fileName = objFolder.fileName strBody = strBody &_"onchange='enumImages(DropDown1.value)'><option value = '"&Filename&"'>"&Filename&"</option>" Next'post resulting html body to document strBody = strBody & "</select size><BR><BR><HR><BR>" body.innerHTML = strBodyEnd Sub Link to comment Share on other sites More sharing options...
geemail.email Posted January 23, 2008 Share Posted January 23, 2008 All,First of all, thank you for this post, it has been very useful in my creation of the boot CD. I am wondering if anyone can assist me with my next task. My WinPE 2.0 boot cd has all of the packages installed(WMI, HTA, WMI, Scripting). I am using a modified version of the wizard.hta and would like to accomplish something similar to Tombtek99's posting.I would like to:1. Boot with the WinPE CD2. Detect the workstation IP address or DHCP server IP address.3. Based on the workstation IP address or DHCP server IP address, map a network drive by reading in a text file stored on the boot cd.4. Use the mapped network drive to execute the HTA to run ghost, etc.Again, thank you for the previous discussions and for any assistance you can provide.This forum rocks!!! Link to comment Share on other sites More sharing options...
Stratuscaster Posted January 25, 2008 Share Posted January 25, 2008 You can create a VBS script launched from your startnet.bat to read the IP address (among other things) and store it into a variable. We use a sysinfo.cmd file to launch the sysinfo.vbs file, which in turn grabs the info and pipes it to a setenv.cmd file and runs it - both files are in x:\windows\system32. You can use an IF statement in your startnet.cmd to compare that IP variable and act accordingly (launch a file, run a script, map a drive, etc.)REM *** sysinfo.cmd ***cscript.exe //nologo x:\windows\system32\sysinfo.vbs >x:\windows\system32\setenv.cmdx:\windows\system32\setenv.cmdREM *** sysinfo.vbs ***dim count,t,ipchar,ip,lab,cntREM *** Get IP Address and Filter Link local IPv6 ***On Error Resume NextSet objWMIService = GetObject("winmgmts:\\" & "." & "\root\CIMV2")Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration", "WQL", &h10 + &h20)For Each objItem In colItems strIPAddress = Join(objItem.IPAddress, ",")Nextcount=1do while(ipchar<>",")ipchar=mid(strIPAddress,count,1)count=count+1if ipchar<>"," then ip=ip & ipcharLoop WScript.Echo "SET IP=" & ipREM *** Determine which lab menu to load ***REM *** LAB1 = 10.10.16.x - 10.10.31.x LAB2 = 10.10.32.x - 10.10.47.xcount=1cnt=0ipchar=""lab=""do while(ipchar<>",")ipchar=mid(strIPAddress,count,1)if ipchar="." then cnt=cnt+1count=count+1if cnt=2 and ipchar<>"." then lab=lab & ipcharloopif lab<32 then Wscript.Echo "SET LAB=" & "LAB1" else WScript.Echo "SET LAB=" & "LAB2"REM *** code placed in startnet.cmd ***set LAB=UNKNOWNcall x:\windows\system32\sysinfo.cmdGOTO %LAB%:LAB1REM *** launch the HTA and pass the IP variable to be displayed on screen ***mshta.exe "i:\wizards\lab1.hta" "%IP%"goto END:LAB2REM *** launch the HTA and pass the IP variable to be displayed on screen ***mshta.exe "i:\wizards\lab2.hta" "%IP%"goto END:UNKNOWNx:\Programs\nu2menu\nu2menu.exe:ENDWe just completed a setup that does this very thing. If the third octet of the IP is <32, it launches the hta for one lab, and if it's >=32, it launches the hta for another lab. If it's neither, or an error occurs, a 'default' nu2menu is loaded.Our setup is fairly deep and uses PXE rather than off the CD, but the basic steps should still apply. Hope this helps. Link to comment Share on other sites More sharing options...
weedy171 Posted March 17, 2008 Share Posted March 17, 2008 Can someone tell me why for the Image name is blank. The radio button show and all other text shows. Just not the text for the radio button image name.Thanks Link to comment Share on other sites More sharing options...
Stratuscaster Posted March 17, 2008 Share Posted March 17, 2008 Can someone tell me why for the Image name is blank. The radio button show and all other text shows. Just not the text for the radio button image name.ThanksDid you add anything to the COMMENT field in the PROPERTIES of the shortcut that you created? Link to comment Share on other sites More sharing options...
weedy171 Posted March 17, 2008 Share Posted March 17, 2008 This is what my code looks like....'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 Link to comment Share on other sites More sharing options...
weedy171 Posted March 17, 2008 Share Posted March 17, 2008 This is what my code looks like for the radio button section.'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 Link to comment Share on other sites More sharing options...
zorphnog Posted March 17, 2008 Share Posted March 17, 2008 This has nothing to do with the HTA code. As @Stratuscaster pointed out, how did you create your shortcuts for your images? Did you add anything to the COMMENTS sections because this is where the text for the radio button is pulled. Link to comment Share on other sites More sharing options...
weedy171 Posted March 17, 2008 Share Posted March 17, 2008 I thought he was talking about comments in the code. Sorry about that. Yes I did not have any comments in the shortcuts. Thanks a lot for your help and a KUDOS on this cool program. 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