I would like to be able to pass two or three values from the body of an email into a batch file. Is it possible to pass variables through to a batch file?
I can control the email text so that it creates a clickable hyperlink that can be run by the user but ideally I would like the hyperlink to pass values through to the batch file.
i.e. in the email there's an entry which says StudentID=4444 how do I declare the 4444 as a variable that can then be used by the batch file?
I work in a large school and whilst the registration process is pretty good in our MIS system I need to be able to quickly discover whether a child is actually at school, who hasn't registered. We have a process that checks against the SQL Registration table and emails all teachers of that student to ask if they have turned up to their lesson. It's a lot of manual work to then collate that information and manually enter it into the MIS system,
What I was hoping was to include in the email body a clickable link that will pass the students ID out to a batch file that will then run a new SQL update and directly update the table for that record. I have no problem calling the SQL cmdlet and updating the table but I don't know how to pass variables out to a batch file that can then be used. I've read its possible but can't find any good examples.