FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

[HELP] cannot wsh.Run path with spaces

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
myakove
Newbie


Joined: 06 Mar 2008
Posts: 12

PostPosted: Tue Jun 16, 2009 12:30 am    Post subject: [HELP] cannot wsh.Run path with spaces Reply with quote

hi,

i'm trying to run app with path that have space and it's fail

var wsh = new ActiveXObject('WScript.Shell');
wsh.Run( "C:/Program Files (x86)/kmp/KMPlayer.exe \"" + newPath + "\"" ,1 , false );

if i change it to
wsh.Run( "E:/kmp/KMPlayer.exe \"" + newPath + "\"" ,1 , false );

it's work
how do i fix this
thanks
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue Jun 16, 2009 1:12 am    Post subject: Re: [HELP] cannot wsh.Run path with spaces Reply with quote

Does this work for you?

wsh.Run( "\"C:/Program Files (x86)/kmp/KMPlayer.exe\" \"" + newPath + "\"" ,1 , false );

- Jonas

[quote="myakove"]hi,

i'm trying to run app with path that have space and it's fail

var wsh = new ActiveXObject('WScript.Shell');
wsh.Run( "C:/Program Files (x86)/kmp/KMPlayer.exe \"" + newPath + "\"" ,1 , false );

if i change it to
wsh.Run( "E:/kmp/KMPlayer.exe \"" + newPath + "\"" ,1 , false );

it's work
how do i fix this
thanks[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
myakove
Newbie


Joined: 06 Mar 2008
Posts: 12

PostPosted: Tue Jun 16, 2009 8:41 am    Post subject: Reply with quote

Thanks for your help
now it's work perfect.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group