string filePath = "C:\\IPconfigInfoDump.txt" if ( DoesFileExist( filePath ) ) { If ( !OKCancelDialog( "Found file at provided path:\n\n" + filePath +"\n\n Delete it?" ) ) exit(0) DeleteFile( filePath ) } string msg = "cmd.exe /c " // calling the windows command prompt, /c prevents the console from being shown msg += "ipconfig " // a command-prompt command msg += ">> " + filePath // piping output to the text file number exitCode = LaunchExternalProcess( msg, 60 ) if ( 0 != exitCode ) Throw( "Command did time out after 60 sec." ) if ( DoesFileExist( filePath ) ) { NewScriptWindowFromFile( filePath ) // Open Text file }