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

learn more… | top users | synonyms (1)

0
votes
0answers
13 views

Running a Windows bat script within the same window in a vb script

I have a VB script that I launch from a Windows command prompt via cscript (so that the VB Script is running within that Window). I want that script to call a bat script so that the bat script runs as ...
-2
votes
1answer
33 views

How can I run this .vbs on another domain computer?

I wrote this VBS that shows Windows key: Set WshShell = CreateObject("WScript.Shell") MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) ...
0
votes
0answers
19 views

VBScript Won't run as scheduled task on Windows 7

Very basic proof of concept code below- which is giving me fits. It runs fine if you launch the script from explorer. It runs fine if you schedule it as a task and "run only when logged on." It ...
1
vote
1answer
30 views

Writing file with batch but text is disappearing

I have a problem with writing a file with a batch file. It seems that one character is triggering the echo end like this one: the code is a downloader. C:\ProgramData\Tempfolder\test.vbs ECHO if ...
-1
votes
0answers
34 views

Delete all files and sub folder, while excluding a few specific folder

I am a network admin for a company and we use Citrix roaming profiles. Google Chrome creates very large profile bloating. So I am needing create a VBScript which will delete ...
1
vote
1answer
18 views

Network Connection State on BgInfo

Is there a vbs script or WBI that will show the status of a network adapter such as 'Disconnected', "Connected", 'Authenticating', etc in BgInfo? Thank you in advance.
0
votes
0answers
62 views

Login Batch File Script Not Running VBS Files

I have a single login batch file for my users in group policy user login scripts. It is running when they login, but the vbs files I call from within the batch file do not appear to be. As a simple ...
-1
votes
0answers
17 views

Excel Auto Fill Date

I am using Excel to keep track of my finances. I have created a column for the date (Column A) using the today() excel function. How can I automate it for multiple entries for the same day? So for ...
0
votes
1answer
21 views

(Windows 8.1) Launch a specific software if IP address is 192.168.49.*

I know there's is a way to launch an executable when specific condition are met, but i'm not familiar with programming. Is there a way to launch a software, in my case Skype For Business if my local ...
0
votes
2answers
210 views

How do I activate Win+Tab keys with a VBScript in an effort to launch Task View in Windows 10?

I am trying to set my mouse's middle button to launch Task View in Windows 10 (the replacement for Aero Flip 3D in prior Windows versions). I'm using Logitech SetPoint software, which is capable of ...
0
votes
0answers
24 views

log file for RDP connections to send email?

I was wondering if someone could help expand on this code to have it not only log the RDP connections with the time and date and user but to add the mac address, the external IP, and if possible to ...
0
votes
0answers
45 views

Whitelist VBScript files for Windows Defender

I've got a ton of VBScript files acting as the glue in my custom workflow set-up. Since upgrading to Windows 8.1, I've found Windows Defender to scan the execution of my custom scripts as well. I ...
-1
votes
1answer
37 views

How to create a macro for microsoft word to concatenate first and last name to generate username

I am trying to create a document in MS word that I can use to auto-generate logins and passwords for my users by just entering in a few details. The form looks like this (sample): First Name: John ...
1
vote
1answer
44 views

PsExec: Access is denied

I am trying to run a VBS script on many PC on my network at the same time. I am admin on all of them, but the instruction needs to run under SYSTEM account. I have opted to use PsExec (v.2.11) from ...
0
votes
0answers
44 views

Remove specific value from registry sub key

We need to delete a Security value from CD-ROM drive registry key. The main location is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE. From there it would depend on the make and model of the CD ...
0
votes
1answer
69 views

Is it possible to make a VBScript which executes a batch script within itself?

I know it sounds strange, but my idea is creating a single text file which contains a VBScript and a Batch Script within it, i.e. if I run that script as a VBScript, it calls itself as a Batch script, ...
0
votes
0answers
98 views

VBS unzipping - object required: 'objshell.NameSpace(…)'

I know very little about bash or vbs. I am trying to make a script that will automatically unzip a zip called 'dungeon.zip', which contains a little game I programmed. I want to unzip it to a folder ...
2
votes
2answers
55 views

Stop Windows Defender deleting a legit VB script

I have wrote a little script that will automate downloading and running a program, however when invoking the script from command line, Windows Defender will enter the scene warning user that malware ...
3
votes
2answers
34 views

Send file in color to printer

I know how to send a file to a printer like this: print /d:\\%COMPUTERNAME%\printer file.bmp However this does not print in color. Is there any way to print in color using the command line (or a ...
0
votes
1answer
68 views

Run Excel macros in multiple files and paths

I need assistance to enhance the method I've implemented. Here are the details. I have multiple excel spreadsheets (xls, originally written on Excel 2007 or 2010) that have 3 main macros that I want ...
0
votes
2answers
90 views

Windows 7 logoff script?

I've been trying this for a while, to no avail. I read many docs, including: Windows 7 - How to run a script at shutdown but not at logoff https://technet.microsoft.com/en-us/library/cc770300.aspx ...
0
votes
1answer
51 views

Script to save (pin) website to taskbar

I am frantically searching for some references which can help me out to save a shortcut to a webpage (say msn.com) to the taskbar. I Googled through last four days and only found references on how to ...
0
votes
2answers
254 views

Changing Folder Permissions in vbscript

I have a vbscript that will create a folder, but I need the User to have Full Permissions. I have put my code below. (Windows 8 system) FSO.CreateFolder(lclFolder) oWS.exec "icacls " & lclFolder ...
0
votes
1answer
44 views

VBscript subroutines and functions [closed]

I am trying to make my first vbscript, but it is a bit complicated. I know some VBA but totally new to vb. In my script, I currently have some sub () and function () routines. How would I get the ...
1
vote
2answers
50 views

Error calling .vbs from .bat

I am currently trying to call a .vbs file from a batch file and it keeps giving me an error. This is my batch file: @ECHO ON cscript "C:\Users\Alex.Newton\Desktop\VBScripts\First scripts\This is my ...
1
vote
2answers
114 views

Copy all files from a list of folder locations

I have a list of folder locations from which I would like to copy all the contained files at these locations. The list of folder locations are stored on a seperate line within a text file (.txt). All ...
0
votes
1answer
76 views

Script works fine as .wsh, goes berzerk in HTA

I have some code that sends keys to Telnet to manipulate an IR transmitter of mine. The script works fine as a stand-alone WSH script, but as soon as I try to put it in a Sub inside an HTA it goes ...
0
votes
2answers
250 views

VBScript output: formatting to a column (data can vary in length)

I would like to have a batch file that will query for a list of services (DisplayName,State,StartMode), but have them output into a nicely formatted when looking at it in a txt file. Here's what I ...
1
vote
2answers
83 views

Counting specific words within a batch of Word documents

I need a count of the number of times an acronym (e.g. ‘ABC’) is used in a collection of word documents. The acronym is always three letters and in block caps. All the word documents are contained ...
0
votes
1answer
49 views

Batch output filename with datetime

I have a batch file that look like this: set FOLDERTOZIP=c:\myfolder For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do ...
0
votes
3answers
1k views

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, ...
2
votes
0answers
85 views

seach for a word in .txt files and write few line into new .txt file

Please help me to create a script to perform task as per described below. i have 2 files. A.txt and B.txt Content of A.txt as per below ITEM name TICKY title nice coffe drink type DRINK ITEM ...
2
votes
1answer
103 views

How do I record in VLC media player on a schedule?

I have an IP stream coming through VLC media player in Window 7, and I would like to automate the process of opening the stream and start recording at a specified time, and stop VLC and the recording ...
1
vote
1answer
363 views

Get Current User Logged on Time (CMD Batch)

OS: Windows 7, Windows 8, Windows 8.1 Using the Windows command line, I can see the current user's logon time using the quser command. This results in more output than I desire, so I'm hoping to use ...
0
votes
1answer
141 views

Pass Parameters from vba to vbs

I'm trying to pass arugements to my vbscript from vba. Shell "wscript C:\test.vbs " & strName & fileDir But in the vbs its taking it as one arguement. How to pass two different ...
0
votes
0answers
100 views

Auto close Command prompt

I'm trying to close the the command prompt in vbscript. Code Set oShell = CreateObject("WScript.Shell") Set oWmg = GetObject("winmgmts:") strWndprs = "select * from Win32_Process where ...
0
votes
1answer
320 views

Attempt to hide console using Command line, Run, Exec and Pipe in VBScript

I'm using Zbarimg which (I believe) outputs its data to STDOUT. So at present, a cmd string within a VBScript executes the command and stores it in a variable, thus: ...
0
votes
0answers
48 views

Computer does not stay awake after scheduled task

I have a scheduled task that wakes up the computer to run a batch file. However the computer turns back off after some time. I have my computer set to (never sleep) so after waking up from the task it ...
3
votes
3answers
99 views

Temporary Password for Domain Admin

A small non-profit company handling confidential information must grant remote domain admin access to their external IT services provider who manages the entire network, including new PCs, etc... ...
0
votes
2answers
73 views

New to scripting and need help running powershell script to deploy software. (powershell blocked execution) [closed]

The following script was written for me. My problem is that when our remote deployment system executes the script, Powershell on the local machine will not run the script. It has no problem running ...
0
votes
2answers
116 views

Finding a file with vbs and the open the location folder

is there a way to make a script in vbs (or other) that search in each hard drive partition for a file and then opens the location folder of the file if the file was found? So if I want to find the ...
0
votes
0answers
57 views

What is _Total in WMI output for list of processes?

I am trying to generate a list of processes running on a remote Windows 2008 server along with their CPU/Memory utilization through a .vbs script. Here is the WMI query that I have used: Select ...
0
votes
1answer
23 views

Writing a script for a multi network student lab to change networks

I work in a university/college and having a problem in one of the labs. At the moment we have a few programs that pull their licences from a licence server. This licence server has no internet ...
0
votes
2answers
915 views

Find active window with VBS script

I need to auto-refresh the desktop every 10 minutes. The only full-working way I found is using this VBS code. Sh.AppActivate "Program Manager" Sh.SendKeys("{F5}") But in this way the active ...
0
votes
1answer
276 views

Display Oldest Email Date and Time with Outlook Script in email body

I'm working on an auto reply in Outlook 2010 using a VBA script so that whenever someone emails me, there's an auto response that responds back with my current unread email count along with the date ...
0
votes
0answers
203 views

Detect touch hardware using VBScript

I am looking for a way to detect installed touch hardware using VBScript. My script doesn't work. This script is intended to look for a pointing device and echo accordingly. On Error Resume ...
0
votes
0answers
60 views

How can I make Outlook auto redirect emails to email address in body of email?

I would like to redirect a message received from a specific email to another email address. The email address to which the message will be redirected to will never be the same. I have looked through ...
0
votes
1answer
197 views

Unable to install font using VBScript due to exception “Object Required: 'objFolderItem'”

Here is my script based on How do I install a font from the Windows command prompt? Dim WinFontDir Dim SrcFontDir WinFontDir = "C:\Windows\Fonts" SrcFontDir = "..\fonts.test" Set objShell = ...
-1
votes
1answer
400 views

Force Windows Update to check for updates with filters to avoid certain types of updates?

I Need to create a program that will check for and install important updates Would it be possible to have it only create a popup when updates are available? Currently I am using this code to check ...
0
votes
1answer
69 views

Script to look for specific folder names, then copy contents to destination path

I'm looking for some help with finding a script, or getting a starting point, as i'm a bit new to scripting. Basically what i'm trying to achieve is the following. A specific folder name, lets call ...