How To Avoid SysWOW64 and Virtual Store?


  1. Posts : 524
    win10
       #1

    How To Avoid SysWOW64 and Virtual Store?


    I have win10 64 bit.

    I want to run a dos type batch file that will run an exe file that will download file

    When I do it the downloads get put in syswow64 though by rights they should go into the folder that the .exe was run from.

    Following some googled advice I moved the batch file to c:\windows\system and ran it from there.

    now it deposits the files in appdata\local\virtual store

    Just one time it put the files in the right place. a test run of three files. I then went and edited the batch file to run a complete download of 26 files and it started putting them in virtual store.

    i don't know what I did wrong. I can't get it back to performing properly.

    Any help on how it should be straightforwardly done?
      My Computer


  2. Posts : 18,432
    Windows 11 Pro
       #2

    What about adding a CD (change directory) command to the front of the batch file to change directory to where you want the downloaded files to go?
      My Computer


  3. Posts : 54
    Microsoft Windows 10 Pro x64
       #3

    Would help if you present your script code here to see what you're doing wrong as well as any third-party programs.
      My Computer


  4. Posts : 524
    win10
    Thread Starter
       #4

    This is just about what fixed it for me. I moved the batch file into the directory where the .exe file was and altered the batch file so's it just calls the .exe rather than calling it via a path. (don't know if that made any difference).

    And now it's going well. Right this minute.

    That doesn't, though, answer the question: what was going on, why wouldn't it work before?

    I can supply details: the .exe file is youtube-dl.exe and the batch file looks like this (originally):

    (but I've shortened it, just deleted most entries. shouldn't make any difference, I think?)

    @echo on
    "c:\Testytdl\youtube-dl.exe" -f best "https://www.youtube.com/watch?v=mmCnQDUSO4I" -o "Dmitri Shostakovich - Waltz No. 2.mp4"
    pause
    "c:\Testytdl\youtube-dl.exe" -f best "https://www.youtube.com/watch?v=EFJ7kDva7JE" -o "Chopin - Spring Waltz.mp4"
    pause
    "c:\Testytdl\youtube-dl.exe" -f best "https://www.youtube.com/watch?v=HqmF-B2-3NA" -o "O Sole Mio - Carreras - Domingo - Pavarotti.mp4"
    pause
    "c:\Testytdl\youtube-dl.exe" -f best "https://www.youtube.com/watch?v=kkJC8p48g6g" -o "Vivaldi - Filiae maestae Jerusalem RV 638.mp4"

    :fin
      My Computer


  5. Posts : 54
    Microsoft Windows 10 Pro x64
       #5

    After reading some of the documentation and playing around with youtube-dl a bit, based on your script I can see the problem. If you want the downloaded file(s) in a specific location, you must specify that location in the -o section before the file name. Here's an example:

    Code:
    C:\Testydl\youtube-dl -f best "https://www.youtube.com/watch?v=qVEYJ0PxhZU" -o "Family guy - Every Pizza Place.mp4"
    The code above will download the best quality video from the youtube url entered and name it 'Family guy - Every Pizza Place.mp4' in the same directory as the youtube-dl executable file, this is similar to your code.

    Now say you wanted to download the video to a folder called 'Family Guy Videos' that's location in the same path as youtube-dl.exe, the code would then look like this:

    Code:
    C:\Testydl\youtube-dl -f best "https://www.youtube.com/watch?v=qVEYJ0PxhZU" -o ".\Family Guy Videos\Family guy - Every Pizza Place.mp4"
    Now lets say that the 'Family Guy Videos' folder was located in another path than where youtube-dl.exe is located or is even in a different drive/partition altogether, in that case you will want to use an absolute path instead and the code may look like this:

    Code:
    C:\Testydl\youtube-dl -f best "https://www.youtube.com/watch?v=qVEYJ0PxhZU" -o "C:\Users\Admin\Videos\Family Guy Videos\Family guy - Every Pizza Place.mp4"
    Or

    Code:
    C:\Testydl\youtube-dl -f best "https://www.youtube.com/watch?v=qVEYJ0PxhZU" -o "E:\My Videos\YouTube\Family Guy Videos\Family guy - Every Pizza Place.mp4"
    An example of a basic batch script with the above info in mind:

    Code:
    @echo off
    goto INIT
    
    :INIT
    title my ydl script
    cls
    setlocal
    if exist C:\Testydl set PATH=%YDL_PATH%;C:\Testydl
    goto BATCH_JOB
    
    :BATCH_JOB
    echo.
    
    youtube-dl -f best "https://www.youtube.com/watch?v=qVEYJ0PxhZU" -o "E:\My Videos\YouTube\Family Guy Videos\Family guy - Every Pizza Place.mp4" >nul
    if exist "E:\My Videos\YouTube\Family Guy Videos\Family guy - Every Pizza Place.mp4" echo. " [Family guy - Every Pizza Place.mp4] > [E:\My Videos\YouTube\Family Guy Videos] "
    
    youtube-dl -f best "https://www.youtube.com/watch?v=74-HJkYCaVc" -o "E:\My Videos\YouTube\Family Guy Videos\Family Guy - Joe Arrests His Son !.mp4" >nul
    if exist "E:\My Videos\YouTube\Family Guy Videos\Family Guy - Joe Arrests His Son !.mp4" echo. " [Family Guy - Joe Arrests His Son !.mp4] > [E:\My Videos\YouTube\Family Guy Videos] "
    
    echo.
    echo. Press Any Key To Continue...
    pause>nul
    goto PROG_EXIT
    
    :PROG_EXIT
    exit
    Last edited by mTaylor0248603; 12 Jan 2019 at 11:18.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:51.
Find Us




Windows 10 Forums