• 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.
0
Klainn
Asked:
Klainn
1 Solution
 
Sjef BosmanGroupware ConsultantCommented:
Three suggestions:
    Step 1: @Command([Execute]; "C:\\WINDOWS\\SYSTEM32\\IPCONFIG.EXE /ALL > C:\\IPINFORMATION.TXT")
or
    Step 0: Create a batch-file using script, that contains the command in step 1
    Step 1: execute the batch file
or
    Step 1: @Command([Execute]; "C:\\WINDOWS\CMD\CMD.EXE /C IPCONFIG.EXE /ALL > C:\\IPINFORMATION.TXT")
0
 
HemanthaKumarCommented:
It can be easily done with java code...

There will be no messy command popups too

~Hemanth
0
 
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...

Steve
0
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([EditGotoField];"Subject");
@Command( [EditInsertText] ; "IP Information for this user" );
@Command([EditGotoField] ; "Body" );
0
 
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.
0
 
Steve KnightIT ConsultancyCommented:
Thanks.... a whole 50 points :-)
0
 
Sjef BosmanGroupware ConsultantCommented:
Would you have preferred a split then?

:-D
0

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