Make my vbscript look more professional

MyScript.vbsHi All,

New here and new to scripting. I have made myself a script to send me an email with user and computer details of whoever runs it.

The script works but I would like to make it look a bit more professional (maybe in a table) I tried looking into HTML but couldn't get my head around doing that (or if its possible)

Anyways here is my script. If you see anything wrong please let me know as I am new to this.

Many Thanks

Lance DavidsonAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:

Do you mean make the body email sent by the script look more professional?
Lance DavidsonAuthor Commented:
Yes, sorry I was in a rush writing this post.

Even if I could get it to look like
User: lance
Computer: pc9999
IP Address:
Would help but if we could make it even more fancy I’d be happy to take suggestions.
NorieAnalyst Assistant Commented:

How about something like this?
objMessage.HTMLBody = "<table border=1>" & _
                      "<tr><th colspan=2>Logged on user is " & UserName & " using Computer " & ComputerName & "</th></tr>" & _
                      "<tr><td>Serial Number </td><td>" & strSerialNumber & "</td></tr>" & _
                      "<tr><td>Current </td><td>" & strIP & "</td></tr>" & _
                      "<tr><td>Disk Info </td><td>" & sDisk & "</td></tr>" & _
                      "<tr><td>Manufacturer </td><td>" & strManufacturer & "</td></tr>" & _
                      "<tr><td>Model </td><td>" & strModel & "</td></tr>" & _
                      "<tr><td>OS </td><td>" & strOsversion & strSp & "</td></tr>" & _

Open in new window

That would replace this in your posted code.
objMessage.TextBody = "Logged on user is " & userName & " using Computer " & ComputerName & " | Serial Number " & strSerialNumber & " | Current " & strIP & " | Disk Info " & sDisk & " | Manufacturer = " & strManufacturer & " | Model = " & strModel & " | OS = " & strOsversion & strSp

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lance DavidsonAuthor Commented:
You my friend are a legend. That's what I was after.

Thank you

Also would you say this is that best script to use for this sort of thing or would you use something different?  Would like to know how other people would script something like this.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.