Jump to content

Simple WinPE 3.x Shell


mdwerne
 Share

Recommended Posts

I'm looking to create a simple WinPE 3.x interface to use as a launching point for diagnostic, backup and restore operations.

Since there is no "Windows Explorer" to contend with, I've created a simple Task Bar with apps and their icons. Is there a way to have a right click menu that will display and launch apps of my choice? I would want the right click menu to be always available (anywhere on the desktop, not the taskbar), even if another app is launched below it (if possible).

I'm looking for a push in the right direction...UDF's to look at, examples, etc...

Thanks,

-Mike

Edited by mdwerne
Link to comment
Share on other sites

Microsoft doesn't want people using WinPE as a desktop OS all the time. That is why there is no Explorer and you are forced to use a command line.

But there is no need to re-invent the wheel Take a look at BartPE, which implements a simple GUI already.

Link to comment
Share on other sites

All winbuilder-projects include explorer-like interfaces or hacks for the native explorer, too :graduated:

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Thank you both for your replies. I've used BartPE for many years and just started with WinBuilder a few months ago, what I'm after is much simpler than either of those. All I'm after is a right click menu that I can start up when WinPE starts. I already have a "start button" with all my apps mapped, just thought the right click menu would be a cool extra feature if AutoIt could get me there. Also, on this particular disk, I need all programs developed in house for auditing reasons...so PEBuilder and WinBuilder are out.

I don't need an Explorer, just the right click menu if it's possible.

Thanks again,

-Mike

Link to comment
Share on other sites

How about putting this in a While Loop:

If _IsPressed(02) Then
Run("Notepad"); Or whatever GUI you want to appear after initiating a right click
EndIf

Does that make sense? I think this should help get what you want.

Thanks jazzyjeff...yes, this is a good idea, and definitely a good place to start. :graduated:

-Mike

Link to comment
Share on other sites

Here's a variation on the code in this post by Rasim

http://www.autoitscript.com/forum/index.php?showtopic=85912&hl=popup

This will run on winpe.

You can block the popup menu over the winpe taskbar (AutoIt gui?) with WindowFromPoint.

Edit: I guess at some point the code tags will get sorted out (again) from the damage IP.Board does with each of their 'upgrades'.

In the mean time, we at least have Tidy in SciTE

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiMenu.au3>
#include <Misc.au3>
OnAutoItExitRegister("_Exit")
Opt('MustDeclareVars', 1)
Opt("TrayAutoPause", 0)
Global $sTaskTitle = "au3 taskbar title"
Global $hGUI, $hMenu, $aPos, $hWin
Global $iRun1, $iRun2, $iRun3
Global $tStruct = DllStructCreate($tagPoint)
Global $hDLL = DllOpen("User32.dll")
$hGUI = GUICreate("", 1, 1, -100, -100, $WS_POPUP, $WS_EX_TOOLWINDOW)
Global $cMenu = GUICtrlCreateContextMenu()
$hMenu = GUICtrlGetHandle(-1)
$iRun1 = GUICtrlCreateMenuItem("Run 1", $cMenu)
GUICtrlCreateMenuItem("", $cMenu)
$iRun2 = GUICtrlCreateMenuItem("Run 2", $cMenu)
GUICtrlCreateMenuItem("", $cMenu)
$iRun3 = GUICtrlCreateMenuItem("Run 3", $cMenu)
While 1
Sleep(20)
If _IsPressed("02", $hDLL) Then
  $aPos = MouseGetPos()
  DllStructSetData($tStruct, "x", $aPos[0])
  DllStructSetData($tStruct, "y", $aPos[1])
  $hWin = _WinAPI_WindowFromPoint($tStruct)
  If WinGetTitle($hWin) = $sTaskTitle Then ContinueLoop
  WinMove($hGUI, "", $aPos[0], $aPos[1])
  GUISetState(@SW_SHOW, $hGUI)
  Switch _GUICtrlMenu_TrackPopupMenu($hMenu, $hGUI, $aPos[0], $aPos[1], 1, 1, 2)
   Case $iRun1
    MsgBox(4096, "Run 1", "")
   Case $iRun2
    MsgBox(4096, "Run 2", "")
   Case $iRun3
    MsgBox(4096, "Run 3", "")
  EndSwitch
  GUISetState(@SW_HIDE, $hGUI)
EndIf
WEnd
Func _Exit()
GUIDelete($hGUI)
DllClose($hDLL)
_GUICtrlMenu_DestroyMenu($hMenu)
EndFunc   ;==>_Exit
Edited by rover

I see fascists...

Link to comment
Share on other sites

Here's a variation on the code in this post by Rasim

http://www.autoitscript.com/forum/index.php?showtopic=85912&hl=popup

This will run on winpe.

You can block the popup menu over the winpe taskbar (AutoIt gui?) with WindowFromPoint.

Edit: I guess at some point the code tags will get sorted out (again) from the damage IP.Board does with each of their 'upgrades'.

In the mean time, we at least have Tidy in SciTE

snip...

OMG! This is awesome, thank you (and Rasim)! If I can't get this to do what I need, then I might as well just give up now.

Have a spectacular day!!!

-Mike

Edited by mdwerne
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...