Batch file looses directory context

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

When a batch file is launched from the run command, a
popup comes up asking for permission to allow it.

On allowing it the script runs but from the system32
directory, rather than the directory of the batch file
which is the behaviour or the run command

Once the batch file has been run once and the "remember
this action" is selected the command runs correctly.

Put this in a batch file
cd
pause

save to not your system32 directory. and run from the
start|run look at the output on the first run (when
antispyware intevenes) and the subsequent runs (when it
doesn't)

Regards

Simon
 
On allowing it the script runs but from the system32
directory, rather than the directory of the batch file
which is the behaviour or the run command

This bug is potentially catastrophic - a script could
completely mess up the system32 directory.

I disabled the script blocking feature immediately upon
noticing it.
 
Back
Top