none
Running Caspol without creating duplicate entries RRS feed

  • Question

  • Hello, I've created a batch file that adds a mapped drive to the local intranet settings. It seems to work fine but, if the file is run twice or more, the mapped drive is added multiple times. Is there anyway to prevent that? Or will it even hurt anything if there are multiple entries? Thanks.

    set drive=%~d0%

    @ECHO OFF
    SET CASPOL=%windir%\Microsoft.NET\Framework\v2.0.50727\CasPol.exe
    CLS
    %CASPOL% -pp off
    %CASPOL% -m -ag 1.2 -url file://%drive%/* FullTrust -name %drive%

    GOTO EOF

    :EOF

    Monday, May 18, 2009 4:38 PM

Answers

  • Hi ASI Tech

    It won't hurt anything, but just take some time to set the config files (if do the same config settings, no changes at all).

    Thanks.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com
    • Marked as answer by ASI Tech Wednesday, May 20, 2009 1:51 PM
    Wednesday, May 20, 2009 6:41 AM