Showing results for August 2004 - Scripting Blog [archived]

Aug 31, 2004
0
0

How Can I Prompt a User for Input?

Doctor Scripto
Doctor Scripto

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; when you do that users will be presented with a graphical dialog box similar to this: ...

Scripting Guy!Windows PowerShellguest blogger
Aug 30, 2004
0
0

How Can I Stop a Script Partway Through?

Doctor Scripto
Doctor Scripto

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 and quit at that point? -- WK, Palo Alto, CA Hey, WK. This is one of the ...

Aug 27, 2004
0
0

How Can I Determine the Day of the Week?

Doctor Scripto
Doctor Scripto

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 is actually much easier then it might sound; that’s because VBScript has a ...

Scripting Guy!Windows PowerShellguest blogger
Aug 26, 2004
0
0

Can I Change the Command Window Title When Running a Script?

ScriptingGuy1
ScriptingGuy1

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 willing to open up a new command window. If you are, then you can use code similar to this: Notice ...

Scripting Guy!scripting techniquesVBScript
Aug 25, 2004
0
0

Why am I Getting an Error when Trying to Determine an IP Address?

ScriptingGuy1
ScriptingGuy1

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 a common problem when working with the WMI class Win32_NetworkAdapterConfiguration. The line ...

Scripting Guy!scripting techniquesVBScript