Help A Desktop script or link to execute a drag-drop file.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
alan_b
Expert
Posts: 357
Joined: 04 Oct 2008 09:49

Re: Help A Desktop script or link to execute a drag-drop fi

#16 Post by alan_b » 18 Jul 2010 02:15

My need is to select a *.BAT and to drop it and run.

When I Run CMD.exe I can issue the command
Notepad.exe
or Notepad
and that launches the text editor with apparently no damage to the O.S.

I vaguely remember giving CMD.exe a command invoking a DLL,
and it cleanly avoided running that and gave me one of the O.S. "Can't do that" messages.

I am just wondering if there are any files that I could select and would do more damage via this Drag-n-Drop link than if I right click and choose "Open" ?

I ask for the sake of information - not action.
I accept your advice and will play safe.

N.B. only only asked CMD.exe to run a DLL after creating and verifying a fresh Acronis disc partition image.

Regards
Alan

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Help A Desktop script or link to execute a drag-drop fi

#17 Post by aGerman » 18 Jul 2010 05:53

Alan

I thought you only need this batch file to test/execute other batch files. That was the reason for my last code.
It's harmless to drag'n'drop each file type you want. CMD.EXE will check
  • can it be executed directly
  • is the extension associated with an application (to run it in this application)
DLL files are neither executable nor are they associated with an application. Nothing happens.

Regards
aGerman

alan_b
Expert
Posts: 357
Joined: 04 Oct 2008 09:49

Re: Help A Desktop script or link to execute a drag-drop fi

#18 Post by alan_b » 18 Jul 2010 07:41

Thank you
Yes, I only have plans for experiments with BAT files where a normal double click launch may hit a fatal error and all I see is a black pop-up that instantly vanishes, whilst Drag-n-Drop gives me a permanent window that will catch and display all error messages.

I would like to think that any EXE that comes with Windows will have been fully debugged ! !

I cannot think of any reason to drop anything but a BAT (or maybe CMD) script onto Drag-n-Drop,
I just wanted assurance that there was no unexpected danger.

Regards
Alan

Post Reply