Windows Media Encoder Startup Script

The best method is to purchase or find a utility that will allow the .BAT file to run as a service so that no one has to log onto the host for the stream to encode. I recommend the FireDaemon Service Manager and I have a tutorial on how to setup this program here.

The other way is to simply force the computer to logon a user automatically. Here is how:

  1. Create a shortcut in your STARTUP folder to the .BAT file. You can right click on the .BAT file from My Computer or Explorer and select “Create Shortcut”. Then move the new shortcut to “C:\Documents and Settings\All Users\Start Menu\Programs\Startup”
  2. Open the Regedit program by clicking START | RUN and typing “regedit” in the box. Then click Run.
  3. Navigate to “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon”
  4. There should be an entry called “DefaultUserName” Double-click this key and change the name to a legitimate user on the system.
  5. Change “DefaultDomainName” if your user is not located on this host.
  6. If you don’t see an entry labeled “DefaultPassword”, add it by clicking EDIT then NEW then STRING VALUE. Call it “DefaultPassword” and double-click it to enter your password.
  7. If “AutoAdminLogon” does not exist, create it the same way and give it a value of “1”

Now close regedit and reboot the machine. If all goes well you should see the machine logon and the DOS box will open loading the stream. If you get an error logging on, try using regedit to enter an administrator account as the user.

Additonal Pages: 1 2

Comments

  1. Kevin Lassard
    September 12th, 2008 | 8:51 am

    I’ve tried this and unfortunately I couldn’t get it to work. My vbs file was found at C:\WMSDK\WMEncSDK9\samples\vb\wmcmd\Wmcmd.vbs and I placed my .bat file and .wme files directly on the C drive. Any suggestions?

  2. October 24th, 2008 | 11:59 am

    So your .bat file might look like:

    cscript.exe C:\WMSDK\WMEncSDK9\samples\vb\wmcmd\Wmcmd.vbs -wme C:\mystream.wme

    and what happens when you try to run it by double clicking? When it works correctly, you should see a series of periods progressing across the window. I’ve had issues with PUSH streams that have to login to the server so that may be your problem.

  3. TRTR
    December 15th, 2009 | 1:27 pm

    hi, is there a way of creating a script to automate this with a Push stream that needs to log on, I run an internet radio and want my djs to be able to kick of a live broadcast with a double click and thats it…

    Thanks in advance

  4. December 15th, 2009 | 8:19 pm

    HI TRTR, I just posted a tutorial on how to modify the WME file so that you can broadcast a PUSH stream with authentication so that should help. As for starting the feed, you can just save the .BAT file to your desktop and have the DJs double-click the file to start encoding. Let me know how that works out.

  5. TRTR
    December 16th, 2009 | 2:12 am

    Thank you admin for your quick response, i have now edited the .wme file but still no luck.. my .bat file reads like this “cscript.exe c:\WME\Wmcmd.vbs –wme c:\WME\LIVEHQ.wme” i have tried running this line in the cmd prompt and get the error”invalid parameter -wme” also when i run the livehq.wme by itself, it still asks for me to click ok on the login box (username and pwd are saved as always), didnt know if it was normal and it would auto authenticate when run with the wmcmd.vbs and .bat file… ive hit a brickwall with this and really appreciate your help, thanks again..

  6. January 27th, 2010 | 2:52 am

    Hi again, sorry for the delay. Do you have a non-password protected stream to test the VB script with? Also, try creating a simple WME file that encodes a static media file to something else and run it with your .bat to see if it works. And are you running as admin if you’re on a Vista or Win7 machine? ~Chris

  7. JrWorthy
    June 28th, 2010 | 3:37 pm

    Thank you for posting this information. i can’t believe how scarce information on Windows Media CMD encoding is on the web. I have been able to successfully use the info about as well as the Username and Password authentication. By successful I have received the ‘periods’ in the CMD window, however I have not been able to access my streams with any success. Do you have any ideas as to why I am not able to connect to my streaming server? Using the WME gui I can successfully connect and stream but not using the CMD line.
    -Jr

  8. June 28th, 2010 | 5:05 pm

    Hello Jr, so you can run the same WME file from the GUI and you can connect to the stream but if you run from the command line you can’t connect? It could be a username issue if you are trying to run the script under a non-administrator account. Try logging into the Windows machine where you are running the script as a local administrator account. Then start a command line and manually run the script and see if that works. I noticed that if I ran the script as a service in Firedaemon it wouldn’t work with some of the different accounts. I have to go back and troubleshoot to see which one actually worked.

Leave a reply