View Single Post
Old 07-01-2009   #1 (permalink)
Gavaskar


 
 

wshell.run path building help

Hello

I'm trying to run a program, lets use mspaint as an example.

I've got mspaint in the folder path

c:\Program Files\Company Name\Version-001\mspaint.exe
c:\Program Files\Company Name\Version-002\mspaint.exe
c:\Program Files\Company Name\Version-003\mspaint.exe


When I run the script, I query the file mspaint.exe for the version number,
so I know which one to execute, and I assign that version ID to a variable
VersionString.
The returned string will be "Version-001" or "Version-002" or "Version-003"


My problem is when I do a wshShell.run I'm having problems with the white
spaces and adding the variable.

Mypath = """c:\Program Files\Company Name\""" & VersionString &
"\mspaint.exe", 3, False

wshshell.run Mypath, 3, False

I always get a error message that it can not find the specified file

Any Ideas?



My System SpecsSystem Spec