Questions tagged [vbscript]

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.

Filter by
Sorted by
Tagged with
17 votes
3 answers
43k 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 ...
Stephen Jennings's user avatar
13 votes
5 answers
131k 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 ...
7 votes
3 answers
21k 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 ...
makerofthings7's user avatar
6 votes
5 answers
4k 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 ...
robertc's user avatar
  • 408
5 votes
4 answers
38k 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 ...
grigoryvp's user avatar
  • 3,675
5 votes
1 answer
16k 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 ...
Joe's user avatar
  • 211
5 votes
2 answers
9k views

How to query the task manager

I know the tasklist command in Windows will give a list of task names and their PID. There is another command WMIC path win32_process get Commandline which does give more detailed information, but its ...
E.S.'s user avatar
  • 155
5 votes
5 answers
47k 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 VBScript script similar to the one below. The script runs using a group policy. Dim WshNetwork Set WshNetwork = WScript....
Steven's user avatar
  • 349
5 votes
5 answers
2k 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 ...
TheCleaner's user avatar
  • 32.7k
5 votes
9 answers
4k 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? ...
Egil Hansen's user avatar
5 votes
1 answer
1k 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 ...
zako42's user avatar
  • 173
4 votes
1 answer
2k 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 ...
makerofthings7's user avatar
4 votes
1 answer
6k 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 ...
TheCleaner's user avatar
  • 32.7k
4 votes
1 answer
2k 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 ...
Richard Benson's user avatar
4 votes
1 answer
1k 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 ...
Jeramy's user avatar
  • 193
3 votes
2 answers
9k 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}} ...
rmontgomery429's user avatar
3 votes
3 answers
172 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 ...
Rowell's user avatar
  • 703
3 votes
1 answer
726 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 ...
Alex Alexander's user avatar
3 votes
2 answers
15k 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 ...
nami's user avatar
  • 131
3 votes
3 answers
405 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 ...
Joel Coel's user avatar
  • 12.9k
3 votes
5 answers
11k 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 ...
Cameron's user avatar
  • 203
3 votes
2 answers
37k views

VBScript wont run for domain user on Windows Server 2008 R2

I've got a script that runs just fine under the administrator user. But when a domain user executes the script, we get this error message. CScript Error: Loading your settings failed. (Access is ...
NeerPatel's user avatar
  • 329
3 votes
1 answer
1k views

Logon VBS script will not start programs

I am trying to have Group Policy run a Logon script for a User OU. The script runs, but the part where it creates a Shell Object to run, it does not load during logon. If I double-click the script, it ...
Canadian Luke's user avatar
3 votes
3 answers
4k views

Cisco VPN client - how to automate vpn process

I use Cisco vpn client to connect some customer Vpnclient.exe required answer about the question “Do you wish to continue” (yes / no ) Is it possible to run the vpnclient.exe without question ? (...
nils's user avatar
  • 53
3 votes
2 answers
3k views

Get User Rights Assignment values in Local Computer Setting using VBScript and WMI

I'd like to get all the values of User Rights Assignment in Local Computer Setting using VBScript and WMI. Is there a way I can do this with VBScript and WMI? Thanks.
Hendri's user avatar
  • 31
3 votes
4 answers
26k 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.
user28271's user avatar
  • 151
3 votes
2 answers
508 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 ...
frogman's user avatar
  • 31
3 votes
1 answer
16k views

Overwrite files without prompt with File.CopyHere in logon script (vbs)

I'm trying to create a logon script (vbs) to install some fonts. If the fonts are installed I get a prompt saying "There's already a file with the same name in this location". How can I force the ...
Jonas Stensved's user avatar
2 votes
3 answers
11k 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 ...
askvictor's user avatar
  • 854
2 votes
2 answers
31k views

How to check if a specific list of user accounts are disabled in AD, using powershell v2.0 or CMD / VBS

1) I have a txt list with sAMAaccountNames 2) I need to query each account name and verify whether it is disabled 3) if the account is disabled, delete it from AD I'll just delete them manually if ...
DSKyo's user avatar
  • 153
2 votes
2 answers
62k views

Scripting help - need to get phone number of AD accounts and then add them to contacts in trusted domain

I have domain accounts that I have created as contacts in another trusted domain so that they can see them in their Exchange GAL. I need a way to extract the phone number field from UserA (user ...
TheCleaner's user avatar
  • 32.7k
2 votes
2 answers
170 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 ...
Austin ''Danger'' Powers's user avatar
2 votes
1 answer
1k 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 ...
Chris Chilvers's user avatar
2 votes
2 answers
7k 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 ...
aduljr's user avatar
  • 500
2 votes
1 answer
862 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 "\\...
DanBig's user avatar
  • 11.4k
2 votes
1 answer
2k 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 ...
David's user avatar
  • 439
2 votes
2 answers
635 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 ...
RogueSpear00's user avatar
2 votes
2 answers
8k views

Windows 7 logon scripts -- set default printer

I have been tasked with troubleshooting a logon script at a client site that among other things sets the default printer. The logon script is vbscript with the printer being set using Set ...
gillonba's user avatar
  • 343
2 votes
2 answers
7k views

How do I fix "No usable signing certificates are available" in VBA?

We have a VBA script in Outlook that generates a popup when sending external emails. Apparently the script's signature expired over the weekend. The person who signed it is no longer here. I see ...
naps1saps's user avatar
  • 177
2 votes
1 answer
2k views

Download large files via VBscript

Has anyone been successful with downloading large files via VBScript? My script is below and it is erroring out downloading a file over a 1GB. Small files it works with no problem. Do I need to try ...
ChriSxStyles's user avatar
2 votes
1 answer
4k 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 ...
capn's user avatar
  • 123
2 votes
1 answer
8k views

logon script applied but not running

Using this answer, I was able to confirm that a logon script is applied to my user account, but it doesn't run. I can run gpupdate /force but my PC got accounts connected to a different domain and I ...
rminaj's user avatar
  • 121
2 votes
1 answer
1k 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. ...
leeand00's user avatar
  • 4,879
2 votes
1 answer
3k views

Running an application as a different user (.bat / .vbs)

I need to restart an application using a service running on the SYSTEM account. The problem is that the application is then also started under the SYSTEM account. For various reasons beyond my control ...
Skrealin's user avatar
  • 123
2 votes
2 answers
10k 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 ...
jessicah's user avatar
  • 131
2 votes
1 answer
3k 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 Settings\...
Heinzi's user avatar
  • 2,217
2 votes
0 answers
2k 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. ...
user2345320's user avatar
2 votes
2 answers
365 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 ...
another_netadmin's user avatar
1 vote
8 answers
4k 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 ...
user20192's user avatar
  • 113
1 vote
3 answers
18k 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 ...
CIA's user avatar
  • 1,604

1
2 3 4 5