krasnoshtan Posted June 30, 2017 Share Posted June 30, 2017 Hi all! How to run this code. I want to start wmp, but i am need to run wmp in spite of that a system drive is not "C:" sorry if i write wrong, i am a new here here a code $all_wmp = @ProgramFilesDir & "\windows media player\wmlpayer.exe" MsgBox (0, 0, $all_wmp) Run ($all_wmp) Link to comment Share on other sites More sharing options...
Xandy Posted June 30, 2017 Share Posted June 30, 2017 I believe that the @ProgramFilesDir macro will return the Program Files directory of the host system. If installation is outside of the Program Files directory you can have the user browse for file path to location and save setting. Alternatively you maybe able to check the registry for the file path of Windows Media Player exe. I'll research the registry idea real quick. Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
Valuater Posted June 30, 2017 Share Posted June 30, 2017 $all_wmp = @ProgramFilesDir & "\windows media player\wmlpayer.exe" If FileExists( $all_wmp) Then Run ($all_wmp) Else MsgBox (0, "ERROR", "The File was not found " & @crlf & $all_wmp) ; do something else... find file etc... EndIf Maybe... 8) Xandy and krasnoshtan 2 Link to comment Share on other sites More sharing options...
Xandy Posted June 30, 2017 Share Posted June 30, 2017 (edited) @krasnoshtan Also note that "wmplayer.exe" is miss-spelled in your string as "wmlpayer.exe". Edited June 30, 2017 by Xandy krasnoshtan 1 Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
krasnoshtan Posted June 30, 2017 Author Share Posted June 30, 2017 17 minutes ago, Valuater said: $all_wmp = @ProgramFilesDir & "\windows media player\wmlpayer.exe" If FileExists( $all_wmp) Then Run ($all_wmp) Else MsgBox (0, "ERROR", "The File was not found " & @crlf & $all_wmp) ; do something else... find file etc... EndIf thanks you so much Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now