Script to run c:\windows\system32\ipconfig.exe and either save it to a txt file or paste it into a memo and reply to sender.

I have a Lotus Notes @formula that I believe needs to contain 3 parts, but possibly two. Here is what I have...

Step 1: Gather Information: @Command([Execute]; "C:\\WINDOWS\\SYSTEM32\\IPCONFIG.EXE"; "/ALL > C:\\IPINFORMATION.TXT")
Step 2: Place Information either into a memo as text or attach INFORMATION.TXT to memo
Step 3: Reply to sender.

I can get step 3, no problem. I can not get 1 to create the IPINFORMATION.TXT file with any combo of the commands, and needless to say I can not get anything to attach or input into a notes memo.

Anyone have any experience with this? It's for a helpdesk to send out as a stationery to people to gain required information and send back to the agent for noting reasons.

Thanks in advance.
Who is Participating?
Steve KnightConnect With a Mentor IT ConsultancyCommented:
And a really crude, nasty way of attaching to a new memo:

@Command([Execute]; "cmd"; "/C IPCONFIG.EXE /ALL > C:\\IPINFORMATION.TXT");
@Command([Compose]; @MailDbName; "Memo");

@PostedCommand( [EditInsertFileAttachment] ; "C:\\IPINFORMATION.TXT" );
@Command( [EditInsertText] ; "Steve Knight/RPL" );
@Command( [EditInsertText] ; "IP Information for this user" );
@Command([EditGotoField] ; "Body" );
Sjef BosmanGroupware ConsultantCommented:
Three suggestions:
    Step 1: @Command([Execute]; "C:\\WINDOWS\\SYSTEM32\\IPCONFIG.EXE /ALL > C:\\IPINFORMATION.TXT")
    Step 0: Create a batch-file using script, that contains the command in step 1
    Step 1: execute the batch file
It can be easily done with java code...

There will be no messy command popups too

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Steve KnightIT ConsultancyCommented:
@Command([Execute]; "cmd"; "/C IPCONFIG.EXE /ALL > C:\\IPINFORMATION.TXT")  works for me as the first paramater is the command (cmd.exe) and the second is it's paramaters including the redirection to a text file

Not very 'nice' way of doing it though really but if it does what is required...

KlainnAuthor Commented:
I am going to accept the answer from dragon-it, though I am not going to be able to use it due to limitations placed on our edition of lotus notes (custom config). Thank you all for your answers.
Steve KnightIT ConsultancyCommented:
Thanks.... a whole 50 points :-)
Sjef BosmanGroupware ConsultantCommented:
Would you have preferred a split then?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.