in

andy vt's tools & blog

automating lazy

Run External Program doesn't run

Last post Wed, Nov 2 2011 6:40 PM by cguy123. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • Wed, Nov 2 2011 6:58 AM

    • cguy123
    • Not Ranked
    • Joined on Wed, Nov 2 2011

    Run External Program doesn't run

    Hi Guys, thanks for any help you can provide me. 

     
    I'm running win7 ultimate sp1 with the latest dvrms toolbox installed. Commercial scanning using showanalyzer works great, thanks for this awesome software.

    Now I'm trying to get my files renamed using the awesome wtv-metadata renamer program http://wtvmetarenamer.codeplex.com/

    working. 

     I've created a batch file that calls the powershell program and then the powershell script, and this works correctly if I manually click on the .bat, does

    exactly what it's supposed to. 

    BUT, when this is called from dvrms using the Durrant.Plugins.RunExternal it doesn't run? 

    I've tried changing the permissions on the .bat file,and the powershell script, but it doesn't seem that it made any difference.

    Any ideas?

    Thanks,

     

    - Cguy

     

     

    Filed under:
  • Wed, Nov 2 2011 10:21 AM In reply to

    Re: Run External Program doesn't run

    I don't know about that but are you aware that the toolbox can natively rename recordings based on the show's metadata?

    For instance, any of the series I record get renamed by air date and episode and then moved into their own folder ie;

    1999-01-09 - Gilligan Saves Ginger.dvrms

    or

    1999-01-09 - Giligan's Island - Gilligan Shoots the Skipper.dvrms

    or basically any way, shape or form you want.

    It's the Durrant.Plugins.AdvancedFileRename feature - something like this;

     %WM/MediaOriginalBroadcastDateTime% - %WM/SubTitle%

    Hope this helps :-)

  • Wed, Nov 2 2011 11:15 AM In reply to

    • cguy123
    • Not Ranked
    • Joined on Wed, Nov 2 2011

    Re: Run External Program doesn't run

     Thanks for the help, I wasn't aware of that functionality. I really like the way wtv-metadata renamer works, and the abilities it has, so I'd still like to try and use it if possible. 

     Can anyone tell me if they've successfully launched a poweershell script from the filewatcher process? Or any external program for that matter? 

      

    Thanks in advance again.

     

    - Cguy

     

  • Wed, Nov 2 2011 6:40 PM In reply to

    • cguy123
    • Not Ranked
    • Joined on Wed, Nov 2 2011

    Re: Run External Program doesn't run

     OK so for anyone else who may come across a problem like this, I've finally got the solution. After hours and hours of testing and trial and error here's what you'll need to do to execute a powershell script from a dvrmstoolbox externalrun command.

     1. You need to run set-executionpolicy remotesigned on BOTH the 32 bit powershell.exe AND the 64 bit powershell(x86).exe to run scripts you downloaded from the internet (namely wtv-metadatarenamer)

     2. You'll need to set the program to run to c:\windows\system32\powershell\1.0\powershell.exe (the whole path is needed, yours might be different)

     3. You MUST use this syntax in the arguments window exactly as it is here:

    -command ""&" 'c:\< Your Path Here >\wtv-metarenamer.ps1'"

     Replace the path with your full script path. 

     After that it works like a charm, spent many hours trying to figure out the syntax that would pass the parameters correctly. 

     Hope this saves someone else from a lot of headache. 

    BTW- the wtv-metadatarenamer polls http://thetvdb.com/ and gets season and episode info, so it's quite handy to use. 

     Best,

    Cguy

     

     

    Filed under:
Page 1 of 1 (4 items)
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems