Showing results for VBScript - Scripting Blog [archived]

Nov 16, 2004
Post comments count0
Post likes count0

Can I Read an Entire Text File Rather Than Reading It Line-by-Line?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Right now I use a script to open a text file containing computer names. The script reads the first line of the file and connects to that computer, then reads the second line of the file and connects to that computer. Is there a way to store those names in a variable or something, so that I don’t have to keep reading the text f...

Scripting Guy!scripting techniquesVBScript
Nov 15, 2004
Post comments count0
Post likes count0

Can I Lock a Workstation Using a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I know how I can shut down a computer using a script, and I even know how I can log a user off using a script. But is there any way I can lock a workstation using a script?-- TO-R Hey, TO-R. Most likely you’re familiar with the Win32Shutdown method found in the WMI class Win32_OperatingSystem; that method allows you to shutdo...

Scripting Guy!VBScriptdesktop management
Nov 12, 2004
Post comments count0
Post likes count0

How Can I Tell If an OU Has Any User Accounts In It?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I tell if an OU has any user accounts in it?-- RL Hey, RL. As a matter of fact, there is a way to determine whether or not an OU contains any user accounts: all you have to do is search just that OU for nothing but user accounts. When you perform a search, any “hits” (in this case, any user accounts that are found) co...

Scripting Guy!VBScriptActive Directory
Nov 11, 2004
Post comments count0
Post likes count0

Can I Pin a File to the Start Menu by Using a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Can I pin a file to the Start Menu by using a script?-- ZD Hey, ZD. For those of you who haven’t bought Windows XP yet (hey, what’s the matter with you; we Scripting Guys have families to feed!), by default XP’s Start Menu changes over time: the more you use an application, the more likely it is to appear on the Start Menu. T...

Scripting Guy!VBScriptdesktop management
Nov 10, 2004
Post comments count0
Post likes count0

Can I Create and Delete a DSN Using a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Is it possible to create an ODBC Data Sources Name (DSN) on the fly and then remove it when done?-- KC Hey, KC. Is it possible to create and then delete an ODBC DSN? To tell you the truth, we weren’t entirely sure. As it turns out, however the answer is this: as long as you’re willing to write a script that modifies the regis...

Scripting Guy!VBScriptoperating system