Attach a batch file to outlook email for other to run RRS feed

  • Question

  • Greetings,

    I'm trying to attach a batch file that will run a WMIC command to an outlook email. This email will be sent to 200 employees and they need a way to launch it.

    My requirements are the batch file can not be saved to their hard drives it must be something that can be launched from Outlook. The batch command saves the output file to a network directory on its own.

    Batch file contents:

    wmic /output:"%computername%.htm" product get Name, Version /format:htable

    Thank you,


    Friday, September 15, 2017 1:48 PM

All replies

  • Hi Maxine,

    By default, .bat files will be blocked by Outlook for security concern. If you're using Microsoft Exchange Server, typically only the email server administrator can unblock these file types.

    If you want the users to receive the blocked .bat files, it is recommended to make the file available without using Outlook, save the file to the cloud, or make it less likely to be blocked by Outlook.

    The following are some safe ways to share files with people that you trust:

    1. Use a shared server or the cloud   
     Save the attachment to the cloud, a server, or an FTP site that you can access. This can include OneDrive or a secure network share server such as SharePoint. You can send a link to the attachment on the server or FTP site so that the users can click the link to access the file and save it to the computer. 

    2. Use a file compression utility   
    Using a compression utility, such as WinZip, creates a compressed archive file that has a different file name extension. Outlook doesn’t recognize these file name extensions as potential threats. Therefore, it doesn’t block the new attachment. Many third-party compression utilities are available.

    3. Rename the file   
    You can rename the .bat attachment to use a file name extension that Outlook doesn’t recognize as a threat. 

    For more information, hopefully the article below can be helpful:

    Blocked attachments in Outlook

    Best regards,
    Yuki Sun

    Please remember to mark the replies as answers if they helped.

    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, September 18, 2017 9:43 AM