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
0 votes
1 answer
3k views

VBScript:Verifying if printer share exists

Is there a way to determine in VBScript, if a print share is in existence on a print server? The idea is to remove the connection to that printer in the event the share is removed from the server. A ...
TheHockeyGeek's user avatar
1 vote
1 answer
545 views

VBScript for Uninstall not finding anything

I started using a standard uninstall script, and it wasn't working, so I decided to see if it was even finding any progams at all, and it seems it isn't. It works on Windows 7 but not on the other ...
David's user avatar
  • 439
1 vote
1 answer
427 views

Event Viewer VB scripts

I am sure it has been asked million times, but I can't seem to find an appropriate answer for my simple need. I am looking for a VB script that would pull event viewer logs into one location, either ...
George's user avatar
  • 500
1 vote
1 answer
784 views

Delete folders with exclusions (case)

i found a VB script that uses FileSystemObject to delete every folder on a drive except ones i specify, my problem is that the FileSystemObject cannot see or enumerate folder with trailing / leading - ...
IT.Never.Ends's user avatar
1 vote
1 answer
488 views

Set default printer by vbscript on Server 2008 R2 RDS

I'm trying to get the Task Scheduler to run a vbscript that sets default printers for individual users on a Server 2008 R2 RDS machine. Unfortunately my only success so far is getting any logon to ...
CokaKola99's user avatar
1 vote
2 answers
537 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 ...
David's user avatar
  • 439
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
1 vote
2 answers
1k views

PSKill does not run from VbScript

We have a site on our local IIS6 Windows 2003 server that occasionally locks up, and we would like a VbScript to kill the process. It is located in the system32 folder. I'm running these tests on ...
David's user avatar
  • 439
0 votes
2 answers
10k views

Script to delete Shortcut on each user's desktop

I'm looking for a script to remove a .lnk file that was placed on every user's desktop. I installed a program on a terminal server that put a .lnk file on every user's desktop, rather than putting one ...
Jake A's user avatar
  • 454
1 vote
1 answer
802 views

LOGON script won't add first share

I have the following problem: When i run my LOGON_SCRIPT.vbs to add network shares to users of a specific group it skips the first one if the user is part of Kleinkunstig_Users (it will not add the ...
bk207'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
0 votes
2 answers
4k views

VBScript with ADsDSOObject no longer working after move to Server 2008 R2

we recently moved some scripts from a 32 bit Windows 2008 server to a new Windows 2008 server R2 64 bit machine. Now we have some trouble with a few VB Scripts. Let's take this one for example: Set ...
hoetz's user avatar
  • 131
1 vote
2 answers
5k views

WMI script to list of memberships of current computer?

I have a AD hosted on 2003R2 and 2008R2, I would like to check the membership for the domain computer (e.g. compA) when an user logs on using that computer (e.g. compA) and perform certain operations ...
William's user avatar
  • 163
1 vote
1 answer
224 views

How do I extract the Drive letter from the result of EnumNetworkDrives

I'm using EnumNetworkDrives to list out all the drives on a machine. I'd like to determine which object in the collection is drive "X" What object is returned in EnumNetworkDrives that has a ...
makerofthings7's user avatar
0 votes
1 answer
684 views

Windows shutdown processes termination sequence [closed]

Do you know the Windows shutdown process is implemented? Does it has some criteria to avoid inter-process communication problems between child and parent processes? This question originated from an ...
jpmartins's user avatar
  • 1,514
2 votes
2 answers
65k 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.8k
0 votes
4 answers
860 views

VB Script for Windows Servers

I require a VB script which when run gives me the details about the latest Windows patch that was updated on the servers along with the date & time.
Anu's user avatar
  • 1
0 votes
2 answers
739 views

VBS Logon Script

Could someone please provide some assistance with VBS scripting? Here is what I have modified so far; Const GROUP1 = "cn=GROUP1" Const GROUP2 = "cn=GROUP2" Const GROUP3 = "cn=GROUP3" Set wshNetwork ...
Average Joe's user avatar
0 votes
2 answers
1k views

VBSCRIPT enumerate Read-Only Domain Controllers

How can I list all Read Only Domain Controllers that are listed in Active Directory using VBScript?
CWL's user avatar
  • 11
1 vote
2 answers
553 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 ...
nerraga's user avatar
  • 123
0 votes
4 answers
15k views

Disable remote desktop through CMD or script in Windows 2008

I'm looking for a way to disable Remote Desktop login for Windows 2008 for a specific user (a local administrator account), either using the command line or a script (such as VBS) in Windows 2008. I ...
Anders's user avatar
  • 283
1 vote
1 answer
904 views

Adding a second VHD to a Hyper-V VM programatically or from the command line

I have been scripting the creation of my Hyper-V VMs with vbscript successfully for sometime now. All the technician has to do is run my script, select the type of server they are building (EG. a Web ...
Fitzroy's user avatar
  • 321
2 votes
2 answers
639 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
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
1 vote
1 answer
1k views

Monitor message queues

I'm looking for a simple way to monitor RabbitMQ queues from SCOM. In particular, I want to be notified when a particular queue (one we use for "dead letters") is not empty. RabbitMQ has a RESTful ...
TrueWill's user avatar
  • 119
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
-1 votes
1 answer
4k views

Create Batch file to execute multiple batch files and VBS files

I have multiple batch files and vbs files , when i try to create a batch to call them it stop after the last batch file and dont execute the vbs. without giving any error if i put the vbs at the ...
Eddy's user avatar
  • 257
0 votes
2 answers
7k views

how can I hide the cmd window when running a VBScript scheduled task on Win 2003 R2 SP2 x64?

I am running a VBScript (.vbs) file via Windows Scheduled Task. On a Windows XP SP3 x86 machine, a command window is not shown when the task executes. On a Windows Server 2003 R2 SP2 x64 machine, a ...
AdamRalph's user avatar
  • 109
1 vote
2 answers
1k views

iis vbscript remove all site bindings and replace with list of new bindings

I have a single host with 500+ bindings associated to it, and I would like to first purge this host of all its bindings and replace them from a list of bindings in a file. The format of the fill will ...
Chris Hough's user avatar
1 vote
2 answers
1k 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 ...
mikedopp's user avatar
  • 329
0 votes
3 answers
5k views

VBScript gets opened in text editor instead of being executed

I'm part of a Windows Server 2008 domain. There's a login script (supposedly configured to execute on login via GPO) that sets permissions for network shares. However, instead of being executed, it's ...
Reinderien'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
0 votes
1 answer
6k views

How to list the top level folders of a drive using VBScript?

I'm looking for VBScript code that will list the top level folders of the D: drive and not the subfolders. I use the following WMI query so far but it gives me all folders and goes down to many ...
lewisc's user avatar
  • 1
1 vote
1 answer
268 views

Use vbscript to set local user's terminal services startup environment

If I was in AD, the parameters would look like: objUser.ConnectClientDrivesAtLogon = Enabled objUser.ConnectClientPrintersAtLogon = Enabled objUser.DefaultToMainPrinter = Enabled objUser....
SeanFromIT's user avatar
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
0 votes
2 answers
927 views

VBScript: Linking existing GPO to new OU

I am trying to link an existing to a new OU (that was just created), using the resources found here: http://support.microsoft.com/kb/248392 and here: http://www.thescriptlibrary.com/default.asp?Action=...
HannesFostie's user avatar
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
0 votes
1 answer
512 views

hamachi intranet connection

I have a intranet website shared on my local network which displays tables from a sql database. I want to expand this to certain people who are not on my local network. Is it to use Hamachi to enable ...
kurupt89's user avatar
  • 117
0 votes
1 answer
258 views

IIS 7 and dynamic 404 error

I have set a 404.asp page on my iis 7 yesterday and on this page beside some chacking i had at the end if anything was false i had: response.status "404 Not Found" response.AddHeader "location", ...
Y.G.J's user avatar
  • 317
3 votes
3 answers
409 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
  • 13k
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
1 vote
1 answer
2k views

How to uninstall Windows Script Host and install WSH 5.7

What I'm trying to achieve is to simply reinstall Windows Script Host. However I can't uninstall WSH and when I try to run the Windows Script Host 5.7 installer I get an error of; Setup has ...
stead1984's user avatar
  • 577
1 vote
3 answers
2k views

PC won't run VB script, error VBScript runtime error ID 800A046

I have a few workstations that can't run a network script for mapping network drives etc. I know the script works as it's working for everyone else. But on 1 or 2 machines (out of 1000) the script ...
stead1984's user avatar
  • 577
0 votes
3 answers
4k views

logon script -> if mapped drive's unc = this then disconnect and remap, otherwise do nothing

I'm in the process of moving file servers. Once completed, I will have to change the UNC path that the mapped drive letters used network wide to point to the new machine. I want to handle the change ...
mikepreble's user avatar
0 votes
1 answer
452 views

VB Scripting for counting the client connection

I want to Count the number of client connection connected to a shared folder using vbscript. I can use any service but not WMIservice.
sanku's user avatar
  • 1
0 votes
1 answer
227 views

vbscript and windows script host error

i tried to runn a vbscript, and i get this message in the picture. how do i fix it?
Smith's user avatar
  • 133
0 votes
2 answers
793 views

vbscript and secure connection

I don't know if anyone has been able to connect to a secure mssql server over the internet with vbscript using the adodb object is there pilicy that restrict script connecting to secure servers?
Smith's user avatar
  • 133
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
1 vote
0 answers
1k views

Constant permission denied error on VBS script

The file is created and copied to the network share but I need this to run without errors as I need to push out to users quietly. Permissions have been set to full everyone. No errors when copy to ...
user75236's user avatar