![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Start an application I am trying to start (run) an application from a vbscript. I have tried various methods of getting to the correct path and came up with the following. app_dir= "E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\" app_exe= "ssh-client-g3.exe" ObjShell.Run app_dir & app_exe The paths are correct but I get the error msg 'the system cannot find the file specified'. Any suggestions on form or syntax for getting this applicaiton to run would be greatly appreciated! thanks, JT |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Start an application "JT" <JT@xxxxxx> wrote in message news:E2E8C3A9-075C-44BC-A384-F85B9CE54ED9@xxxxxx Quote: >I am trying to start (run) an application from a vbscript. > > I have tried various methods of getting to the correct path and came up > with > the following. > > app_dir= "E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\" > app_exe= "ssh-client-g3.exe" > ObjShell.Run app_dir & app_exe > > The paths are correct but I get the error msg 'the system cannot find the > file specified'. > > Any suggestions on form or syntax for getting this applicaiton to run > would > be greatly appreciated! thanks, > > JT coding ObjShell.Run app_dir & app_exe you might code wscript.echo app_dir & app_exe You will immediately see that you're trying to execute the following command: E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe It is now obvious that this cannot possibly work because the path contains embedded spaces. You must surround the whole lot by one set of double quotes so that the Windows Command Processor knows that it is one single file name: ObjShell.Run """" & app_dir & app_exe & """" |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Start an application Thank you so much for your reply. Your options works and I can also make the application run with ("""E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe""") I don't understand the quote to space correlation. If my application path had no spaces in it would I need quotes around the path or simply parentheses? Do I need on set of quotes for every space? Thank you. "Pegasus (MVP)" wrote: Quote: > > "JT" <JT@xxxxxx> wrote in message > news:E2E8C3A9-075C-44BC-A384-F85B9CE54ED9@xxxxxx Quote: > >I am trying to start (run) an application from a vbscript. > > > > I have tried various methods of getting to the correct path and came up > > with > > the following. > > > > app_dir= "E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\" > > app_exe= "ssh-client-g3.exe" > > ObjShell.Run app_dir & app_exe > > > > The paths are correct but I get the error msg 'the system cannot find the > > file specified'. > > > > Any suggestions on form or syntax for getting this applicaiton to run > > would > > be greatly appreciated! thanks, > > > > JT > These problems are best solved by giving yourself some eyes. Instead of > coding > ObjShell.Run app_dir & app_exe > you might code > wscript.echo app_dir & app_exe > > You will immediately see that you're trying to execute the following > command: > E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe > > It is now obvious that this cannot possibly work because the path contains > embedded spaces. You must surround the whole lot by one set of double quotes > so that the Windows Command Processor knows that it is one single file name: > > ObjShell.Run """" & app_dir & app_exe & """" > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Start an application Try this: - Click Start / Run / cmd{OK} - Type this command: E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe Does it work? No! It says 'E:\Program' is not recognized as an internal or external command, operable program or batch file. Why? Because the Command Process thinks that "E:\Program" is the name of the application you're trying to run and that the rest are parameters. However, when you type the command "E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe" then there is no problem, because the Command Processor now knows that it must treat the whole string between double quotes as a command. If your command contained no spaces then you would not need the double quotes. However, you should make it a habit of having them. One set of double quotes around the whole lot will suffice. "JT" <JT@xxxxxx> wrote in message news:7443480C-C6E5-40CA-BF2C-38514233A326@xxxxxx Quote: > Thank you so much for your reply. Your options works and I can also make > the > application run with > ("""E:\Program Files\UWICK\SSH Tectia\SSH Tectia > Client\ssh-client-g3.exe""") > > I don't understand the quote to space correlation. > If my application path had no spaces in it would I need quotes around the > path or simply parentheses? Do I need on set of quotes for every space? > > Thank you. > > "Pegasus (MVP)" wrote: > Quote: >> >> "JT" <JT@xxxxxx> wrote in message >> news:E2E8C3A9-075C-44BC-A384-F85B9CE54ED9@xxxxxx Quote: >> >I am trying to start (run) an application from a vbscript. >> > >> > I have tried various methods of getting to the correct path and came up >> > with >> > the following. >> > >> > app_dir= "E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\" >> > app_exe= "ssh-client-g3.exe" >> > ObjShell.Run app_dir & app_exe >> > >> > The paths are correct but I get the error msg 'the system cannot find >> > the >> > file specified'. >> > >> > Any suggestions on form or syntax for getting this applicaiton to run >> > would >> > be greatly appreciated! thanks, >> > >> > JT >> These problems are best solved by giving yourself some eyes. Instead of >> coding >> ObjShell.Run app_dir & app_exe >> you might code >> wscript.echo app_dir & app_exe >> >> You will immediately see that you're trying to execute the following >> command: >> E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe >> >> It is now obvious that this cannot possibly work because the path >> contains >> embedded spaces. You must surround the whole lot by one set of double >> quotes >> so that the Windows Command Processor knows that it is one single file >> name: >> >> ObjShell.Run """" & app_dir & app_exe & """" >> >> >> |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Start an application "Pegasus (MVP)" wrote: Quote: > Try this: > - Click Start / Run / cmd{OK} > - Type this command: > E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe > > Does it work? No! It says > 'E:\Program' is not recognized as an internal or external command, operable > program or batch file. > Why? Because the Command Process thinks that "E:\Program" is the name of the > application you're trying to run and that the rest are parameters. However, > when you type the command > "E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe" then > there is no problem, because the Command Processor now knows that it must > treat the whole string between double quotes as a command. > > If your command contained no spaces then you would not need the double > quotes. However, you should make it a habit of having them. One set of > double quotes around the whole lot will suffice. > > > "JT" <JT@xxxxxx> wrote in message > news:7443480C-C6E5-40CA-BF2C-38514233A326@xxxxxx Quote: > > Thank you so much for your reply. Your options works and I can also make > > the > > application run with > > ("""E:\Program Files\UWICK\SSH Tectia\SSH Tectia > > Client\ssh-client-g3.exe""") > > > > I don't understand the quote to space correlation. > > If my application path had no spaces in it would I need quotes around the > > path or simply parentheses? Do I need on set of quotes for every space? > > > > Thank you. > > > > "Pegasus (MVP)" wrote: > > Quote: > >> > >> "JT" <JT@xxxxxx> wrote in message > >> news:E2E8C3A9-075C-44BC-A384-F85B9CE54ED9@xxxxxx > >> >I am trying to start (run) an application from a vbscript. > >> > > >> > I have tried various methods of getting to the correct path and came up > >> > with > >> > the following. > >> > > >> > app_dir= "E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\" > >> > app_exe= "ssh-client-g3.exe" > >> > ObjShell.Run app_dir & app_exe > >> > > >> > The paths are correct but I get the error msg 'the system cannot find > >> > the > >> > file specified'. > >> > > >> > Any suggestions on form or syntax for getting this applicaiton to run > >> > would > >> > be greatly appreciated! thanks, > >> > > >> > JT > >> > >> These problems are best solved by giving yourself some eyes. Instead of > >> coding > >> ObjShell.Run app_dir & app_exe > >> you might code > >> wscript.echo app_dir & app_exe > >> > >> You will immediately see that you're trying to execute the following > >> command: > >> E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe > >> > >> It is now obvious that this cannot possibly work because the path > >> contains > >> embedded spaces. You must surround the whole lot by one set of double > >> quotes > >> so that the Windows Command Processor knows that it is one single file > >> name: > >> > >> ObjShell.Run """" & app_dir & app_exe & """" > >> > >> > >> > > I clicked, start > run and typed exactly: c:\Program Files\CCP\EVE\Eve.exe no quotations with a space between Program and Files. Game executed normally. Just thought I would let you know. Running Windows XP SP3 |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Start an application "Kris Robertson" <KrisRobertson@xxxxxx> wrote in message news:2B207BD4-8ADE-46FC-A7DA-E0014DFEF255@xxxxxx Quote: > > > "Pegasus (MVP)" wrote: > Quote: >> Try this: >> - Click Start / Run / cmd{OK} >> - Type this command: >> E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe >> >> Does it work? No! It says >> 'E:\Program' is not recognized as an internal or external command, >> operable >> program or batch file. >> Why? Because the Command Process thinks that "E:\Program" is the name of >> the >> application you're trying to run and that the rest are parameters. >> However, >> when you type the command >> "E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe" >> then >> there is no problem, because the Command Processor now knows that it must >> treat the whole string between double quotes as a command. >> >> If your command contained no spaces then you would not need the double >> quotes. However, you should make it a habit of having them. One set of >> double quotes around the whole lot will suffice. >> >> >> "JT" <JT@xxxxxx> wrote in message >> news:7443480C-C6E5-40CA-BF2C-38514233A326@xxxxxx Quote: >> > Thank you so much for your reply. Your options works and I can also >> > make >> > the >> > application run with >> > ("""E:\Program Files\UWICK\SSH Tectia\SSH Tectia >> > Client\ssh-client-g3.exe""") >> > >> > I don't understand the quote to space correlation. >> > If my application path had no spaces in it would I need quotes around >> > the >> > path or simply parentheses? Do I need on set of quotes for every >> > space? >> > >> > Thank you. >> > >> > "Pegasus (MVP)" wrote: >> > >> >> >> >> "JT" <JT@xxxxxx> wrote in message >> >> news:E2E8C3A9-075C-44BC-A384-F85B9CE54ED9@xxxxxx >> >> >I am trying to start (run) an application from a vbscript. >> >> > >> >> > I have tried various methods of getting to the correct path and came >> >> > up >> >> > with >> >> > the following. >> >> > >> >> > app_dir= "E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\" >> >> > app_exe= "ssh-client-g3.exe" >> >> > ObjShell.Run app_dir & app_exe >> >> > >> >> > The paths are correct but I get the error msg 'the system cannot >> >> > find >> >> > the >> >> > file specified'. >> >> > >> >> > Any suggestions on form or syntax for getting this applicaiton to >> >> > run >> >> > would >> >> > be greatly appreciated! thanks, >> >> > >> >> > JT >> >> >> >> These problems are best solved by giving yourself some eyes. Instead >> >> of >> >> coding >> >> ObjShell.Run app_dir & app_exe >> >> you might code >> >> wscript.echo app_dir & app_exe >> >> >> >> You will immediately see that you're trying to execute the following >> >> command: >> >> E:\Program Files\UWICK\SSH Tectia\SSH Tectia Client\ssh-client-g3.exe >> >> >> >> It is now obvious that this cannot possibly work because the path >> >> contains >> >> embedded spaces. You must surround the whole lot by one set of double >> >> quotes >> >> so that the Windows Command Processor knows that it is one single file >> >> name: >> >> >> >> ObjShell.Run """" & app_dir & app_exe & """" >> >> >> >> >> >> >> >> > Hate to be rude, but yes it does work > > I clicked, start > run and typed exactly: > > c:\Program Files\CCP\EVE\Eve.exe > > no quotations with a space between Program and Files. > > Game executed normally. > > Just thought I would let you know. > > Running Windows XP SP3 - Click Start / Run / cmd{OK} This will start a Command Prompt, and in a Command Prompt you do need the double quotes around paths containing spaces. You operated from the Start button, which uses a different mechanism to launch applications. Just thought I would let you know . . . |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| getting application to start up on second monitor | Vista General | |||
| Start application minimized | Vista performance & maintenance | |||
| -- Can not start application -- | Vista installation & setup | |||
| Wish to eliminate a start-up application | Vista performance & maintenance | |||
| My application doesn't start | Vista General | |||