Questions tagged [adsutil.vbs]

Microsoft's Active Directory Utility script

Adsutil.vbs is an IIS administration utility that uses Microsoft Visual Basic Scripting Edition (VBScript) with Active Directory Service Interfaces (ADSI) to manipulate the IIS configuration. This script should be run using CScript, which is installed with Windows Script Host.

26 questions
4
votes
2 answers

How can I set global mime-types for IIS6 programmatically?

Currently I am able to to set a mime type with adsutil.vbs for the primary web site on IIS6 with the following syntax: cscript adsutil.vbs set W3SVC/1/Root/MimeMap ".manifest, text/cache-manifest" This seems to work fine when I only need to target…
Kevin
  • 9,309
  • 12
  • 44
  • 51
4
votes
2 answers

How to find relative path to C:\Inetpub\AdminScripts\ADSUTIL.VBS?

IIS 6 and older ships with a utility script called ADSUTIL.VBS: Adsutil.vbs is an IIS administration utility that uses Microsoft Visual Basic Scripting Edition (VBScript) with Active Directory Service Interfaces (ADSI) to manipulate the …
Mike Atlas
  • 8,193
  • 4
  • 46
  • 62
3
votes
1 answer

IIS6 - associating an application pool with an application using adsutil

I'm attempting to do some IIS 6 setup programatically. I've successfully created an app pool: adsutil create w3svc/apppools/myapppool iisapplicationpool and created an application: mkwebdir -c localhost -w 1 -v "myapp","c:\inetpub\myapp" adsutil…
2
votes
1 answer

Error handling on VBScript: Not throwing error

If error occured then it's going to sub DisplayCustomError but it's not throwing exception. Expected result - After objHTTP.send (json) it should throw exception message. I have tried Call Err.Raise but it's not throwing anything. The code is in…
2
votes
1 answer

[in .vbs][3in1] Create multiple folder 180 => Create subfolders in All 180 => Move file and rename file in Subfolders created [3in1] "x, y, z"

"x, y, z" (vertical, horizontal, Move and rename files.) i want to combine 3in1 (x,y,z.).vbs in .vbs [summary] Read it first here "x" Trying to create multiple folders with VBScript Option Explicit Dim objFSO, objFolder, strDirectory, i strDirectory…
Lucas
  • 23
  • 6
2
votes
1 answer

Getting mail on windows logon with username of logged-in user

I am trying to create action task that will send mail when anyone logs in to a particular system with username of a logged in user. I am very new to this task since I never worked as a system admin anytime. What I think I should do is to specify a…
2
votes
1 answer

DOS command to list all virtual directories in IIS 6

I'm looking for a DOS command to list all sites and virtual directories in IIS 6 under Windows 2003. I know there are ways to do this using Powershell / WMI, VBS, C#, etc. But all I want is a quick and dirty, no-fuss way to do it from DOS, without…
rkagerer
  • 4,157
  • 1
  • 26
  • 29
1
vote
2 answers

Usage of + operator in differents situations in vbscript

What is the Value of the below in vbscript 1)x=1+"1" 2)x="1"+"1" 3)x=1+"mulla" Note:In the all above three cases I am using first variable as either string or integer and second on as always as string. Case 1:Acting as a numeric and auto…
mulla
  • 143
  • 1
  • 11
1
vote
1 answer

WScript v/s CScript

I have query related to this topic. Here is my script. I'm using below script to edit users on HP ILo board, it works fine, no error at all. BUT here I can see cmd prompt, how do I run it in silent mode, i.e I do not want to see any cmd prompt,…
Dharanesh
  • 21
  • 1
  • 2
0
votes
1 answer

How to pass HTA Form data (as months and years) to an external Vbscipt file

I'm creating an HTA from which to run some external VBS files. I need to pass from the HTA to the VBS files, the data of some forms (Radio Button). What should I add to the HTA file to accomplish it? And in VBS? This is the code I have created so…
MicBi
  • 13
  • 1
0
votes
0 answers

I've been tasked with finding out why our once successful outlook signature script is now throwing an "Invalid Outside Procedure Error" Please advise

When I try to run this code I get an error message that states: invalid outside procedure. Is there an issue with my format; is it too dated? I do not know how to proceed. On Error Resume Next Const RTF = "6" Const Text = "4" Const HTML =…
0
votes
0 answers

Convert xml to xlsx vbscript

I have a vbscript code, where I convert from xml to xlsx. However, when converting it duplicates the information and takes the order of the columns. How do I reverse or adjust? Because I'm not able to format correctly. If you use excel and open it…
0
votes
1 answer

Read the contents in a text file and replace it with specified text in another text file using VBS

I've been trying to create a VBS script to read the contents of text in one text file and replace it with specified text located in another text file. I'm trying to get the following script to read the contents in a file called first.txt. Once it…
Space Tech
  • 21
  • 5
0
votes
1 answer

How to create a script that deletes certain files in only the same folder the script is saved

I'm really new to this. But I was wondering how to create a .vbs script that, when ran, will delete 3 files out of whatever folder the script is saved in. The folder location will change constantly so I need it to look only wherever the script is…
0
votes
1 answer

How to get a variable from cmd and show it in vbscript - Vbscript

i'm a beginner of vbscript , i need you help , my question is how do i do to get a variable from cmd and show it in vbscript for example get a ping from www.google.com and show it in a msgbox in vbscript help me code : dim cmd,x set cmd =…
BigPapi
  • 1
  • 1
1
2