Writing a batch file to open Recycle Bin or Control Panel

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
d360991
Posts: 8
Joined: 18 Mar 2012 13:12

Writing a batch file to open Recycle Bin or Control Panel

#1 Post by d360991 » 22 Mar 2012 05:51

Is it possible to launch Windows Explorer in Recycle Bin or Control Panel? Something like:

"C:\Windows\explorer.exe" "Recycle Bin"

"C:\Windows\explorer.exe" "Control Panel"

Thanks,
-Nina

tonysathre
Posts: 14
Joined: 20 Mar 2012 10:07

Re: Writing a batch file to open Recycle Bin or Control Pane

#2 Post by tonysathre » 22 Mar 2012 05:58

On Windows 7:

start c:\$RECYCLE.BIN
control

d360991
Posts: 8
Joined: 18 Mar 2012 13:12

Re: Writing a batch file to open Recycle Bin or Control Pane

#3 Post by d360991 » 22 Mar 2012 07:22

This is so simple. Great.

On Windows 7, is it possible to open different elements of the control panel via batch files? For example, Scheduled Tasks?

Thanks again,
-Nina

d360991
Posts: 8
Joined: 18 Mar 2012 13:12

Re: Writing a batch file to open Recycle Bin or Control Pane

#4 Post by d360991 » 22 Mar 2012 07:31

tonysathre wrote:On Windows 7:

start c:\$RECYCLE.BIN


Sorry, on Windows 7, "start c:\$RECYCLE.BIN" doesn't seem to open the Windows recycle bin.

tonysathre
Posts: 14
Joined: 20 Mar 2012 10:07

Re: Writing a batch file to open Recycle Bin or Control Pane

#5 Post by tonysathre » 22 Mar 2012 07:38

It does if you disable "Hide protected Operating System files"

Tony

tonysathre
Posts: 14
Joined: 20 Mar 2012 10:07

Re: Writing a batch file to open Recycle Bin or Control Pane

#6 Post by tonysathre » 22 Mar 2012 07:41

d360991 wrote:This is so simple. Great.

On Windows 7, is it possible to open different elements of the control panel via batch files? For example, Scheduled Tasks?

Thanks again,
-Nina



taskschd.msc

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Writing a batch file to open Recycle Bin or Control Pane

#7 Post by foxidrive » 22 Mar 2012 08:10

d360991 wrote:Is it possible to launch Windows Explorer in Recycle Bin or Control Panel? Something like:

"C:\Windows\explorer.exe" "Recycle Bin"

"C:\Windows\explorer.exe" "Control Panel"

Thanks,
-Nina


explorer.exe has some command line parameters which you can use. I suspect that Win7 has more options than say explorer.exe in XP

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Writing a batch file to open Recycle Bin or Control Pane

#8 Post by abc0502 » 22 Mar 2012 10:36

Hi, i have another way u can use "CLSID" to open Recycle bin or my computer or control panel like that:

Code: Select all

@echo off
cls
start ::{20d04fe0-3aea-1069-a2d8-08002b30309d}

this open my computer and here is other "CLSID"

Code: Select all

My Computer ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}
Recycle Bin ::{645FF040-5081-101B-9F08-00AA002F954E}
Control Panel ::{21EC2020-3AEA-1069-A2DD-08002B30309D}
Printers ::{2227A280-3AEA-1069-A2DE-08002B30309D}
Internet Explorer ::{871C5380-42A0-1069-A2EA-08002B30309D}
Network Neighborhood ::{208D2C60-3AEA-1069-A2D7-08002B30309D}
Subscriptions ::{F5175861-2688-11d0-9C5E-00AA00A45957}
ActiveX Cache Folder ::{88C6C381-2E85-11D0-94DE-444553540000}

and this link has more :
http://www.autohotkey.com/docs/misc/CLSID-List.htm

Change the "CLSID" in the batch file with the "clsid" you need to open
and don't forget the "::" before every "CLSID"

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Writing a batch file to open Recycle Bin or Control Pane

#9 Post by foxidrive » 22 Mar 2012 11:08

It works in XP here also. Something odd is that it opened the recycle bin on E: for me

I couldn't make it open the recycle bin on C: by changing the current drive either.

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Writing a batch file to open Recycle Bin or Control Pane

#10 Post by abc0502 » 22 Mar 2012 15:21

I tested on 7 i deleted files from c and d
when running the batch to open recylebin
all files from c and d is there in that recylce bin,i don't understand what do you mean with recycle bin of E and C :?:
i will try to test on xp an post the result .

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Writing a batch file to open Recycle Bin or Control Pane

#11 Post by foxidrive » 23 Mar 2012 00:27

I see what you mean - but the window opens and shows me 5 files with the original folders located on E: drive.

My recycle bin folder on C: has 115 files in it.
My recycle bin folder on D: has 540 files in it.
My recycle bin folder on E: has 5 files in it.

I dunno.

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Writing a batch file to open Recycle Bin or Control Pane

#12 Post by abc0502 » 23 Mar 2012 05:05

i tested on xp and give me the same result on windows 7, i don't know what is wrong but CLSID is suppossed to be the same in windows i have no idea what is wrong ! :!:

Post Reply