Showing archive results for 2005

May 26, 2005
Post comments count0
Post likes count0

How Can I Get Just the User Name When Using the Win32_ComputerSystem Class?

ScriptingGuy1

  Hey, Scripting Guy! I’m using the Win32_ComputerSystem class to get the name of the logged-on user. The name comes back formatted like this: Domain\Name. How can I extract just the user name?-- KW Hey, KW. As our much-beloved and highly-respected editor reminded us the other day, instead of spending all our time telling people how to extra...

Scripting Guy!VBScriptoperating system
May 25, 2005
Post comments count0
Post likes count0

How Can I Extract Word Paragraphs That Use a Specific Style?

ScriptingGuy1

Hey, Scripting Guy! How can I save (to a separate file) all the paragraphs in a Word document that are formatted using a particular style, like Heading 1?-- RN Hey, RN. You know, when we first read this question we thought, “Interesting. But why would you ever want to do something like that?” And then one of the Scripting Guys remembered the man...

Scripting Guy!VBScriptOffice
May 24, 2005
Post comments count0
Post likes count0

How Can I Use ADO to Open a Text File That has Spaces in the File Name?

ScriptingGuy1

Hey, Scripting Guy! How can I use ADO to open a text file that has spaces in the file name?-- TL Hey, TL. You might not even remember sending us this question; to say it’s been awhile would be an understatement. (You should have seen all the dust and cobwebs we had to brush off this question before we could post it in the Script Center.) A long ...

Scripting Guy!VBScriptdatabases
May 23, 2005
Post comments count0
Post likes count1

How Can I Correlate Logical Drives and Physical Disks?

ScriptingGuy1

Hey, Scripting Guy! How can I correlate logical drives and physical disks?-- LB Hey, LB. We’ll make a deal with you: we’ll show you a script that can tell you which logical drives are found on which physical disks, and you promise not to say, “Wait, I don’t understand how this script works.” To tell you the truth, we’re not so sure that we under...

Scripting Guy!VBScriptstorage
May 20, 2005
Post comments count0
Post likes count0

How Can I Remove the Last Carriage Return-Linefeed in a Text File?

ScriptingGuy1

Hey, Scripting Guy! How can I remove the last carriage return-linefeed in a text file?-- LEK Hey, LEK. From the rest of your email you note that you’re using the FileSystemObject to read a text file, then using the contents of that text file as a query in another application. Unfortunately, though, the text file invariably has a carriage return-...

Scripting Guy!scripting techniquesVBScript