Showing category results for Scripting

Aug 20, 2004
Post comments count0
Post likes count0

How Can I Determine Which Groups a User Belongs To?

ScriptingGuy1

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: So what’s going on here? Well, we begin by using the ADSystemInfo object to determine the distinguished name of the logged-on user; that will be a name similar to th...

Scripting Guy!scripting techniquesVBScript
Aug 19, 2004
Post comments count0
Post likes count0

How Can I Determine if a Folder Exists on a Computer?

ScriptingGuy1

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 on a remote computer, and depending on whether or not you know the exact path to the folder. Let’s s...

Scripting Guy!VBScriptstorage
Aug 18, 2004
Post comments count0
Post likes count0

How Can I Determine How Long It Takes a Script to Run?

ScriptingGuy1

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 to this: This code simply sets the value of the variable dtmStart to the current date and time. Now...

Scripting Guy!scripting techniquesVBScript
Aug 17, 2004
Post comments count0
Post likes count0

How Can I Save Output to a Text File?

ScriptingGuy1

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 probably better off using the FileSystemObject and its file-writing capabilities. However, it appear...

Scripting Guy!scripting techniquesVBScript
Aug 16, 2004
Post comments count0
Post likes count0

How Can I Give a User a Yes/No Prompt?

ScriptingGuy1

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 a couple different ways that you can do this, but because you’re dealing with users the best way is p...

Scripting Guy!scripting techniquesVBScript