bblaze83 Posted July 17, 2009 Share Posted July 17, 2009 I am trying to create a menu with links to programs local on winpe image. I am using a bootable flash drive to get into winpe. I am having trouble with the links actually working. The links work just fine from the HTA in a windows environment, but when in winpe, I get nothing. I can click forever and no joy. Please help. Link to comment Share on other sites More sharing options...
bblaze83 Posted July 18, 2009 Author Share Posted July 18, 2009 (edited) I was able to get the hta menu to start working by using some VBscript. The problem now is that the second and third programs will not run. I am getting an error on line 53 and 61 character 11. I cannot see the problem though as each line was copied from working ones. The script is as follows:<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>PE Applications</title><script language="vbscript"><!-- Insert code, subroutines, and functions here -->Set oShell = CreateObject("Wscript.Shell")oShell.Run "%Comspec% /c dir",1,True</script><hta:applicationapplicationname="apps" border="dialog"borderstyle="normal"caption="Win PE Applications"contextmenu="no"icon="myicon.ico"maximizebutton="no"minimizebutton="yes"navigable="no"scroll="no"selection="no"showintaskbar="yes"singleinstance="yes"sysmenu="yes"version="1.0"windowstate="maximize"></head><body bgcolor="#000021" text="#FFFFFF"><font FACE="Arial" Size=+4><center><p>| WinPE Utilities |</p></font><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><font face="arial" size=+2> <script language="VBScript"> Sub RunClam Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "x:\tools\clam\clamwinportable.exe", 1, true End Sub </Script> <p> <Input type="button" value="Clam AntiVirus" name="RunClam" onclick="RunClam"></p>[b] <script language="VBScript"> Sub RunAvast Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "x:\tools\avast\avast.exe", 1, true End Sub </Script><p> <Input type="button" value="Avast AntiVirus" name="RunAvast" onclick="RunAvast"></p> <script language="VBScript"> Sub RunDr Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "x:\tools\drweb\drweb.exe", 1, true End Sub </Script><p> <Input type="button" value="Dr. Web AntiVirus" name="RunDr" onclick="RunDr"></p>[/b] <script language="VBScript"> Sub RunSophos Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "x:\tools\sophos\sav32cli.exe", 1, true End Sub </Script><p> <Input type="button" value="Sophos CLI AntiVirus" name="RunSophos" onclick="RunSophos"></p> <script language="VBScript"> Sub RunFC Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "x:\tools\freecommander\freecommander.exe", 1, true End Sub </Script><p> <Input type="button" value="Free Commander" name="RunFC" onclick="RunFC"></p> <script language="VBScript"> Sub RunRA Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "x:\tools\runalyzer\runalyzer.exe", 1, true End Sub </Script><p> <Input type="button" value="RunAlyzer" name="RunRA" onclick="RunRA"></p></font></center></body></html>problem area here:<script language="VBScript"> Sub RunAvast Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "x:\tools\avast\avast.exe", 1, true End Sub </Script><p> <Input type="button" value="Avast AntiVirus" name="RunAvast" onclick="RunAvast"></p> <script language="VBScript"> Sub RunDr Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "x:\tools\drweb\drweb.exe", 1, true End Sub </Script><p> <Input type="button" value="Dr. Web AntiVirus" name="RunDr" onclick="RunDr"></p>The bold areas are where the problem is residing. Any help would be greatly appreciated. Edited July 18, 2009 by Tripredacus codebox Link to comment Share on other sites More sharing options...
Tripredacus Posted July 18, 2009 Share Posted July 18, 2009 What is the error you got?Also, is there a specific reason why you haven't upgraded your PE version? Link to comment Share on other sites More sharing options...
bblaze83 Posted July 18, 2009 Author Share Posted July 18, 2009 The error that I am getting is "user canceled operation". It is stating that the error is on line 54 and 63, char 11. When I was getting that error I had spaces between each set of scripts. For example:<script language="VBScript">Sub RunAvastDim WshShellSet WshShell = CreateObject("WScript.Shell")[color="#FF0000"][b]WshShell.Run "x:\tools\avast\avast.exe", 1, true[/b][/color]End Sub</Script><p> <Input type="button" value="Avast AntiVirus" name="RunAvast" onclick="RunAvast"></p><script language="VBScript">Sub RunDrDim WshShellSet WshShell = CreateObject("WScript.Shell")[color="#FF0000"][b]WshShell.Run "x:\tools\drweb\drweb.exe", 1, true[/b][/color]End Sub</Script><p> <Input type="button" value="Dr. Web AntiVirus" name="RunDr" onclick="RunDr"></p>The bold red lines are where the error code was stating. It is char 11 where it said the error was.It's not the launched program that is causing the problem because it can be launched from the command line just fine. The problem resides on 2 different computers as well.As for not changing to WinPE 3.0: 1) it's a BETA and I'm not too keen on BETA, I am looking for something stable and tested. 2) That's what I am used to. I like the "way it handles." It's missing some good stuff like easily customizable shells and so forth. That is why I am using an HTA. Link to comment Share on other sites More sharing options...
Tripredacus Posted July 18, 2009 Share Posted July 18, 2009 I have a feeling that those programs may require a cmdline parameter to stay open. For example, in this post:http://www.msfn.org/board/index.php?showtopic=121316The user can't launch imagex.exe in a similar fashion, but can launch notepad. Imagex can't be run by simply typing in the name of the app, it needs parameters. However, you can try an alternate method of launching the program to see if that has any result.In this example, the "1" is actually "1.exe" http://www.msfn.org/board/index.php?s=&...st&p=870462I'll give this a little time but I'm probably going to move this into the scripting forum. 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