Page 1 of 1

Writing a batch file to open Recycle Bin or Control Panel

Posted: 22 Mar 2012 05:51
by d360991
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

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

Posted: 22 Mar 2012 05:58
by tonysathre
On Windows 7:

start c:\$RECYCLE.BIN
control

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

Posted: 22 Mar 2012 07:22
by d360991
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

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

Posted: 22 Mar 2012 07:31
by d360991
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.

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

Posted: 22 Mar 2012 07:38
by tonysathre
It does if you disable "Hide protected Operating System files"

Tony

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

Posted: 22 Mar 2012 07:41
by tonysathre
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

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

Posted: 22 Mar 2012 08:10
by foxidrive
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

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

Posted: 22 Mar 2012 10:36
by abc0502
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"

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

Posted: 22 Mar 2012 11:08
by foxidrive
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.

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

Posted: 22 Mar 2012 15:21
by abc0502
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 .

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

Posted: 23 Mar 2012 00:27
by foxidrive
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.

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

Posted: 23 Mar 2012 05:05
by abc0502
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 ! :!: