DaLiMan 0 Posted July 9, 2004 I can't open my file, I tried the HELP file and some code like this but nothing opens my .txt file Run("C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt", "", @SW_MAXIMIZE) Run("Notepad.exe", "C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt", @SW_MAXIMIZE) RunWait(@ComSpec & " /c " & 'C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt', "", @SW_HIDE) Can anyone help me with this one? Share this post Link to post Share on other sites
ezzetabi 3 Posted July 9, 2004 (edited) Run("C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt", "", @SW_MAXIMIZE) The .txt files are not executables. So this cant work. Run("Notepad.exe", "C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt", @SW_MAXIMIZE) In this case you are trying to open Notepad from the C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt FOLDER! Of course it cant work... RunWait(@ComSpec & " /c " & 'C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt', "", @SW_HIDE) See, first one. Correct: Run('notepad "C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt"', "", @SW_MAXIMIZE) ;The same of other. RunWait(@ComSpec & ' /c start "" ' & '"C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt"', "", @SW_HIDE) If you are using a Win9x kernel system remove the two "s near "start" Edited July 9, 2004 by ezzetabi Share this post Link to post Share on other sites
DaLiMan 0 Posted July 9, 2004 Thanx for your help and explanation. Works like a charm! Greetings, DaLiMan Share this post Link to post Share on other sites
ezzetabi 3 Posted July 9, 2004 You are welcome, but RTFM! Share this post Link to post Share on other sites