Showing tag results for running

Apr 5, 2006
Post comments count0
Post likes count0

How Can I Determine the Path to the Folder Where a Script is Running?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I determine the path to the folder where a script is running? What I’d like to do is have the script automatically open the folder where the script is running.-- PD Hey, PD. You know, for the Scripting Guys this question - as do so many of the questions we receive - falls under the category Why Didn’t We Think of That...

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

How Can I Determine the Default Script Host on a Computer Before I Run a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I know that when I run a script I can use code to determine whether the script is running under WScript or CScript. What I can’t figure out is this: how can I determine the default script host on a computer before I run a script?-- AT Hey, AT. You know, it’s not very often that people completely stump the Scripting Guys; howe...

Scripting Guy!scripting techniquesVBScript
Feb 7, 2006
Post comments count0
Post likes count0

How Can I Determine the Drive Letter for the Drive My Script is Currently Running On?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have a script that runs off a CD and copies a bunch of files to a computer. However, in order to copy the files I need to know the complete file path, including the drive letter. How can I determine the drive letter for the drive my script is currently running on?-- RKG Hey, RKG. You know, about a year or so ago one of the ...

Scripting Guy!scripting techniquesVBScript
Nov 11, 2005
Post comments count0
Post likes count0

How Can I Get the Command Window to Stay Open After Running a Command-Line Tool?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I get the command window to stay open after running a tool like Ping or Ipconfig?-- DB Hey, DB. Now this question takes us back. Back when one of the Scripting Guys first started here at Microsoft many people thought WMI and ADSI were way too hard for script writers to use. As a result, this Scripting Guy was discoura...

Scripting Guy!scripting techniquesVBScript
Dec 13, 2004
Post comments count0
Post likes count0

How Can I Run a Script Under Alternate Credentials?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Is there a way for me to log on to a computer using a regular user account, but then run a script as a domain administrator?-- WW Hey, WW. In answer to your question, yes, both WMI and ADSI provide a way for you to run a script under alternate security credentials; that is, both allow you to specify a user name and a password...

Scripting Guy!scripting techniquesVBScript