Jos 2,209 Posted November 9, 2004 (edited) 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 November 9, 2004 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
fraudh8er 0 Posted November 9, 2004 (edited) 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. :0Yeap 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 November 9, 2004 by fraudh8er Share this post Link to post Share on other sites
SlimShady 1 Posted November 10, 2004 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