I have created Batch file in windows 10.

Vithal Suryakant Pawitwar 1 Reputation point
2021-08-18T06:15:18.147+00:00

I have created Batch file in windows 10. (Send mail to designated users with attachment from network other computer, path is ok). But when I am running the batch file with Double click then mails are delivered but when I am opening batch with administrator rights then the mails are not delivered and getting msg in command prompt that "Path for attached file is not found". Please give your input as same batch file when running through double click and Running through admin rights is having issue.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,759 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 32,091 Reputation points
    2021-09-06T17:28:24.337+00:00

    attachment from network other computer,

    You are probably running into this.

    https://activedirectoryfaq.com/2015/04/mapped-drives-are-not-available-in-windows-explorer/

    Due to security reasons, the two contexts do not share all available information. Besides other things, drive mappings are not shared between “Admin” and “User” contexts.

    Use a UNC path instead of a drive letter or follow the instructions in the section: Solution: How to make mapped drives visible

    0 comments No comments