• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1412
  • Last Modified:

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.
1 Solution
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

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...

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Steve KnightIT 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" );
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?


Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now