How Can I Access a Type Library From Within a Script?

Hey, Scripting Guy! How can I access a type library from within a script?– XA Hey, XA. For those of you unfamiliar with the term, a type library is a file or a component that contains type information for a COM object; type information describes the object and the things you can do with it….


How Can I Put the User Name into the Footer of a Microsoft Word Document?

Hey, Scripting Guy! How can I put the user name into the footer of a Microsoft Word document?– RR Hey, RR. That’s an interesting question, and probably the first how-do-I-put-the-user-name-in-the-footer-of-a-Word-document question we’ve ever received. (No, really!) But what the heck; let’s see if we can find an answer for you. Besides, this gives us a…

4

How Can I Determine Which Version of Word is Installed on a Computer?

Hey, Scripting Guy! How can I determine which version of Word is installed on a computer?– RR Hey, RR. Turns out that this is a trickier question than you might expect. That’s because WMI does only a so-so job of retrieving information about the software installed on a computer. In theory, you can use a…

3

How Can I Share a Folder on a Remote Computer?

Hey, Scripting Guy! How can I share a folder on a remote computer?– RS Hey, RS. One of the great things about WMI is the fact that – with one or two fairly obscure exceptions – anything you can do on the local computer you can also do on a remote computer. This is the…

4

How Can I Tell On What Date an Active Directory User Account Was Created?

Hey, Scripting Guy! Is there any way to tell the date that an Active Directory user account was created?– DD Hey, DD. And thanks: between the work that piled up over the holidays, the upcoming Scripting Week 2, and a nasty flu bug that’s going around, it’s nice to have a question that can be…

12

How Can I Prompt a User to Delete (or Not Delete) a Computer Account?

Hey, Scripting Guy! How can I delete a computer account from Active Directory, but provide a Yes/No prompt to the user before the account is actually deleted?– NM Hey, NM. Let’s start by showing you how to delete a computer account from Active Directory. But don’t worry; that won’t take long. In fact, it only…

1

How Can I Return Only the Last Record Written to an Event Log?

Hey, Scripting Guy! How can I read only the last record written to an event log? In other words, what is the WMI equivalent to the SQL statement Select Top 1?– KM Hey, KM. Well, as it turns out WMI doesn’t have an equivalent to the Select Top command; for better or worse, the WMI…

2

How Can I Determine the Account a Process is Running Under?

Hey, Scripting Guy! I’ve got a script that returns information about all the processes running on a computer, except I can’t seem to figure out how to get the name of the user account that these processes are running under. Can you help?– DL Hey, DL. Yes, we can help. It’s actually fairly easy to…