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.
KlainnAsked:
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([EditGotoField];"Subject");
@Command( [EditInsertText] ; "IP Information for this user" );
@Command([EditGotoField] ; "Body" );
0
 
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
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...

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