Welcome Guest.   Make a donation to an author on the site September 16, 2014, 12:28:03 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Free DonationCoder.com Member Kit: Submit Request.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: Fix Vista so I can drop a file from Windows Explorer to cmd yet again  (Read 17328 times)
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« on: December 12, 2008, 01:51:47 PM »

This is my first post, and it doesn't really seem right for my first post to be asking for something!  tongue I may have a candidate for a coding snack, though.

Here is my idea. In every version of Windows from Windows 95 to Windows XP, I found that I could drag a file from Windows Explorer into a cmd window and Windows would put the path to the file on the command line. This worked with both executables and data filenames. I think this was extremely handy if you use any command line tools at all, especially with the length of directory paths these days. Vista broke this functionality just to be mean*, maybe someone knows an easy way to make something that would restore this functionality in Vista.

(And yes, I know you can work around it by holding down Shift and right clicking on the file and choosing Copy as Path, so if this coding snack never gets...munched on? I will live.)
Logged
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: December 12, 2008, 04:40:19 PM »

Don't worry about your first post being a request, you posted it in a nice tone rather than "GIMME I DESERVE THIS!" :-)

I think the problem might have something to do with console applications running under ClientServer Runtime System (CSRSS)... an CSRSS runs as a system service (ie., higher privilege than even user accounts with admin privileges), and iirc Vista disables communication between lower- and higher-privilege applications.

I'm not 100% about this though, but it would explain why the functionality was dropped.
Logged

- carpe noctem
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: January 08, 2009, 05:43:54 PM »

smiley Try DropCommand!

DropCommand - Enables drag and drop of files to a command window in Vista.

Features:

- Drop multiple files.



You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #3 on: January 08, 2009, 06:46:52 PM »

 Thmbsup Thmbsup  cheesy Thmbsup Thmbsup

I can't believe it! I followed the link f0dder gave to the Microsoft blog, and it seemed impossible even for a third party utility.

You are a genius!
Logged
basementjack
Supporting Member
**
Posts: 4

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #4 on: January 09, 2009, 09:53:29 PM »

Skrommel - how does dropcommand work -
is it making a one time change (ie registry?)
or is it something we need to run each time?
Logged
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: January 09, 2009, 09:58:57 PM »

 Sad You need to keep it running.

DropCommand places an OLE enabled window underneath the mouse pointer whenever it hovers over a command window, and then copies and pastes the files dropped to the command line.

 smiley It could even be extended to accept dropped text.

Skrommel
« Last Edit: January 23, 2009, 07:04:16 PM by skrommel » Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
mabra
Participant
*
Posts: 1

View Profile Give some DonationCredits to this forum member
« Reply #6 on: February 20, 2009, 04:48:59 AM »

Hi !

I tried DropCommand on a windows server 2008. Its running and staying in the tray. But if I dro a file from the explorer to an open dos window, nothing happens and I see the usual "blocked" symbol.

Waht can I do??

Thanks--mabra
Logged
war59312
Participant
*
Posts: 9

View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: April 19, 2009, 08:52:15 AM »

Nice tool, but the sound effect is very annoying. Option to disable it please?
Logged

God Bless America
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: April 20, 2009, 05:11:30 PM »

Skrommel: so it clobbers the clipboard?
Logged

- carpe noctem
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: April 29, 2009, 08:38:03 PM »

 tellme @mabra: Is the command window's class called ConsoleWindowClass?

@war59312: No option unless you edit the source code or empty the wav file. Just create an empty text file and rename it to DropCommand.wav.

@f0dder: It restores the clipboard after the drop is complete.

Skrommel
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: April 30, 2009, 01:49:43 AM »

Quote
@f0dder: It restores the clipboard after the drop is complete.
Thmbsup
Logged

- carpe noctem
Curt
Supporting Member
**
Posts: 6,338

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #11 on: November 05, 2009, 01:29:22 PM »

@skrommel:
On your page, 'DropCommand' has wrongly been named "RunToClose" (the second one).
Logged
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #12 on: November 05, 2009, 08:35:56 PM »

Ha! I can't believe it! Microsoft restored the original functionality in Windows 7!
Logged
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: November 06, 2009, 11:38:43 AM »

Ha! I can't believe it! Microsoft restored the original functionality in Windows 7!
A lot of things happened internally from Vista to Win7, so it's probably more a question of cmd.exe no longer running in the security context of CSRSS rather than "MS fixed it" smiley
Logged

- carpe noctem
daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #14 on: April 27, 2010, 11:19:42 PM »

@skrommel:
On your page, 'DropCommand' has wrongly been named "RunToClose" (the second one).

I noticed that, and went and found this thread again to figure out why the name changed.
You can see the incorrect name here. The name is correct at the top of the page, only incorrect at the screenshot.
Logged
CrawlerBrinx
Participant
*
Posts: 17

View Profile Give some DonationCredits to this forum member
« Reply #15 on: October 07, 2012, 06:09:13 PM »

Hey, how about to make the tray icon more useful? it would be nice if double click would open the console instead of an "about" window.
I'm also not sure if that is possible, but it would nice to be able to drag-n-drop a file directly to the tray icon of the script, so it would open a new cmd window and paste the dropped file's path there.
Logged
dilentec
Participant
*
Posts: 1


View Profile Give some DonationCredits to this forum member
« Reply #16 on: September 25, 2013, 01:54:44 PM »

 cheesy This is definitely a must have. If the dropping sound could be an optional feature it would be just perfect. Thanks for sharing. Donations on their way.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.039s | Server load: 0.16 ]