Questions tagged [vbscript]

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

Filter by
Sorted by
Tagged with
3 votes
4 answers
28k views

VBS script execution blocked on Windows 10

Posting this question on behalf of GNU Octave trying to troubleshoot execution problems. We've recently had a handful of Windows users install the software and be unable to run the program. Often ...
1 vote
2 answers
8k views

Windows 10: Using Task Scheduler to run a VBScript file?

I am migrating over from Windows 7 to Windows 10. In 7, I ran a VBS file through Task Scheduler that shut down Microsoft Outlook in order to prepare the .pst file for nightly backup. I want to do the ...
0 votes
1 answer
7k views

Make a .vbs running in background visible to be able to cancel it

I have a .vbs-Script that is running in the background endlessly. This script does not have any way for the user to interact with it; a regular user won't even notice something is running in the ...
1 vote
0 answers
40 views

ilovepdf desktop leaves warning message

ilovepdf desktop program shows the message "Your PDFs have been converted successfully" when the conversion process is completed while right-clicking on Windows. The question is, how to ...
0 votes
1 answer
46 views

VBS working from all pcs except 1. Works from shortcut with argument though

In the past I have used a very simple script: set WshShell = WScript.CreateObject("WScript.Shell") CreateObject("Wscript.Shell").RUN "C:\windows\system32\taskkill.exe /F /IM &...
2 votes
1 answer
62k views

Sleep Windows 10 using CMD (command prompt) [duplicate]

All suggested commands for Windows XP/7/8 puts Windows 10 in hibernation (not in standby). so, for Windows 10, how to put PC into from CMD (batch file)? is there correct a keyboard combination (...
2 votes
7 answers
65k views

How to detect Microsoft Office version name?

Programmatically, what method can get the name of the installed Microsoft Office version? I have tried every Powershell command, VBScript, and WMI query I could find. I have pored through the registry ...
0 votes
1 answer
39 views

how to change the format of the date time of windows from WSH

I want to use Windows Scripting Host to automate my windows instalation and I want from it to change the hour to 24h and the date to YYYY-MM-DD. Is it possible?
1 vote
2 answers
5k 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
2 answers
38 views

vbs script not logging in list of domain joined pcs

I have a script that get a file containing pc name and logged in automatically this scenario works fine for local account but for domain account it won't work actually computer boot up network won't ...
3 votes
2 answers
8k views

Windows task scheduler not triggering a task on Windows 10

I have a task that is supposed to run a script I made, every 10 minutes, but it just doesn't seem to trigger it. In the task scheduler it says that next run time is in 10 minutes, but when the time ...
0 votes
1 answer
147 views

How to make a notification with a sound signal?

I would like to make a reminder so that a notification with a sound signal appears in a month. In Windows Task Scheduler, you cannot send a message along with a beep (message only). At first I wanted ...
0 votes
1 answer
74 views

Parameter "262144" (top-most attribute set) in Task Scheduler does not work (VBScript)

Parameter 262144 (top-most attribute set) in Task Scheduler does not work. When creating a task to run a .vbs file, parameter 262144 does not work (does not open the window on top of others), although ...
0 votes
1 answer
174 views

Task Scheduler no longer running VBS script

so I've been trying to get VLC player to skip to the next file at a specific time (10am). I've got the following script that worked fine for a few days, and then stopped completely. Set WshShell = ...
1 vote
2 answers
187 views

Packaging a VBScript

I have written a simple VBScript that helps cancer patients manage their drug dosage (specifically Capecitabine - look it up if you don't believe me). Many of these patients are 'older generation' ...
0 votes
0 answers
149 views

vbscript sendkeys on windows10 fails on one PC

I'm trying to use a vbscript with sendkeys but the keys are not recognized. I'm using a sample from Microsoft and it works on my laptop but not on my desktop. On the desktop, Notepad does open, but ...
0 votes
2 answers
251 views

How can I run dregcmd from VB silent and output results to a file

There's one result from dsregcmd that is crucial to what I need that other methods don't do related to Azure,dsregcmd /status. It won't succeed if shelled out to cmd nor run from anything I have found ...
1 vote
1 answer
591 views

how to convert udf file to docx via command line

How can I convert a udf file to docx using the command line? Is there a program that does this? This command line can be PowerShell or VBScript. Here is the file: Here is a link to the editor: https:/...
1 vote
0 answers
678 views

Permission Denied VBScript error when trying to run the file

So I'm trying to emulate a security related github repository using VMs and for that I had to run a VBScript. The VBScript is as follows: Set oShell = CreateObject ("Wscript.Shell") Dim ...
2 votes
1 answer
182 views

VBS script suddently won't execute

I'm running Windows 10, Version 10.0.19045 Build 19045 (22H2). This VBS script below used to work until today to change my Windows background to the Next Background but suddenly it will only popup the ...
0 votes
0 answers
35 views

How to scan and map shares in LAN

My share drives get disconnected all the time, and after applying different fixes I found on the internet, they still do disconnect. So everytime, I need to scan the LAN and manually reconnect ...
4 votes
1 answer
1k views

What are the .wsf , .wsh, and .wsc files?

I understand that C:\Windows\System32\cscript.exe and its GUI version C:\Windows\System32\wscript.exe can interpret VBScript .vbs/.vbe (Microsoft Visual Basic Scripting Edition) and JScript .js (...
1 vote
1 answer
3k views

Join to Domain Script - Windows 7

I'm looking for a way to diss-join a machine from a domain and join a machine to a domain via scripts. I searched online and have found the following script that should join a machine to a domain but ...
3 votes
2 answers
9k views

How to Replace Words With VBScript Regex and VBA?

what is vbscript syntax for .net: \b[a-z]+\b Hi trying to replace all alpha words in the source. .net regex tester confirms this pattern will find all words: \b[a-z]+\b this: Findings,Actions ...
0 votes
0 answers
118 views

VBS script keeping old values even though I changed them

I am running the script below to keep my computer from going to sleep: set wsc = CreateObject("WScript.Shell") Do 'Five minutes WScript.Sleep(5*60*1000) wsc.SendKeys("{...
0 votes
0 answers
896 views

Run vbs script in batch file

I read an article to use a vbs script to access the CTL+ALT+DEL to change password GUI. I named it "ChangePWD.vbs" Set objShell = CreateObject("Shell.Application") objShell....
2 votes
0 answers
787 views

How to automatically disable "Allow computer to turn off this device" on all devices in Device Manager

I need to frequently go through most devices and disable this option (if the Power Management tab is available) for clients machines (Win10/11). Don't mind how it's done, Powershell/batch/VBS/etc. I ...
0 votes
2 answers
620 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 ...
1 vote
1 answer
1k views

Automate printing Mathcad sheets to PDF

I am trying to print all files in certain format (i.e. *.xmcd) in a folder to PDF. I already made AdobePDF my default printer. I want to do this task using powershell but when I run it it throws an ...
0 votes
0 answers
54 views

Disadvantages of checking for invalid values in a textbox

I am making a userform where I want to perform a regression analysis from the input data for four functions fi(x), which are recorded in each of the corresponding textboxes. To check if the input ...
4 votes
3 answers
4k views

How to tell when Windows Update is finished

In Windows 10 Home, the options for Windows Update are limited. I would like to stop it from starting up and instead have the user launch it when they are ready. The reason is that it starts too ...
0 votes
1 answer
257 views

VBS - schedule task + run in hidden

I am trying to create a scheduled task and run in hidden mode (without console) my BAT file that does the processing... can someone help me? Here is one thing that I have tried... enter image ...
0 votes
2 answers
142 views

Annoying auto-start PC issue

I just removed obs from my PC and im keep getting this message, non-stop. Can you please help? I tried to search for program who is maybe activating this file, but its missing, to remove it.
0 votes
1 answer
394 views

Restore full control of registry key (and subkeys) to SYSTEM account

There is a registry key (and maybe more) that have had SYSTEM either removed or explicitly denied permission. I need to do this programmatically from the SYSTEM account (Powershell, VBS, command line ...
6 votes
1 answer
39k views

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.
0 votes
0 answers
301 views

Microsoft VBScript Compilation Error. Code: 800a0400. Error: - Expected Statement

Error Screenshot ' ------------------------------------------------------------------------------------------------ ' Perform all the SCCM Client Actions ' --------------------------------------------...
0 votes
1 answer
294 views

Connect automatically to wifi as soon as available and if it gets disconnected connect again

My windows 10 disconnects automatically from wifi sometime. My pc is not having monitor i am controlling it over remote desktop team viewer. Also sometimes running cleanup utilities disable the auto ...
0 votes
0 answers
104 views

vbscript control loop structure works on one windows 10 desktop and not on another windows 10 laptop. What could be wrong?

I have following vbscript code segment that works fine on one windows 10 desktop but not on another windows 10 laptop. Set WshShell = WScript.CreateObject("WScript.Shell") dim r, i, j ...
0 votes
1 answer
313 views

How do I prevent this dialog from popping up when running a VB script from task scheduler?

This is the undesired dialog that pops up when I run a Task in the Task Scheduler that just calls a VB script. Any idea how to make my Windows understand, that I do want to run the .vbs file using the ...
0 votes
0 answers
265 views

Looking for a way to prompt a scheduled message with options for the user to start (or not) a long backup batch file

I'm looking for a way to use Task Scheduler to warn the user before starting a long backup batch by showing a message box that waits for user confirmation. I was trying to use task scheduler to run a ...
0 votes
0 answers
55 views

Create outlook folder loop via excel range

I could able to loop sender names from first columns of excel & nwow I am trying to create folder loop in below code but it showing error !!! Sub MoveItems() Dim myNameSpace As Outlook.Namespace ...
3 votes
1 answer
3k views

Why does Windows Task Scheduler not work when selecting the option "Run whether user is logged on or not"?

I have a small VBS script that I want to run once per day. Set objExcelApp = CreateObject("Excel.Application") objExcelApp.Visible = True objExcelApp.DisplayAlerts = False sFilePathXlsm = &...
0 votes
2 answers
547 views

When log into standard account of PC run VBS that requires admin privs

I need when I log into Windows account of standard user, VBS file should be run automatically. I know I can create a new string value in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run ...
0 votes
2 answers
8k 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: xml_data=objShell.Exec("C:\...
2 votes
2 answers
12k 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 ...
1 vote
2 answers
2k views

(VBS) how to taskkill a process when a specific window appear?

In my VBScript, I need to taskkill process example.exe when SPECIFICWINDOW appears (the window's name is different than the process name) and need this command ready when SPECIFICWINDOW appears. How ...
1 vote
0 answers
207 views

Scripting an APPX install

I have a very large application which installs two of its many components from APPX files which have been renamed to an ADIX extension. The rest of the components are a mixture of MSI/MST and EXE ...
0 votes
1 answer
635 views

Open Text file after creation

Please help to see where went wrong that the file could not open to view after created successfully. dim fname fname=InputBox("Enter File Name:") MsgBox("The File name is " & ...
0 votes
0 answers
83 views

Time & option dependent data input (Excel)

I ma trying to create a from that will allow users to enter data in to excel easy on a tablet. Start Form After Pressing Data Input As you can see data is being copied from txt field in to a specific ...
2 votes
1 answer
4k views

Windows 7 - Create a VBS Script that will open a network location (the pause 10 seconds) and a folder on the desktop

Good day! I'm trying to create a VBS script that will open up a location on a server share then pause 10 seconds, then open a folder on my desktop. I can write a VBS in notepad that will open EXE'...

1
2 3 4 5
10