Jump to content

Explorer window


RayRay
 Share

Recommended Posts

Our users are locked down and I'm writing a script to allow some to delete ActiveX controls out of c:\windows\downloaded program files (I'll RunAsSet to give rights). I have the code below, however, it still allows user to navigate away from the folder. Otherwise, this would work. Anyone have a suggestion? (I did get this code from the forum, saved me some work!)

CODE
#include <GUIConstants.au3>

$Form1 = GUICreate("AForm1", 450, 279, 322, 198, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))

$Obj1 = ObjCreate("Shell.Explorer.2")

$Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 1276, 908)

GUISetState(@SW_SHOW)

$Obj1.navigate2("c:\windows\downloaded program files")

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

Thanks for any help

Link to comment
Share on other sites

  • Moderators

WinSetOnTop and _MouseTrap to the Client coords of your GUI?

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...