I have executed one wrong command and drastic has happeneed.

G

Guest

Hi,
I have executed
cmd /c for %a in (d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do subst
%a: %windir% which was sent to me by mail Can anyone please help me out. the
above command displays multiple directories with each having the content of
windir. Please help
 
P

Pegasus \(MVP\)

Space-in distress said:
Hi,
I have executed
cmd /c for %a in (d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do subst
%a: %windir% which was sent to me by mail Can anyone please help me out.
the
above command displays multiple directories with each having the content
of
windir. Please help


Why would you execute a command about which you know
nothing at all? A perfect recipe for a disaster?

You can undo the damage with much the same command:

cmd /c for %a in (d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do subst
%a: /d
 
C

cquirke (MVP Windows shell/user)

On Fri, 3 Aug 2007 00:00:02 -0700, Space-in distress <Space-in
I have executed
cmd /c for %a in (d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do subst
%a: %windir% which was sent to me by mail

Who sent it by email?

If you share any of those drive letters over the network (and
potentially, the Internet), you may now be exposing Windows subtree
(with all those lovely malware integration opportunities) via the
shares of other drive letters. I can't see a good reason to do that.
The above command displays multiple directories with each having
the content of windir.

Well, it would; that's what it does.

What did you think it would do?

I have to say, this post reminds me of an old (pre-Win95) cartoon in
Punch, where there's a husband reading a newspaper ad to the wife:

"It says here, I can have my name added to a list of confidence
trick victims for only ten pounds!"

-- Risk Management is the clue that asks:
"Why do I keep open buckets of petrol next to all the
ashtrays in the lounge, when I don't even have a car?"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top