Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Normally, after creating an executable as an alternate data stream, for instance:

type exec_this.bat > C:\blank.txt:exe.bat

one could simply say

start C:\blank.txt:exe.bat

to run the executable. In Windows 7, all I seem to get is "Access is denied." or "The system cannot find the file $WHATEVER_THE_FILE_IS."

How can I execute this batch file?

share|improve this question
    
This seems like a bad idea. What's your use case? – uSlackr May 16 '11 at 21:48
up vote 5 down vote accepted

Windows 7 silently removed the ability to execute anything from an ADS. However, from the DOS command line, there are other options. For a batch file, you can execute line by line:

for /f "usebackq delims=φ" %i in (blank.txt:exe.bat) do %i

(Keep in mind, this does not actually execute the batch file into its own process, it simply reads and executes each line from the file. The φ symbol is typed with alt code number 2541. You want the delimiter to be a character you wouldn't ever use in the code.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .