VBScript is a general-purpose scripting language developed by Microsoft that is modeled on Visual Basic. It is commonly used for Windows system administration. Some applications may use it as an internal scripting language allowing application automation.

learn more… | top users | synonyms (1)

6
votes
5answers
3k views

Script to kill process at logoff doesn't execute until process is dead?

We have a program that, due to memory leaks in some of the screens, doesn't exit cleanly when the user quits. The problem is that this blocks the normal logoff procedure - you select logout and a few ...
5
votes
4answers
19k views

Download file from vbscript?

I need a script that can be run on freshly installed windows xp+ and download specified files from internet, like http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi Is it any easy way to do it ...
5
votes
5answers
36k views

Why won't my logon scripts map drives under Windows 7?

Why won't my logon scripts map drives under Windows 7? I'm using a vb script similar to the one below, the script runs using a group policy. Dim WshNetwork Set WshNetwork = ...
5
votes
9answers
3k views

What scripting language do you use for your logon scripts in your Windows enviroment?

I wonder what scripting languages is most used as logon scripts these days. Is people still hacking away in batch-file files or vbscripts, or do you use PowerShell or something completely different? ...
4
votes
3answers
16k views

Retrieve user details from Active Directory using SID

How can I find a user in my AD when I have his/her SID. I don't want to rely on other attributes, since I am trying to detect changes to these. Example: I get a message about a change to user record ...
4
votes
1answer
10k views

How do I get a list of websites from iis showing the host header value, description and home folder location?

I am using iis win2k3. How do I go about extracting an adhoc list of websites, displaying the host header value, description and web folder location? The export list only shows the header and ...
4
votes
5answers
263 views

Please help me add to this script to get server hardware info

(If this should be on stackoverflow just tell me...but it seemed more fitting here) I found the script below online from this site: http://forums.webhostautomation.com/showthread.php?t=8667 Can ...
4
votes
1answer
775 views

Using VBScript at logon to determine if powershell is installed

I have a mixture of Win7, and XP machines on my network. Every user logs on using a VBS based logon script and for clients that support it, I want to show an informational pop-up as shown here. How ...
4
votes
1answer
3k views

How do I package this vbscript as a msi for Group Policy

I had a developer that is no longer with us create an msi to do this for me, but the package is outdated now and we need to deploy new files. Basically I need to do the following: Take the code at ...
4
votes
0answers
152 views

Windows Task Scheduler cannot access EFS encrypted folder despite running as a user with access

I have a batch file set to run via Task Scheduler in Windows Server 2008 R2. The batch file is being used to rotate and compress MySQL logs, and the folder containing these logs is encrypted using ...
4
votes
1answer
491 views

Modify MDT wizard to automate computer naming

Situation: I am imaging new systems using MDT Lite-Touch. I am trying to customize the wizard to automate the naming of new systems so that they include a prefix "AG-", a department code which ...
3
votes
3answers
146 views

Direction for Scripting

I'm administering a network and they use a few scripts here. Mostly batch scripts or vbscript. It's a Windows environment, mostly Server 2008 with a few 2003 servers. My question is Should I learn ...
3
votes
1answer
325 views

Batch File to Copy Files [closed]

I have a list of 150 computers on my Windows Active Directory network that I am trying to copy a files to. I wonder if someone might have a script that would, copy the files or shortcut to the ...
3
votes
2answers
6k views

Can I change Internet Explorer security settings using a script?

Is it possible to change Internet Explorer security settings using a .bat or .vbs file? Basically, I need to change IE7 and IE8 security settings for the local intranet. The settings I want to ...
3
votes
5answers
6k views

Get user profile size in vbscript

I am trying to get the size of a user's local profile using VBScript. I know the directory of the profile (typically "C:\Users\blah"). The following code does not work for most profiles (Permission ...
3
votes
1answer
26 views

How can I get an OID for a certificate template?

I'm using C# (or VBScript) to issue a certificate from an Enterprise CA. According to this answer, I need to specify the OID instead of the certificate name, and place it in an unexpected portion of ...
3
votes
3answers
271 views

Sync OUs within Active Directory

I'm setting up two OUs in Active Directory to support a software package we're getting ready to roll out. One OU is for production, the other for training/sandbox. It is required that these be ...
3
votes
2answers
10k views

How can I edit local security policy from a batch file?

I am trying to write a utility as a batch file that, among other things, adds a user to the "Deny logon locally" local security policy. This batch file will be used on hundreds of independent ...
3
votes
3answers
15k views

Windows Server 2008 R2 VBScript script engine missing

On Win2008R2 x64 I get Input Error: There is no script engine for file extension ".vbs". when starting a .vbs file.
3
votes
2answers
223 views

Is it possible to get CCM Updates Schedule using Powershel or VBScript?

I want to be able to check the CCM Updates Schedule as seen in Configuration Manager Updates tab. I've been looking around on google and I've not been able to find a consistent answer to this. I ...
3
votes
1answer
532 views

“Unknown scripting language VBScript” IIS 7.5 + 2008 R2 SP1

Migrated an old classic ASP application from Server 2008 R2 to a new Server 2008 R2 SP1 and having serious issues now. All set ups and configs are identical between the "old" and new servers, no code ...
2
votes
2answers
65 views

Script needed to log the name of attached USB drive to text file

We rotate 2 TrueCrypt-encrypted USB hard drives ("BACKUP 1" and "BACKUP 2") off-site each week, for our data backup system. For both drives, the physical drive has no drive letter assigned to it (not ...
2
votes
2answers
4k views

logon.vbs script is not mapping network drives

I am new to creating a vbs script to map network drives in windows. For some reason, the script runs, but does not map any network drives when a user logs on to the domain. Here is the script I am ...
2
votes
1answer
330 views

Shortcut on client to run bat file on a server

Is it possible to place a shortcut on a client which will run a bat (or vbscript) file on a server? (as opposed to the script running on the client) It seems pretty basic, but I'm at a loss how this ...
2
votes
2answers
493 views

Upgrade to IIS7 from IIS6 to improve application performance

I have an ASP Classic application that runs currently in IIS6, but often due to the original programmer not following "best practices" this application throws an Out of Memory error after several ...
2
votes
1answer
548 views

Converting WMI from vbscript to powershell

I'm trying to follow the guides for accessing IIS 6 using WMI but I'm having trouble working out how to translate the Get method of SWbemServices as Get-WmiObject doesn't seem to use the same path ...
2
votes
1answer
91 views

Invoke Windows password dialog when using NET USE

I'll try to get to the point. Using Run from the start menu to an un-authenticated machine: \\hostname\share gives me the Windows prompt for password, good. Running %systemroot%\explorer.exe ...
2
votes
1answer
3k views

Remote installing an msi on citrix servers using WMI

OK, I'm a C# programmer that is trying to streamline the deployment of a custom windows form app I inherited and built an installer for with WiX (this app will need to be reinstalled regularly as I'm ...
2
votes
1answer
332 views

How does the “Last Result” column of Scheduled Tasks in Windows Server 2003 get set from a process or script?

The Last Result column of the Scheduled Tasks Window on Windows Server 2003, displays the result of the execution of the .exe, .vbs, .ps1, .bat, .cmd, etc... that has been run at the scheduled time. ...
2
votes
1answer
2k views

How to run a 32-bit app from VBScript on both 32-bit & 64-bit Windows?

What is the best way to invoke a 32-bit command with Shell.Run in VBScript such that it will succeed on both Windows 32-bit and 64-bit operating systems? On 64-bit, the app terminates because it's ...
2
votes
1answer
2k views

Registry read permissions (scripting) on Windows Server 2003

Executing the following VBScript on our Windows Server 2003 Set p_shell = CreateObject("WScript.Shell") p_shell.RegRead("HKEY_USERS\S-1-5-19\") yields the following error C:\Documents and ...
2
votes
0answers
225 views

Is it possible to launch a hyperlink within the email body from a specific sender?

Goal: My goal is to have OUTLOOK filter an incoming message based on keywords (which can be done with rules) but, I need to run a script that will automatically open the link within the email. ...
2
votes
2answers
337 views

printer assignments for windows xp workstations within an active directory environment

I'm using the following script to handle removing any old networked printers from machines and then assigning the propper ones and making one of them the default. This script is assigned to the OU ...
1
vote
8answers
1k views

how to visit every computer on the network and modify the hosts file in windows xp

We need to append a line to the hosts file for every user on our network. I have admin privileges, but don't know the first thing about windows scripting. Can someone point me in the right direction ...
1
vote
3answers
2k views

How do I turn off Windows 7 Firewall via script or through automation?

This is in regards to working on machines before joining the machine to a domain and although I would love to rely on GPO, that isn't an option at this time. In the environment I'm working in, the ...
1
vote
6answers
268 views

Standardising on a single Windows Scripting Language

I wasn't quite sure whether this would be better on StackOverflow or not, feel free to move it if you think it's more appropriate there. Anyway on to the question... The Situation We currently ...
1
vote
2answers
251 views

get account name for IIS anonymous user

I'd like to get the name of the anonymous user account for an IIS install. It's easy enough to assume that it's the machine name, but in the event that the machine name has changed I'd like to still ...
1
vote
2answers
3k views

How can I get the name of a windows .bat script from within the script itself?

I have a .bat file. I want to programmatically get the name of the .bat file. How can I do this? This is my end goal "..\lib\nant\nant.exe" -buildfile:nant.build {{pass in name of this file here}} ...
1
vote
2answers
353 views

Can multiple computers simultaneously append to a file on a windows file share?

I'm trying to log certain information from my network of Windows machines; I've set them to periodically collect this info, then I want it in a single CSV file on a network drive. I'm using a VBS to ...
1
vote
3answers
28k views

Script to list current user's mapped network drives

I have a Windows XP/ Server 2003 environment here users have mapped different network drives themselves using arbitrary drive letters. Some of these users do not know how to tell the true UNC path of ...
1
vote
3answers
1k views

Install software on a remote machine?

I posted this question to SO, but I'm really not sure whether it should go SO or ServerFault, so I'm posting it here too. Here's the question: Hey SO Gus, This might seem like a dump question, but ...
1
vote
2answers
308 views

Need to sort files by extension and distribute to folders with CMD, VBS, BAT [closed]

Have a Exec that likes to download the internet. Free files and such. Of course its all mixed and in a download directory. I know that one of the admins before me had a script written but took it with ...
1
vote
2answers
144 views

Reboot Exchange Server with One time use account or script

Not sure if this is the best way to achieve this but here is the background and the goal. BACKGROUND We are a small business. Sometimes myself or the other person who is capable of dealing with an ...
1
vote
2answers
5k views

to get the list of hostname, IP address, subnet mask

want to write a Vb Script to get the full information on all the host name, and ip address and sub net mask of computer that has been added to the domain control.
1
vote
1answer
64 views

How can I either through vbscript or GPO push a Windows 7 Logon Screen to all my users

I know how to change the login screen, it's easy. But I would like to figure out a way to do it through GPO or login script. I have tried running the script as the computer start-up script as well as ...
1
vote
2answers
452 views

Change AD-Password from client by console / VBScript

I have an AD-environment, but a few machines are used as workgroup-machines (and I can't change this). My target is to have a script which changes the AD-Password on the server from a client ...
1
vote
2answers
310 views

Using IIS6 to run kill process. Executable hangs

I'm using the following code (any tried many variations) in a web page that is supposed to kill a process on the server: Process scriptProc = new Process(); SecureString password = new ...
1
vote
1answer
668 views

query 2003 dhcp leases

Can I query my windows 2003 dhcp server from my windows xp in order to get the ip address if i have the mac address or otherwise.
1
vote
5answers
3k views

Alternative to WScript.Sleep

I'm using WhatsUpGold to monitor the uptime of services and one of them is a MySql server. Since there's no explicit support for MySql, I'm forced to write a VBS script to do it. Unfortunately, ...
1
vote
1answer
34 views

Using VBscript and EnumNetworkDrives, how can I instruct our login script to NOT delete a drive letter mapping and remove the rest upon each login?

I've been working on adding some new parts to an already existing login script using VBscript. I'd like to use the below code to erase all drive mappings on login. Set WshNetwork = ...