Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Wscript.Shell open file in wmplayer
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
cdubone  
View profile  
 More options Oct 31 2009, 10:09 pm
Newsgroups: microsoft.public.scripting.vbscript
From: cdubone <gu...@unknown-email.com>
Date: Sat, 31 Oct 2009 17:09:22 -0500
Local: Sat, Oct 31 2009 10:09 pm
Subject: Wscript.Shell open file in wmplayer

I'm making an app that lives on a CD that opens wmv's from the CD. I
thought everything was going well until I realized that if wmplayer
isn't the default player the thing crashes. I have no idea why this is
(I'm a Web dev and I'm totally out of my league here). Anyway, I'm
trying to get around this by forcing wmplayer to open. Here's my code:

Sub OpenFile (theFile)
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "assets\" & theFile
'            objShell.Run "wmplayer.exe D:assets\TheFile.wmv"
End Sub

This works: objShell.Run "assets\" & theFile

And if I hard code a file reference it works:
objShell.Run "wmplayer.exe D:assets\TheFile.wmv"

I'm essentially trying to fuse those two lines of code - open 'theFile'
in the assets directory via a relative path (not absolute) in wmplayer.
I've tried so many ways to get this going but can't seem to find the one
that works.

Will someone show me how this is done?

--
cdubone


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google