Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 04-09-2009, 09:15 AM   #1 (permalink)
 
Newb Techie

Join Date: Feb 2009

Posts: 20

benny237 is on a distinguished road

Default help with .bat command

OK, so I am one step away from completing a .bat file. . .

when a user clicks on a link, a .bat file is ran . . . this file extrapolates the name of the user's computer and creates an email message automatically addressed to our company's IT department along with the name of the computer. . .

does anyone know the command to automatically send the message? as it is now, everything is populated correctly, however the user still has to click "send". . .

PLEASE help me out, I have been searching the net for days now with now luck . . .

again in summation, what is the command prompt command to send the email?

- code of script -

@ECHO OFF
START mailto:helpdesk1@oncologyallies.com?subject=%compu tername%^&body=%computername%



also, does anyone know a way I could include the ip address in the body of the email? right now our techs can see the computer name in the subject. . . but it would be nice if the ip was included in case the DNS is messed up. . . something like %ip% ???

this is for windows xp btw. . .

thanks everyone for your help!! this has been realllllllllllly tough . . .

Last edited by benny237; 04-09-2009 at 09:39 AM.
benny237 is offline  
Old 04-09-2009, 09:52 AM   #2 (permalink)
 
Newb Techie

Join Date: Mar 2009

Location: Michigan

Posts: 21

EDE Tech is on a distinguished road

Default Re: help with .bat command

I am afraid that is as far as you can get with a batch file. You are sending a command line parameter to their default mail program. Outlook, Thunderbird, etc.. all operate differently there is no way a batch file can tell all those programs to push the send button. You can however use a batch command to create the isp information into a text file but again the user would have to attach it themselves.

ipconfig /all > fileatt.txt
EDE Tech is offline  
Old 04-09-2009, 10:01 AM   #3 (permalink)
 
Newb Techie

Join Date: Feb 2009

Posts: 20

benny237 is on a distinguished road

Default Re: help with .bat command

hmmm . . .thanks for your response. . .

so perhaps I should use a different way to extrapolate the info and then automatically send?

any suggestions as to how I would do this. . .

this is for our company's intranet site, when user's call in the first question is always "what is the name of your system?" - usually the computer is labeled incorrectly and therefore our techs have to step them through how to find the name, by right clicking on my computer, going to properties, etc . . .

so ideally there would be a button on the front page of the intranet that a tech can tell the user to press and then a program executes sending the name of the computer, who's logged on, and ip address to the helpdesk email inbox. . .

this is just a simple html site, with numerous pages connecting together . . . again if anyone has any suggestions as to how this would be accomplished I would be very appreciative and rep you up huge !!

thanks all!
benny237 is offline  
Old 04-09-2009, 10:09 AM   #4 (permalink)
 
Banned

Join Date: Feb 2009

Location: Guantanomo Bay, Cuba

Posts: 546

SparkMonkeyHellion is on a distinguished road

Default Re: help with .bat command

You might have to do that with PHP - but still I think there will have to be some user input. Also, you could try doing it with an ActiveX script.

At our company, we automate those kinds of things with VBS scripts.
SparkMonkeyHellion is offline  
Old 04-09-2009, 10:19 AM   #5 (permalink)
 
Newb Techie

Join Date: Feb 2009

Posts: 20

benny237 is on a distinguished road

Default Re: help with .bat command

man . . . I didn't think it would be too complicated . . .
benny237 is offline  
Old 04-09-2009, 12:43 PM   #6 (permalink)
 
Newb Techie

Join Date: Feb 2009

Posts: 20

benny237 is on a distinguished road

Default Re: help with .bat command

moderators please delete thread . . . I am going to open another one. . .
benny237 is offline  
Old 04-10-2009, 01:35 PM   #7 (permalink)
 
Newb Techie

Join Date: Mar 2009

Location: Michigan

Posts: 21

EDE Tech is on a distinguished road

Default Re: help with .bat command

Not that all complicated just not possible with a batch command file. Batch files are limited. The reason you can't just spontaneously send e-mail should be obvious, it would be far too easy to spread spam and viruses that way.

In addition to what SparkMonkeyHellion suggested I would give AutoIT a try you can google the download. AutoIT is a automated script that will send keystrokes and anything you need applications. It is even freeware with BASIC-like scripting language designed for automating the Windows GUI and general scripting. If you can make a batch file you can use AutoIT.
EDE Tech is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for Files in Linux via Command Line Osiris Linux Tips and Tricks 0 02-13-2009 12:51 PM
Getting to Know Linux: Installing From Command Line Osiris Linux Tips and Tricks 0 01-16-2009 01:24 PM
batch to copy file help under_score Programming Discussions 6 11-14-2008 08:38 AM
BSOD problems yet again. IBM/PS1 Windows Operating Systems and Software 36 08-25-2008 07:54 PM