Showing tag results for scripting techniques

May 4, 2006
Post comments count0
Post likes count0

How Can I Query a Text File and Retrieve Records That Occurred on a Specific Date?

ScriptingGuy1

Hey, Scripting Guy! We have tons of text files in which each line in the file represents a record or an event of some kind. How can I use a script to retrieve records or events that occurred on a specified date?-- TW Hey, TW. You know, in your email you sort of apologized for using text files, noting that “I know, I know, we should probably use ...

Scripting Guy!scripting techniquesVBScript
May 3, 2006
Post comments count0
Post likes count0

How Can I Remove Blank Spaces Before and After a String Value?

ScriptingGuy1

Hey, Scripting Guy! We have a custom in-house application that writes data to a log file. The problem is that the data often has a bunch of blank spaces before and after it. How can I remove all the blank spaces that come before and after my data?-- KS Hey, KS. You might find this hard to believe, but the Scripting Guy who writes this column occ...

Scripting Guy!scripting techniquesVBScript
Apr 28, 2006
Post comments count0
Post likes count0

How Can I Use the RunAs Command to Run a Script Under Alternate User Credentials?

ScriptingGuy1

Hey, Scripting Guy! How can I use the RunAs command to run a script under alternate user credentials?-- BE Hey, BE. You know, in the business world one of the hot topics these days is synergy. For example, after The Mighty Ducks became a hit movie the Disney Company went out and bought themselves an NHL hockey team, renaming it the Anaheim Might...

Scripting Guy!scripting techniquesVBScript
Apr 27, 2006
Post comments count0
Post likes count0

How Can I Print Just the Text Area of an HTA?

ScriptingGuy1

Hey, Scripting Guy! I have an HTA where information gets written to a text area. How can I print just the information found in that text area?-- DS Hey, DS. We want you to level with us here: are the Scripting Guys dead? We ask that because we saw the movie The Sixth Sense a few years ago and we understand how this life/death thing works. If you...

Scripting Guy!scripting techniquesVBScript
Apr 25, 2006
Post comments count0
Post likes count0

How Can I Determine the Name of the Local Computer Using WMI?

ScriptingGuy1

Hey, Scripting Guy! How can I determine the name of the local computer using WMI?-- BM Hey, BM. As you noted in your email we Scripting Guys always tell people that, in WMI, you can simply use a dot (.) to refer to the local computer. For example, the following mini-script connects you to the WMI service on the local computer:strComputer = "." ...

Scripting Guy!scripting techniquesVBScript