savj14 Posted October 16, 2007 Share Posted October 16, 2007 I am trying to create a simple text file that contains the IP Config /all information on a machine. I then want to open the text file for the user automatically. I can write the file it just won't open.........I'd like it to open in notepad if possible, What am I doing wrong?? I don't think FileOpen is making much sense to me. #include <GUIConstants.au3> #include <File.au3> #NoTrayIcon Run(@ComSpec & " /c " & 'cmd.exe', "", @SW_SHOW) WinWaitActive("C:\WINDOWS\system32\cmd.exe") Send("ipconfig /all >c:\ipconfig.txt") Send("{ENTER}") Sleep(1000) Send("exit") Send("{ENTER}") FileOpen("c:\ipconfig.txt",2) Link to comment Share on other sites More sharing options...
DW1 Posted October 16, 2007 Share Posted October 16, 2007 you are looking for ShellExecute(), instead of FileOpen() AutoIt3 Online Help Link to comment Share on other sites More sharing options...
herewasplato Posted October 16, 2007 Share Posted October 16, 2007 ... I am trying to create a simple text file that contains the IP Config /all information on a machine. I then want to open the text file for the user automatically...RunWait(@ComSpec & ' /c ipconfig /all > ipconfig.txt', "", @SW_HIDE) ShellExecute("ipconfig.txt")Adjust the path to ipconfig.txt as desired. [size="1"][font="Arial"].[u].[/u][/font][/size] 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