Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vbscript]

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

0
votes
0answers
23 views

Create folder based on todays date and copy from another folder - log date/time and what has copied

I know very little about VBS and don't do much editing of code. I would like to know if the below VBS can write to a text file called backuplog_#date of the vbs ran# to a given folder (as a log) the ...
0
votes
0answers
27 views

Haw can I execute my VB script in every 5 minutes automatically

I write a VB script and I need to run this script as a trigger in every 5 minutes My code is as follows: Sub Write_data_record_into_a_table() '////////////////////////////////////////////////////////...
0
votes
1answer
16 views

How to open two files (first hidden) in vbscript?

I want to open two files a row (first hidden) in vbscript. I have wrote script that opens only one hidden file, but I have no idea how to open second. 'HideBat.vbs CreateObject("Wscript.Shell").Run "...
0
votes
0answers
12 views

Mailmerge by script

I need to send a mail merge to a group of specific people (week2, week1) and would like to script it. An excel sheet is populated by a colleague and I would like to setup a script to check the ...
0
votes
1answer
36 views

What needs to be changed in this archiving script to only archive specific file types?

I made this script based on past answers from superuser, but now need to only archive specific file types. I messed around trying to use wildcards but nothing I tried seemed to stick. If I wanted to ...
0
votes
1answer
17 views

Run VBS script with privileges on computer startup / log in

I have script.vbs that I want to run on computer startup, after login to Windows. Tried to place it in startup directory -> doesn't work. Tried to select this in Windows's task scheduler -> doesn't ...
0
votes
1answer
44 views

want to add reg using vbscript

vbs code are as following : Set oShell = CreateObject ("Wscript.Shell") Dim strArgs strArgs = "cmd /c REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RUN" /v "...
1
vote
0answers
37 views

Unexpected behavior in VBScript with SendKeys

I'm attempting to create a VBScript I can run from a scheduled task to restart our SonicWall firewall. The firewall is a "lower-end" business model (TZ400), and I periodically have to reboot it ...
2
votes
1answer
122 views

HTA can't run ie4uinit.exe

I'm trying to refresh desktop icons from an HTA using the following: var shell = new ActiveXObject("WScript.Shell"); shell.run("C:\\Windows\\System32\\ie4uinit.exe -show"); I'm running it as ...
1
vote
0answers
33 views

Hotkey to play selected folder/s on windows explorer

If one or more folders on windows explorer are selected and then "Alt + Intro" is pressed, windows shows the properties of those folders. I would like to make a custom hotkey to play the files in the ...
0
votes
0answers
109 views

Running a script that obtains admin rights in the loop

When the UAC window with options YES and NO is displayed and the user clicks NO, I want the message to appear again in loop until the YES is pressed. :::::::::::::::::::::::::::::::::::::::::::: :: ...
0
votes
0answers
125 views

Running command line in VBS script

I need to run the following command as a VBS script and I'm having some problems. The spaces are throwing me off: "S:\000000-00000 – Temporary Location\CA\Fas.bat" -nsjf -d"S:\000000-00000 – ...
1
vote
2answers
84 views

Can you force the window to appear where you set your default internet browser?

Is there any way you can trigger (from either the command line or some vbscript) the pop-up window to appear that allows you to select your default internet browser? The pop-up I'm talking about is ...
0
votes
1answer
64 views

Search a range of IPs instead of a list

Instead of this looking at a file for a list of IPs, I want to have it look at a range. The range needs to be as large as a class C. Can some one help me edit the code below to achieve this? I am ...
0
votes
0answers
76 views

How do I run this VBscript when logged off?

I have this VBScript I want to run everyday, even if I'm not on my computer: Option Explicit Dim file, folder Dim xlapp, xlbook, filesys, accapp Dim sorte, journee, projet, compagnie Set xlapp = ...
1
vote
1answer
75 views

Run debug scripts in 32-bit in VbsEdit

I use a 64-bit VbsEdit on my Windows 7 computer to debug my VBScript code. Sometimes I need to run the scripts in 32-bit mode (C:\WINDOWS\SysWOW64\wscript.exe). Can I force VbsEdit to use the 32-...
0
votes
1answer
67 views

Unexpected Next

I have some code that tells me unexpected Next on line 131. Though if I delete this it tells me it expected Next on line 131. I just want to be able to scan an IP address range and return the info ...
0
votes
0answers
28 views

ADODB Provider Can't be found

Getting a Provider Can't be found error. This script is to rename a workstation on the domain while logging both the old name and new one in a csv file. UPDATE: The script seems to complete but doesn'...
0
votes
0answers
67 views

parentheses when calling a sub

Trying to install a .exe using a vbs. I get an error can not use parentheses when calling a sub on `Line 11'. I am relatively new to VS and have no clue what they are talking about. Option Explicit ...
1
vote
1answer
227 views

Create shortcut on desktop that opens url in Internet Explorer

We use a webpage in that only works in IE. I create a shortcut on the desktop that uses the target of "C:\Program Files\Internet Explorer\iexplore.exe" http:\\sampleurl.com. This opens the page in IE ...
0
votes
1answer
104 views

sendkeys “{TAB}” is being ignored

I've created a .VBS file with the code seen below. It works fine if I use it to fill in any form in a browser, and also works with Excel and Notepad. However, it gives an error when used on an ...
0
votes
1answer
416 views

How to press windows key + 1 using vb script

I would like to press Windows Key+ 1 using vb script to open my browser and other tools from my windows taskbar. according this vbs scripts related question VBScript's SendKeys doesn't support the ...
0
votes
1answer
2k views

Using SendKeys from vbs in a total hidden way?

Here is what I am planning to do Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run"cmd" WshShell.AppActivate"telnet 192.168.1.1" WScript.Sleep 50 WshShell.SendKeys"...
0
votes
0answers
54 views

XML-mapping not compliant with Excel RefreshAll

I'm running an Excel 2016 workbook with a few data connections to SQL server and they refresh fine with Refresh all command. I need to create a XML-mapping though just for export (i.e. no real ...
1
vote
0answers
12 views

Multiple Powerpoint files Playlist functionality in VB?

My goal is to be able to play back a set of separate Powerpoint .pptx files stored within a directory via a form of playlist which will define the order of files. Assuming this is only possible via ...
0
votes
1answer
34 views

Download and execute a file hosted on a remote server?

Is it possible to download and execute a file hosted on a remote server using a .vbs script? My below attempt doesn't seem to work. Dim objShell Set objShell = WScript.CreateObject( "WScript.Shell" ) ...
0
votes
1answer
91 views

Outlook VB Script to autosave attachments to drive

I have created a rule in outlook that looks for a certain text string in the subject line, then moves the message to a folder and executes the script below. I want this to check the extension of the ...
0
votes
0answers
19 views

Auto Replying using an email template to an email address found on the body of the message

I receive several email leads from different vendors and I would like to setup a rule in Outlook that will Auto Reply using a specific template depending who sends the email. I would like to include ...
0
votes
1answer
60 views

I am struggling to get a simple WScript .VBS script with send keys to activate correctly

As the title reads, I am struggling to get a simple WScript .VBS script with send keys to activate correctly. I have a HTPC and I operate everything from a Harmony remote and hub except for a single ...
0
votes
1answer
158 views

VBScript Windows MediaPlayer

I'm trying to learn VBScript and I can't understand what is wrong with this code. It's supposed to play a midi file and set volume to 100 on the computer. This is in Windows 7 VBScript on Notepad. The ...
0
votes
1answer
108 views

Unknown VBS script on my browser download folder

There is a _zipit.vbs on my download folder. I use Firefox The code opened in notepad below. This file has been on my computer for 6 months. I dont know where it came from but googling seems to ...
0
votes
1answer
33 views

Excel - can you setup a certain worksheet to open when the spreadsheet is first opened?

Hoping someone can help, I have a spreadsheet that I need to open at a certain page, everytime when opened eg.. an index page. I have the Vb code and works offline but I have since found out this ...
1
vote
2answers
2k views

VBA - Regex & Replace

I am very new to VBA. Below is my code to identify & remove only those dots which are appearing after dates and not after the text. But it does not seem to work. Sub simpleRegexSearch() ...
0
votes
1answer
81 views

Edit lines below certain

I need to edit the line below a certain line with a certain text I am editing a .txt file using .bat or .vbs in windows 8. Example Account 1 ABC - Debit 900 - Credit 900 ...
0
votes
1answer
76 views

How to conditional format Color Cell based on Triplicated Text values

I'm trying to color format cells in an Excel 2013 worksheet. I'm particularly interested in highlighting cells with names values that occur more than 2 times (i.e. triplicate names) in the same column....
2
votes
2answers
481 views

How to move file in vbscript

I am making a VBscript in an installer that can move a shortcut to the desktop. I have tried searching about some commands but they are too confusing. x = MsgBox("Would you like to create a desktop ...
0
votes
0answers
215 views

Xlsx to csv Running on Jenkins

I've a bat script that converts the xlsx file to csv file conversion. While I running the batch script from Command prompt I don't get any error it converts properly and the csv file is gets generated ...
0
votes
1answer
133 views

I'm unable to delete (or modify) .vbs files

I've made different .vbs files but I can't delete or make any changes to them, I just get a message: You require permission from DOMAIN\user to make changes to this file Where user is my own user. ...
0
votes
1answer
21 views

VBScript ObjExec Never Getting A New Status Code

I'm starting on a simple VBscript to automate some of the daily tasks I need done on my computer. It's not going to be complicated-- simply execute a few programs and when they're all done report any ...
0
votes
0answers
82 views

Script that allows microphone to test if there is sound

Is there a command that reads the level of sound a microphone is receiving? I'm attempting to make a small program, that is referenced by HTML. My main question is just how to get a script that can ...
1
vote
1answer
91 views

Is it possible for VBScript to check whether a specific device is in Device Manager?

In my Device Manager, there is "Realtek USB FE Family Controller". After the computer wakes up from sleep mode, sometimes the controller cannot be recognised, and "TK_NIC_DRIVER_INSTALLER.sfx.exe" ...
-3
votes
1answer
258 views

Change user password using cmd vbs or bat Windows

Is there any command that I can use to change password to a user. Something like a command that I type change user1 oldpassword newpassword
0
votes
1answer
223 views

Proper escaping of Characters for Shell execution from ASP/VBScript

I am executing a curl call from ASP with the WScript.Shell Object. Set objCmd = objWShell.Exec("cmd.exe /c echo "&dataString&" | /path/to/curl --cacert '/path/to/cert/cacert.pem' -X POST"&...
1
vote
1answer
221 views

Change Wallpaper according to time

I need to open it on startup to change the wallpaper at day n night Dim objShell str1 = "C:\Users\AnB\Desktop\Texts\Projects\Project WallTime\Day.bat" str2 = "C:\Users\AnB\Desktop\Texts\Projects\...
0
votes
0answers
21 views

Error message now showing up as top layer

I made a program that should keep having error messages pop up and then disappear on their own, it works, but the error messages (after the first one) are usually below the current window open, making ...
1
vote
1answer
106 views

Modify VB Script that saves .pptx/.docx/.xlsx to .pdf, so that it prints .pptx/.docx/.xlsx to .pdf

Every day I print a handful of .pptx and .docx files to .pdf files. I scoured the internet to find the script linked here. I will paste the script below, too. The script works great at generating ....
0
votes
0answers
555 views

Schedule silent VBS Windows settings change on Windows 10

I am looking to schedule (via Task Scheduler) a VBS script which changes my default web browser to Chrome silently (Windows 10, domain connected, with local admin privileges). At the moment, the ...
-2
votes
1answer
3k views

Unpin File Explorer from the taskbar in Windows 10 via script or batch file

The corporate image being used on my laptop keeps forcing File Explorer to be pinned to my taskbar. I have gone round and round with them about this problem (and others I have had) but am giving up ...
1
vote
0answers
685 views

Online VBScript compiler or how to execute VBScript in browser

I've written some VBS code and want to execute it. The problem is that it's a completely Windows-orientated script (so not for ASP) while I'm on Mac, so I can't test it. I don't have a Windows PC or ...
0
votes
0answers
88 views

Running a batch file to count folders via VBScript executes the folder count on System32

I have a batch file in a Google drive folder on my D drive. My idea was to have it linked on the desktop and have it dynamically point to a folder so that I don't have to navigate to the folder every ...