Questions tagged [vbscript]

An interpreted scripting language developed by Microsoft that is modeled on Visual Basic

VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modelled on Visual Basic.

VBScript is commonly used for automating administrative and other tasks in Windows operating systems and for server-side scripting in classic ASP web applications. It is also used for client-side scripting in Internet Explorer, specifically in intranet web applications.

Resources

Related Tags

479 questions
136
votes
16 answers

Delete all files from a folder and its sub folders

I want to remove all files from a folder structure, so I'm left with an empty folder structure. Can this be achieved in either batch or VBScript scripting? I have tried a very basic batch command, but this required the user to allow the deletion of…
RobN
  • 1,812
  • 5
  • 19
  • 28
37
votes
6 answers

How to Display a Msgbox directly from CMD

I would like to display a message to the user by using CMD. The way I know to do so is by creating a .vbs (VBScript) file and execute it from CMD like this: (echo MsgBox "Line 1" ^& vbCrLf ^& "Line 2",262192, "Title")> File.vbs start File.vbs But…
Bita
  • 573
17
votes
5 answers

Windows Command line get disk space in GB

I'm trying to create a batch file to pull the total size and free space of the C:\ drive of servers (locally run script). I also need the output to be easily readable, so bytes is not going to work, so I'm ok with having a command line that creates…
BondUniverse
  • 883
  • 5
  • 18
  • 27
17
votes
3 answers

How to list windows privileges for any user

I am trying to write a script to list the privileges (eg SeShutDownPrivilege etc) of all user accounts. I'd prefer it if my script could be run as a standard user, but I can run it as an admin account if I had to. Here are the approaches I have…
A G
  • 623
16
votes
4 answers

Script - How to check if a network path is available and then map it

I would like an screen saver / logon script that checks if a network path is available and then map it to a unit. If it is not available it disconnects/don't connect. Network path is \192.168.1.1\drive1 Also I need to use username/password to…
FernandoSBS
  • 2,023
10
votes
2 answers

Auto-Login Windows XP/Win-7 using a Batch File (or VB Script) stored in a Standard USB Pen Drive

Why I need this: I have Pen Drive full of batch scrips and other diagnostic tools. I have 75 stand-alone (Not Networked) PCs 'mostly with Win-XP-Pro SP-2, in 2 Labs. I often need to login each PC with admin account to configure or diagnose…
9
votes
3 answers

How can I tell if my batch file is running?

I have a batch script which is run from an AT command, and may get run more than once. When it starts, I need it to detect if it already running, and if so, exit (the second one) immediately. It must be robust, and handle if the scripts exits…
FrinkTheBrave
  • 223
  • 1
  • 2
  • 6
8
votes
5 answers

How do I configure Firefox through a script?

I'm looking to configure the following Firefox settings through a script (VBS or batch) default home page default search engine disable auto update Is this possible?
asp316
  • 351
7
votes
5 answers

How to end VBScript on Windows 10?

I accidently did a cd-drive vbs prank on myself on windows 10 and I can't find the wscript.exe file.. Is there any way to end this program?
6
votes
1 answer

How to disable and enable a USB port via command prompt?

How to disable and enable USB port via command prompt? Or using a batch script or VBScript? The OS is Windows 7.
6
votes
3 answers

Dismount a USB Volume from Command-line

How do I unmount a volume (USB flash drive) via command-line or Visual Basic script?
Jotham
  • 498
5
votes
2 answers

PDFCreator set "PDF Producer" meta attribute

I am trying to find a way to create a PDF using pdfcreator and set the PDF Producer to something other than ghostscript v*. For some odd reason the program I am piping the Pdf file to will only accept canon generated PDF files. I thought there might…
ATek
  • 556
  • 1
  • 5
  • 11
5
votes
2 answers

How do I associate a file type with a VBScript

This question is a natural follow up to How to run a batch file without launching a "command window"? One can associate for example .txt files with Wordpad by opening the Properties dialog of a txt file and pressing the Change button next to "Opens…
Jisang Yoo
  • 447
  • 1
  • 5
  • 13
5
votes
4 answers

Delete user profile from command line Windows 7

Frequently I need to delete all of the user profiles on a computer except for two accounts. I would like to have a script that can perform this for me. The script must work for Windows 7. Company policy makes it difficult to download and use any…
5
votes
2 answers

Silent Java update check

How to have automatic Java updates without jusched.exe process running all the time in the background and with control when a check for the update should occur?
rik
  • 320
1
2 3
31 32