MSFN Forum: Killing a Start Menu Folder - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Killing a Start Menu Folder Rate Topic: -----

#1 User is offline   TheJerk 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 08-April 05

Posted 19 April 2005 - 02:39 PM

Is there a way to kill a start menu folder during runonceex? I know about Internet Explorer, but the only thing I can figure is explorer.exe which would kill the shell, right?

Reason I ask is because Macromedia Studio, which I've decided to use an AutoIt script for (because of the Flash plugin) opens both a webpage from Macromedia as well as the program group folder in the start menu. I can kill the website, but what about the folder?


#2 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 19 April 2005 - 06:53 PM

As far as I understand it, RunOnceEx runs prior to the explorer shell starting up, if this is the case then you should be able to kill explore.exe to close it down.

Easy way to test... while your runonce is running, hit Ctrl Alt Del.. thatll bring up task mgr and you can see for yourself.

Post up your results

#3 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 19 April 2005 - 08:32 PM

TheJerk, on Apr 20 2005, 06:39 AM, said:

Reason I ask is because Macromedia Studio, which I've decided to use an AutoIt script for (because of the Flash plugin) opens both a webpage from Macromedia as well as the program group folder in the start menu.  I can kill the website, but what about the folder?

In Autoit, this will close the window, but if still exists, it will try for up to 5 secs. Just that sometimes, a second close message is required, in RunOnceEx.
$title = "TheTitleHere"
WinWait($title)

For $i = 1 To 20
	WinClose($title)
	If Not WinExists($title) Then ExitLoop
	Sleep(250)
Next


#4 User is offline   tguy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 698
  • Joined: 19-May 04

Posted 19 April 2005 - 10:38 PM

You could use the SendKeys command in vbScript to send an ALT+F4 command to close the window.

See the MS Technet Script Center for example of how to use SendKeys.

Then just call the .vbs file from your RunOnceEx.cmd.

#5 User is offline   TheJerk 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 08-April 05

Posted 20 April 2005 - 10:11 AM

Well, considering I'm already using AutoIt, I might as well stick to that.

Here's an interesting question, though. Let's say I don't know exactly what the title of the window is that I'm trying to close. For instance, it could be just the name of the folder, or in my preconfigured case could be the entire path including the drive letter. Considering this is a variable and not a constant (given different computer setups), what would be the best method. Does AutoIt use regular expressions (I haven't had a chance to research this just yet)? Would it be best to search the title for a given set of characters and then issue that a close command?

Incidentally, thanks for the input.

#6 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 20 April 2005 - 03:35 PM

Did you try the taskkill explore.exe?

#7 User is offline   TheJerk 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 08-April 05

Posted 20 April 2005 - 08:33 PM

No, not yet. I have to re-setup the OS portion of the CD. I just finished the application portion of it earlier and I'm going to give it a test before I hit the sack tonight (will know by morning what the outcome is).

#8 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 20 April 2005 - 09:00 PM

TheJerk, on Apr 21 2005, 02:11 AM, said:

Well, considering I'm already using AutoIt, I might as well stick to that.

Here's an interesting question, though.  Let's say I don't know exactly what the title of the window is that I'm trying to close.  For instance, it could be just the name of the folder, or in my preconfigured case could be the entire path including the drive letter.  Considering this is a variable and not a constant (given different computer setups), what would be the best method.  Does AutoIt use regular expressions (I haven't had a  chance to research this just yet)?  Would it be best to search the title for a given set of characters and then issue that a close command?

Incidentally, thanks for the input.

Regular expressions are still in beta. You can close the active window, by just using "" instead of giving a title. Also, WinGetHandle() is an option as well, instead of the title. You could change the Opt() setting for window text to 2. Then you can pick a substring, witch can be part of the name of the folder only.
I would not close the explorer process, while running Autoit scripts. This is a brutal method for a simple problem. This could affect the outcome of your script, unless you insert some code to handle this process. Asking a window to close, is better then killing a main system process.

#9 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 21 April 2005 - 07:18 AM

But are you even sure that explore.exe is even running at this stage?

#10 User is offline   pdmcmahon 

  • Newbie
  • Group: Banned
  • Posts: 49
  • Joined: 20-May 04

Posted 21 April 2005 - 05:40 PM

I would look for a program called PSKILL.exe. I have noticed on my Unattended Windows 2003 Server installations that TASKKILL.exe doesn't exist on Servers. My point being is that PSKILL.exe has a few more options.

Microsoft Windows XP [Version 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

C:\>w:

W:\>pskill /?

PsKill v1.03 - local and remote process killer
Copyright © 2000 Mark Russinovich
http://www.sysinternals.com

PsKill terminates processes on a local or remote NT system.

Usage: pskill [\\RemoteComputer [-u Username]] <process Id or name>
-u Specifies optional user name for login to
remote computer.


W:\>

#11 User is offline   durex 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 953
  • Joined: 21-October 04

Posted 21 April 2005 - 05:49 PM

The point of this thread is that nobody is clear on what the actual process is that should be killled... not how you should kill it

#12 User is offline   TheJerk 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 08-April 05

Posted 21 April 2005 - 09:27 PM

Agreed. I still haven't had a chance to check if explore.exe is running during runonceex as of yet since my unattended dvd is messed up (I have a seperate thread on that issue in the proper forum). As soon as I've worked through that issue, I'll post back here on my results.

#13 User is offline   TheJerk 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 08-April 05

Posted 22 April 2005 - 01:20 PM

explorer.exe is running during the runonceex. I was wrong about the folder opening, though. The folder doesn't open until runonceex finishes and the user account opens. Same is true for the internet explorer window that it opens. Is there any way to avoid having those open after the next boot?

#14 User is offline   pecha 

  • Group: Members
  • Posts: 2
  • Joined: 30-August 06

Posted 24 March 2007 - 12:28 PM

tries this, it functioned with me.

;Cleanup Open Start Menu Folder
Sleep(1000)
$handle = WinGetHandle("WinRAR - explorer", "")
WinClose($handle)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy