Sign In
TechNet Blogs
Technet Blog Images
More ...
Tweet tweet!
Translate this page
Powered by
Microsoft® Translator
Related Links
Blog Home
Script Center Home
Scripting Library
Learn to Script
Script Repository
Scripting Forum
2012 Scripting Games
Common Tasks
Blog Home
RSS for comments
RSS for posts
Atom
OK
Email Blog Author
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
2009 Summer Scripting Games (42)
2010 Scripting Games (115)
2011 Scripting Games (132)
2012 Scripting Games (125)
Active Directory (216)
ActiveX Data Objects (ADO) (30)
Advanced (70)
arrays hash tables and dictionary objects (29)
Beginner (96)
CSV and other delimited files (35)
databases (57)
dates and times (56)
desktop management (111)
displaying output (32)
event logs (45)
events and monitoring (37)
Excel spreadsheet (52)
Excel.Application (31)
files (140)
folders (74)
general management tasks (55)
getting started (299)
groups (39)
guest blogger (264)
Internet Explorer (31)
leaderboard (57)
local accounts and Windows NT 4.0 accounts (33)
Logs and monitoring (48)
Microsoft Excel (114)
Microsoft Outlook (49)
Microsoft Word (95)
multimedia (30)
Office (286)
operating system (229)
other Directory Services (34)
performance (32)
printing (31)
prize winners (32)
processes (48)
Quick-Hits Friday (88)
registry (82)
regular expressions (39)
running (86)
Scripting Guy! (2162)
scripting techniques (990)
Scripting Wife (85)
Sean Kearney (50)
searching Active Directory (63)
security (44)
servers (31)
services (31)
sponsors (38)
storage (211)
string manipulation (48)
text files (147)
troubleshooting (39)
user accounts (89)
using the Internet (38)
VBScript (1049)
Web pages and HTAs (71)
Weekend Scripter (186)
Windows PowerShell (1300)
Windows PowerShell ISE (33)
WMI (159)
writing (45)
Archives
Archives
May 2012
(29)
April 2012
(97)
March 2012
(44)
February 2012
(31)
January 2012
(31)
December 2011
(31)
November 2011
(30)
October 2011
(31)
September 2011
(30)
August 2011
(31)
July 2011
(31)
June 2011
(30)
May 2011
(31)
April 2011
(97)
March 2011
(41)
February 2011
(28)
January 2011
(31)
December 2010
(31)
November 2010
(30)
October 2010
(31)
September 2010
(30)
August 2010
(33)
July 2010
(31)
June 2010
(30)
May 2010
(67)
April 2010
(65)
March 2010
(34)
February 2010
(29)
January 2010
(23)
December 2009
(23)
November 2009
(22)
October 2009
(23)
September 2009
(22)
August 2009
(25)
July 2009
(24)
June 2009
(38)
May 2009
(22)
April 2009
(22)
March 2009
(22)
February 2009
(20)
January 2009
(22)
December 2008
(8)
November 2008
(17)
October 2008
(9)
September 2008
(8)
August 2008
(6)
July 2008
(5)
June 2008
(21)
May 2008
(21)
April 2008
(22)
March 2008
(21)
February 2008
(21)
January 2008
(22)
December 2007
(10)
November 2007
(20)
October 2007
(23)
September 2007
(19)
August 2007
(23)
July 2007
(21)
June 2007
(21)
May 2007
(22)
April 2007
(21)
March 2007
(22)
February 2007
(21)
January 2007
(21)
December 2006
(11)
November 2006
(20)
October 2006
(22)
September 2006
(20)
August 2006
(23)
July 2006
(20)
June 2006
(22)
May 2006
(22)
April 2006
(20)
March 2006
(23)
February 2006
(20)
January 2006
(21)
December 2005
(16)
November 2005
(20)
October 2005
(21)
September 2005
(21)
August 2005
(23)
July 2005
(20)
June 2005
(22)
May 2005
(21)
April 2005
(21)
March 2005
(22)
February 2005
(20)
January 2005
(21)
December 2004
(16)
November 2004
(20)
October 2004
(21)
September 2004
(21)
August 2004
(22)
August, 2004
TechNet Blogs
>
Hey, Scripting Guy! Blog
>
August, 2004
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Hey, Scripting Guy! Blog
How Can I Prompt a User for Input?
Posted
over 8 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! I need my script to prompt users to enter some information, like the name of the file they want to create. How do I do that? -- RW, Williamsport, PA Hey, BN. The simplest - and most foolproof - way to do this is to use an InputBox;...
Hey, Scripting Guy! Blog
How Can I Stop a Script Partway Through?
Posted
over 8 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! Is there a way to make a script stop itself if certain conditions aren’t met? Like say I’m going to copy files to a remote computer, but then the remote computer isn’t available. Can I write code that tells the script to just go ahead...
Hey, Scripting Guy! Blog
How Can I Determine the Day of the Week?
Posted
over 8 years ago
by
ScriptingGuy1
2
Comments
Hey, Scripting Guy! I have a script that does certain management tasks based on the day of the week. I know how get the date in a script, but how can I tell whether it’s a Monday or a Tuesday or whatever? -- CT, Tallahassee, FL Hey, CT. This...
Hey, Scripting Guy! Blog
Can I Change the Command Window Title When Running a Script?
Posted
over 8 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! When I run a batch file, I can use the Title command to change the caption of the command window. Can I change the caption of the command window from within a script? -- AA, Yokohama, Japan Hey, AA. Well, yes, as long as you’re...
Hey, Scripting Guy! Blog
Why am I Getting an Error when Trying to Determine an IP Address?
Posted
over 8 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! I’m trying to determine the IP address on a computer, but I keep getting a Type Mismatch error. Do you know why? -- AQ, Jacksonville, FL Hey, AQ. As a matter of fact, we do know why you’re getting a Type Mismatch error, and it’s...
Hey, Scripting Guy! Blog
Why Doesn't My Search Return All My User Accounts?
Posted
over 8 years ago
by
ScriptingGuy1
3
Comments
Hey, Scripting Guy! I’m trying to pull a list of all my users out of Active Directory. I’m using ADO to search for these users, but no matter what I do I can only get 1,000 user names, even though we probably have 10 times that many user accounts. What...
Hey, Scripting Guy! Blog
Can I Change the Current Directory When Running a Script?
Posted
over 8 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! Can I change the current directory while my script is running? -- KO, Kalispell, MT Hey, KO. Yes, you can change the current directory while a script is running, provided you are running Windows Script Host 5.6, that is. To change...
Hey, Scripting Guy! Blog
How Can I Determine Which Groups a User Belongs To?
Posted
over 8 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! In my logon script, how can I find out which Active Directory groups a user belongs to? -- JB, Montpelier, VT Hey, JB. This is pretty easy to do in a logon script: On Error Resume Next Set objADSysInfo = CreateObject("ADSystemInfo...
Hey, Scripting Guy! Blog
How Can I Determine if a Folder Exists on a Computer?
Posted
over 8 years ago
by
ScriptingGuy1
2
Comments
Hey, Scripting Guy! Is there any way to determine whether or not a specific folder exists on a computer? -- RP, Umatilla, OR Hey, RP. There are a couple ways of doing this, depending on whether you are looking for the folder on the local computer or...
Hey, Scripting Guy! Blog
How Can I Determine How Long It Takes a Script to Run?
Posted
over 8 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! Is there a good way to time how long it takes for a script to run? -- BN, Montreal, Canada Hey, BN. Probably the easiest way to do this is to let the script time itself. To accomplish that feat, set the first line of the script...
Hey, Scripting Guy! Blog
How Can I Save Output to a Text File?
Posted
over 8 years ago
by
ScriptingGuy1
3
Comments
Hey, Scripting Guy! Is there an easy way to save my script output to a text file rather than displaying it on screen? -- KP, Ogden, UT Hey, KP. If you always want your script to save data to a text file rather than display it on screen, then you’re...
Hey, Scripting Guy! Blog
How Can I Give a User a Yes/No Prompt?
Posted
over 8 years ago
by
ScriptingGuy1
5
Comments
Hey, Scripting Guy! I have a script which performs some file management tasks, and then should ask the user whether or not they want to delete a set of files. How do I ask a user a Yes or No question like this? -- SE, Casper, WY Hey, SE. There are...
Hey, Scripting Guy! Blog
Can I Copy Script Output to the Clipboard?
Posted
over 8 years ago
by
ScriptingGuy1
6
Comments
Hey, Scripting Guy! Is there any way to have my script output copied to the Clipboard? -- ZW, Marseilles, France Hey, ZW. Well, as long as you don’t mind crazy work-arounds then, yes, it’s actually pretty easy to copy script output to...
Hey, Scripting Guy! Blog
Can I Read a Text File From the Bottom Up?
Posted
over 8 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! I have a log file in which new data is appended to the bottom of the file; that means the most recent entries are at the end of the file. I’d like to be able to read the file starting with the last line and then ending with the...
Hey, Scripting Guy! Blog
Can I Get a List of All My User Accounts?
Posted
over 8 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! Is there any way to get a list of all the user accounts in Active Directory? -- CB, Fremont, CA Hey, CB. By far the quickest and easiest way to do this is to search Active Directory for all your user accounts. Here’s a sample script...
Hey, Scripting Guy! Blog
How Can I Call the Dir Command?
Posted
over 8 years ago
by
ScriptingGuy1
3
Comments
Hey, Scripting Guy! I’m trying to do something that seems pretty simple: call the dir command from a script. It doesn’t seem to work, though. How come? -- CR, Mexico City, Mexico Hey, CR. It appears from your mail that you’re trying to do a simple...
Hey, Scripting Guy! Blog
Can I Enable the Caps Lock Key?
Posted
over 8 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! I have a script where users enter some information in an Input box. The information needs to be entered in all-capital letters, so my instructions say, “Please make sure the Caps Lock key is on before entering the information.” They...
Hey, Scripting Guy! Blog
How Can I Use Long File Names as Parameters?
Posted
over 8 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! I’m trying to run a command-line tool from a script, but I need to pass it a long file name like C:\Documents and Settings\All Users\Desktop\logfile.txt . No matter how I try to pass that file name, however, my script blows up on me...
Hey, Scripting Guy! Blog
How Can I Determine if a User is a Local Administrator?
Posted
over 8 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! Some of the things we do in our logon scripts require the user to be a local administrator. How can the script tell if the user is a local admin or not? -- GM, Denver, CO Hey, GM. The best way to do that is to check the membership...
Hey, Scripting Guy! Blog
How Do I Change the Title of a Message Box?
Posted
over 8 years ago
by
ScriptingGuy1
1
Comments
Hey, Scripting Guy! Whenever I use a message box, the caption reads Windows Script Host . Is there any way to change that caption? -- TT, Reno, NV Hey, TT. To answer your question, no, not if you’re using Wscript.Echo; in that case, you’re stuck with...
Hey, Scripting Guy! Blog
How Can I Get Yesterday’s Date?
Posted
over 8 years ago
by
ScriptingGuy1
3
Comments
Hey, Scripting Guy! I’m writing a script, and I need to know yesterday’s date. I can use Date() to figure out today’s date, but how do I figure out yesterday’s date? -- SS Hey, SS. You’re right; it’s easy to determine today’s date using a script: dtmToday...
Hey, Scripting Guy! Blog
Registry Script Doesn't Work
Posted
over 8 years ago
by
ScriptingGuy1
0
Comments
Hey, Scripting Guy! I tried writing a script to read data from the registry, but I keep getting this error: Do you have any idea what's wrong? I'm running Windows XP Professional, Service Pack 1, and this is the code I'm using: Const HKEY_LOCAL_MACHINE...
Page 1 of 1 (22 items)