randeep Posted June 18, 2009 Share Posted June 18, 2009 hello all i have written a program that uses the scripts written in .txt format from a particular location (C:\Scripts) and reads it by opening in wordpad. now the problem is that when i used this program in an another computer it opened it in 'notepad'. so the program was not able read the files opened with notepad and returned error. i just need that program should only open the scripts in wordpad. i know i can change from the properties of the scripts, but a new user that will use my program will not be aware of that and he will face 'errors'. pls help...... thanx [font="Palatino Linotype"]Randeep Singh[/font][sub][/sub] Link to comment Share on other sites More sharing options...
Inverted Posted June 18, 2009 Share Posted June 18, 2009 How do you open the scripts ? You can use the command : wordpad.exe *fullpathofthefile* (wordpad.exe is always in the path, so you don't need the full path to it) Link to comment Share on other sites More sharing options...
randeep Posted June 18, 2009 Author Share Posted June 18, 2009 (edited) @Inverted actually i am trying to use run('WordPad.exe "C:\T-MATRIX\Database\Scripts\Single_Site\Create_empty_database.sql"') then it works............ but i want to open it with wordpad. How do you open the scripts ? You can use the command : wordpad.exe *fullpathofthefile* (wordpad.exe is always in the path, so you don't need the full path to it) Edited June 18, 2009 by randeep [font="Palatino Linotype"]Randeep Singh[/font][sub][/sub] Link to comment Share on other sites More sharing options...
DjDeep00 Posted June 18, 2009 Share Posted June 18, 2009 @randeep... #include <Process.au3> $rc = _RunDos("Start Wordpad C:\T-MATRIX\Database\Scripts\Single_Site\Create_empty_database.sql") Link to comment Share on other sites More sharing options...
rajeshontheweb Posted June 18, 2009 Share Posted June 18, 2009 try write.exe Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
randeep Posted June 19, 2009 Author Share Posted June 19, 2009 @DjDeep00 very useful info. it really works. thanx for sharing @randeep... #include <Process.au3> $rc = _RunDos("Start Wordpad C:\T-MATRIX\Database\Scripts\Single_Site\Create_empty_database.sql") [font="Palatino Linotype"]Randeep Singh[/font][sub][/sub] 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