Winmount: Need Help W/ Batch File!

Discussion in 'Software' started by HarryPotter, Sep 16, 2026 at 8:22 AM.

  1. HarryPotter

    HarryPotter MajorGeek

    Hi! I have WinMount on two computers, but on one, it doesn't work properly: I can't mount an archive file. :( So, I'm using a batch file to decompress a file, use SUBST to mount the folder as a drive, wait until I'm done then recompress if necessary and clean up. The batch file follows:
    Code:
    @echo off
    ::echo %1
    echo Mounting your WinMount drive now...
    ::Change the path in the next line to the one of your WinMount installation:
    md "C:\MyPrgs\WinMount"
    md "C:\MyPrgs\WinMount\%~n1"
    "C:\Program Files\WinMount\WinMount.exe" -E %1 "-o:C:\MyPrgs\WinMount\%~n1"
    subst z: "C:\MyPrgs\WinMount\%~n1"
    pause
    subst /d z:
    choice /m "Save modifications to WinMount archive?"
    if errorlevel 2 goto exit
    "C:\Program Files\WinMount\WinMount.exe" -C "C:\MyPrgs\WinMount\%~n1" "-o:%~1"
    :exit
    rd /s /q "C:\MyPrgs\WinMount\%~n1"
    pause
    
    The problem is that, when I use it, I get an extra folder in the path, meaning the path contains an extra entry of the same name. What am I doing wrong? Is there a way to get WinMount to work properly, so I don't need this file? BTW, how do I run Explorer from a batch file?
     
  2. xrobwx71

    xrobwx71 Private First Class


    md "C:\MyPrgs\WinMount" remove this line
    md "C:\MyPrgs\WinMount\%~n1"

    explorer
    or a specific directory
    explorer "C:\Users\YourName\Documents"
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds