Jump to content
Sign in to follow this  
the_lord_mephy

Run()

Recommended Posts

I bet it won't work as expected and only sets the title of the CMD window to the path.

If that doesn't work, try this

$Filename="C:\Program Files\Smartpss\SS34532k.mde"
Run(@comSpec & ' /c start "" "' & Filename & '"')

<{POST_SNAPBACK}>

Yeap for Winnt/2k/xp thats true...

Win98 doesn't have the "Title" option.... so much for compatibility....

I just tried that, well i put the $ before the filename.  but it did not work.  I have the filename coming in frmo a iniread,  is that a problem?

<{POST_SNAPBACK}>

Yeap you are right about the $ , typo...........

INI file should work.... what does it do ?

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Nice, Where should I post my code if i want it to be optimized and looked at to make sure I am coding effieciently?

yes it did work. well i am in winxp sp2.

Thanks, you are the man. :0

Yeap for Winnt/2k/xp thats true...

Win98 doesn't have the "Title" option....  so much for compatibility....

Yeap you are right about the $ ,  typo...........

INI file should work....  what does it do ?

<{POST_SNAPBACK}>

Edited by fraudh8er

Share this post


Link to post
Share on other sites

I have the perfect solution that'll work on all Windows versions: FileGetShortname.

I'll post some examples.

;Example 1
$Filename = FileGetShortname("C:\Program Files\Smartpss\SS34532k.mde")
Run(@ComSpec & ' /c Start ' & $Filename)

;Example 2
Run(@ComSpec & ' /c Start ' & FileGetShortname("C:\Program Files\Smartpss\SS34532k.mde"))

;The following examples are the same as above but they hide the CMD window

;Example 3
$Filename = FileGetShortname("C:\Program Files\Smartpss\SS34532k.mde")
Run(@ComSpec & ' /c Start ' & $Filename, @ScriptDir, @SW_HIDE)

;Example 4
Run(@ComSpec & ' /c Start ' & FileGetShortname("C:\Program Files\Smartpss\SS34532k.mde"), @ScriptDir, @SW_HIDE)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...