Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Determine the Drive Letter for the Drive My Script is Currently Running On?

(image) Hey, Scripting Guy! I have a script that runs off a CD and copies a bunch of files to a computer. However, in order to copy the files I need to know the complete file path, including the drive letter. How can I determine the drive letter for the drive my script is currently running on?-- RKG(image) (image) (image) Hey, RKG. You ...

How Can I Assign a New Home Drive to a User Who Doesn’t Have One?

 (image) Hey, Scripting Guy! How can I check to see if a user has a home drive and home directory set and, if they don’t, assign them a new one?-- AM(image) (image) (image) Hey, AM. No, no excuses: the Seahawks had plenty of opportunities to win the Super Bowl yesterday, but they failed to take advantage of it. At times it seemed ...

How Can I Search for Multiple File Extensions in a Single WQL Query?

(image) Hey, Scripting Guy! How can I search for multiple file extensions in a single WQL query?-- AH(image) (image) (image) Hey, AH. If we understand your question correctly, you want to know if it’s true that the Seattle Seahawks are playing in the Super Bowl this Sunday. Yes, it is true: our very own Seahawks will be taking on … ...

How Can I Boldface a Specific Word Throughout a Microsoft Word Document?

(image) Hey, Scripting Guy! How can I boldface a specific word throughout a Microsoft Word document?-- SB(image) (image) (image) Hey, SB. You’ll probably find this hard to believe, but when you work with scripts and scripting all day you tend to get a little jaded. You say you have a script that automatically backs up and clears all the ...