Launching an application question 
Author Message
 Launching an application question

Hi all,
I asked this question yesterday but apparently it wasn't clear. So
I'll try again. The snippit listed below will not run.
****
Set WshShell = WScript.CreateObject("Wscript.Shell")
WSHShell.Run ("D:\Program Files\EndItAll\enditall.exe /K:cliponboots")
'this results in error code 80070002:
' error: The system cannot find the file specified
Set WSHShell = Nothing
****
The directory and executable all exist. What am I missing?
TIA .... Don


Tue, 29 Nov 2005 00:56:32 GMT  
 Launching an application question
what is the ":" for after the /K?  Is that supposed to be there?  Does
Cliponboots need to be "" seperate from the ones for the whole string?  (ie
Shell.Run ("D:\Program Files\EndItAll\enditall.exe /K: ""cliponboots""").
Have you tried adding ,,True at the end like:  Shell.Run ("D:\Program
Files\EndItAll\enditall.exe /K:cliponboots"), 1, True

--

need to e-mail me off list just get rid of "your fears" and
drop me a line.



Quote:
> Hi all,
> I asked this question yesterday but apparently it wasn't clear. So
> I'll try again. The snippit listed below will not run.
> ****
> Set WshShell = WScript.CreateObject("Wscript.Shell")
> WSHShell.Run ("D:\Program Files\EndItAll\enditall.exe /K:cliponboots")
> 'this results in error code 80070002:
> ' error: The system cannot find the file specified
> Set WSHShell = Nothing
> ****
> The directory and executable all exist. What am I missing?
> TIA .... Don



Tue, 29 Nov 2005 01:32:19 GMT  
 Launching an application question
The problem is the space in the pathname. You need to enclose it in quotes:

WSHShell.Run ("""D:\Program Files\EndItAll\enditall.exe"" /K:cliponboots")

I have never forgiven Microsoft for allowing spaces in file/folder names. That
was one of their dumber moves.
--
Dave "Crash" Dummy - A weapon of mass destruction

http://lists.gpick.com



Tue, 29 Nov 2005 02:17:08 GMT  
 Launching an application question
probably easier to read this way (chr(34) replaces " and avoids certain
problems

WSHShell.Run (chr(34) & "D:\Program Files\EndItAll\enditall.exe" & chr(34) &
"/K:cliponboots")

--

need to e-mail me off list just get rid of "your fears" and
drop me a line.


Quote:
> The problem is the space in the pathname. You need to enclose it in
quotes:

> WSHShell.Run ("""D:\Program Files\EndItAll\enditall.exe"" /K:cliponboots")

> I have never forgiven Microsoft for allowing spaces in file/folder names.
That
> was one of their dumber moves.
> --
> Dave "Crash" Dummy - A weapon of mass destruction

> http://lists.gpick.com



Tue, 29 Nov 2005 04:36:55 GMT  
 Launching an application question
On Thu, 12 Jun 2003 14:17:08 -0400, "\"Crash\" Dummy"

Quote:

>The problem is the space in the pathname. You need to enclose it in quotes:

>WSHShell.Run ("""D:\Program Files\EndItAll\enditall.exe"" /K:cliponboots")

>I have never forgiven Microsoft for allowing spaces in file/folder names. That
>was one of their dumber moves.

That did it!!!!  many thanks.
Actually I've always "enjoyed" the spaces (or the ability to use them)
but haven't really appreciated the problem they can cause until now. I
would have thought that the MS programmers would have already allowed
for this behavior .. apparently we have the right hand - left hand
syndrome.
Again, thanks.
Don


Tue, 29 Nov 2005 04:50:09 GMT  
 Launching an application question
what they can't even let you do double quotation marks without a hiccup, you
expect them to handle spaces.  :-)

the crazy thing is that microsoft deploys many of their software with spaces
also (even things as simple as "Program Files") and then like you said, you
get in trouble for having it that way.

and maybe if you can explain that you can explain why Microsoft had to mess
with me with Windows XP.  I had all these great little scripts to my office
documents, but for some reason Microsoft decided lets not call it program
files\office\ etc anymore lets call it program files\office10\ etc.  So now
I have to have a script look in the registry files for the location of the
office program to remap my desktop icons and worse, I have to run it in my
logon script because our office has w2k and xp workstations.  So if I script
it one way and then I go to another operating system, then the link changes
to the new location.  THat makes much more sense then just keeping their
products at the same location.

Sorry, I am allowed one tyrate a week against Microsoft aren't I?  Or will
the MPD (Microsoft Police Department) ban me, spam me, and bug me????

Have a good day,
Robert

--

need to e-mail me off list just get rid of "your fears" and
drop me a line.



Quote:
> On Thu, 12 Jun 2003 14:17:08 -0400, "\"Crash\" Dummy"

> >The problem is the space in the pathname. You need to enclose it in
quotes:

> >WSHShell.Run ("""D:\Program Files\EndItAll\enditall.exe""
/K:cliponboots")

> >I have never forgiven Microsoft for allowing spaces in file/folder names.
That
> >was one of their dumber moves.

> That did it!!!!  many thanks.
> Actually I've always "enjoyed" the spaces (or the ability to use them)
> but haven't really appreciated the problem they can cause until now. I
> would have thought that the MS programmers would have already allowed
> for this behavior .. apparently we have the right hand - left hand
> syndrome.
> Again, thanks.
> Don



Tue, 29 Nov 2005 05:10:42 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Question on launching a VC++ Application.

2. Question about launching an application!!!!!!

3. Novice Question: Launching DOS application

4. Launching Windows 95 applications from your VB application

5. Hi, how can i launch an application using a file of this application

6. Launch an application from a webpage.

7. Launch Applications from Internet Explorer

8. Launch server-side application

9. Launching an application/File Associations

10. Launching Application from a Client-side Script

11. Launching HTA (HTML Applications)

12. Launch application

 

 
Powered by phpBB® Forum Software