Jump to content

Openeing a Text File


savj14
 Share

Recommended Posts

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

...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...