Questions tagged [vbscript]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

Script to move outlook files into sever folder based on rules [closed]

I am trying to remove files from an outlook folder into person based files. The email subject line looks like this (example data): Jones, Paul 23864073 - Auto Contract Amendment - date I want to move ...
LRyl's user avatar
  • 1
0 votes
1 answer
32 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?
Remus Rigo's user avatar
  • 2,999
0 votes
2 answers
24 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 ...
Muhammad Zubair Mughal's user avatar
0 votes
1 answer
69 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 ...
moninah's user avatar
  • 35
0 votes
1 answer
101 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 = ...
Rory's user avatar
  • 1
0 votes
1 answer
78 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 ...
moninah's user avatar
  • 35
0 votes
0 answers
121 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 ...
mspi's user avatar
  • 1
1 vote
1 answer
475 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:/...
Burak Celik's user avatar
1 vote
0 answers
548 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 ...
Linkus's user avatar
  • 11
2 votes
1 answer
162 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 ...
mapper's user avatar
  • 21
0 votes
0 answers
32 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 ...
Katto Ishimura's user avatar
0 votes
2 answers
206 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 ...
SKidd's user avatar
  • 110
0 votes
0 answers
104 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("{...
Juan's user avatar
  • 1
2 votes
0 answers
726 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 ...
Nathan's user avatar
  • 43
0 votes
0 answers
52 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 ...
Camila Sanchez's user avatar
0 votes
1 answer
338 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 ...
Me Myself's user avatar
0 votes
2 answers
133 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.
AstroMan's user avatar
0 votes
0 answers
281 views

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

Error Screenshot ' ------------------------------------------------------------------------------------------------ ' Perform all the SCCM Client Actions ' --------------------------------------------...
Suraj's user avatar
  • 25
0 votes
1 answer
266 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 ...
raja's user avatar
  • 1
0 votes
0 answers
99 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 ...
Shailesh Raval's user avatar
0 votes
1 answer
268 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 ...
lenny's user avatar
  • 127
0 votes
0 answers
251 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 ...
noob's user avatar
  • 1
0 votes
0 answers
53 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 ...
user avatar
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 = &...
fritz.ann165's user avatar
0 votes
2 answers
500 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 ...
sprsr's user avatar
  • 259
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 ...
Jonathan's user avatar
1 vote
0 answers
186 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 ...
FJones's user avatar
  • 131
0 votes
0 answers
870 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....
VB88's user avatar
  • 393
0 votes
1 answer
593 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 " & ...
VB88's user avatar
  • 393
0 votes
0 answers
81 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 ...
Gzylo's user avatar
  • 1
0 votes
2 answers
1k views

Maximized IE window in VBS

Need help to maximize the IE window in VB script. Tried several options but in vain. Option Explicit Dim objApp, nIE, oIE, Window Set objApp = CreateObject("Shell.Application") Set oIE = ...
VB88's user avatar
  • 393
1 vote
0 answers
490 views

Start and Close a program in VBS

I am using this script to launch calculator program. How to add lines to close the calculator after 2 mins. Set colMonitoredEvents = GetObject("winmgmts:")._ ExecNotificationQuery("...
VB88's user avatar
  • 393
0 votes
0 answers
303 views

Vbscript trying to copy files. Getting required object errors

I'm trying to make a script that will copy a file when the user gives a prompted folder they wish to move it to. I've tried different ways from multiple different posts on this site and each time I ...
Waffles N Catsup's user avatar
1 vote
1 answer
1k views

how to send shortcut to public desktop, with vbs

following the instructions of ss64 I have created a vbs to create a shortcut my test.vbs Set objShell = WScript.CreateObject("WScript.Shell") Set lnk = objShell.CreateShortcut("%...
acgbox's user avatar
  • 775
1 vote
1 answer
259 views

for loop through all folders and execute vbs issue

i trying to code a script where it loop through all folders including subfolders however i encounter some errors. It run all *.vbs instead of only Installation.vbs. In my root folder, i have a folder ...
Eugene Ng's user avatar
1 vote
1 answer
586 views

Windows 10 Task Manager (Process tab) not showing VBScripts (i.e. wscript processes)

I'm working on a VBScript to show a msgbox if a system condition is hit (it's running a loop which sleeps after each iteration). The issue: I've noted that, when I run the script, it doesn't actually ...
Jonathan Heard's user avatar
0 votes
1 answer
103 views

Is there a way to do some action if a specific website is visited?

I want to make something in cmd/powershell/vbs that monitors your browser activity and if a specific website is visited do something . Powershell Example: function Infinite-Detect { while($true) { ...
TheCodeExpert's user avatar
2 votes
2 answers
1k views

How can I display a dialog box on Win-7 or win-10 for 5 seconds, from the command line?

While searching here, I came across this code on another question: (echo MsgBox "Line 1" ^& vbCrLf ^& "Line 2",262192, "Title")> File.vbs start File.vbs It ...
MelBurslan's user avatar
  • 1,344
1 vote
1 answer
3k views

How to run a script when the screen is turned off for being idle?

just wondering whether its possible to run a script when Windows turns the screen off after a period of inactivity (not sleep or hibernate but just switching off the screen) as well as when the user ...
George's user avatar
  • 13
1 vote
3 answers
1k views

Detect changed files

How to detect changed files and move them to a folder named storage on my desktop is there any way I can do it with powershell/bat/vbscript without any third party tools?
TheCodeExpert's user avatar
1 vote
1 answer
531 views

Commands to copy and paste

I want my powershell/batch/vbscript to be able to copy a text start notepad and then paste it I found how to copy which is here but I don’t know how to paste it any ideas how can I do it without third ...
TheCodeExpert's user avatar
0 votes
2 answers
781 views

Powershell Script to Copy Data Only into Folders That Are Empty on Destination

I have a case where a FileServer migration was not successful because the user who did not have permission on all folders. So I have two servers with the same folder structure, but as users have ...
Lekost93's user avatar
0 votes
2 answers
2k views

Windows 10 suddenly refuses to run VBS script [Code 800A802D]

Windows Version: 21H1 (OS Build 19043.1151) [Windows 10 Pro 64-Bit] AV is Windows Defender & brain.exe Now to my problem: Since recently I no longer can run my VBS script. error-msg and exclusion -...
Aebian's user avatar
  • 1
0 votes
1 answer
544 views

Blank/White/Missing App Icons in Windows 10: Simple Solution?

My desktop icons have suddenly gone blank, similar to as shown below: Quite annoying and problematic for me as I heavily rely on logos and icons to navigate my desktop smoothly and I would appreciate ...
Virtuality's user avatar
  • 1,300
1 vote
0 answers
199 views

Change affinity of process with batch script

Change affinity of process with batch script: "C:\Program Files\Microsoft Office\Office16\MSACCESS.EXE /C Start /affinity 1" "E:\Lapu\CM.accdb" /x "001" Unable to get ...
Shaf3067's user avatar
0 votes
0 answers
4k views

How to run vbscript command from cmd

(I don't speak English. Hope you understand.) Hi, I have the following VBS command. set shell = CreateObject("Wscript.Shell") : shell.run "notepad" (Start notepad, but from vbs.) ...
Andrew's user avatar
  • 85
0 votes
1 answer
280 views

Run VBS file in the folder protected from the standard user when the user starts Windows

I know that in order to run VBS file on Windows starting, we can create a Windows registry string with the VBS file path under the HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Run. But ...
sprsr's user avatar
  • 259
1 vote
0 answers
495 views

Can't run VBS files in Command prompt

In a beginner coding course that wants us to use command prompt to execute various types of files we created in notepad. I have run JavaScript and Python files, but whenever I try to run a VBS file I ...
Zach's user avatar
  • 11
0 votes
0 answers
137 views

vbs printing script problems

Hi all i got some problems with this vbs script set shApp = CreateObject("shell.application") currentPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".&...
asiawatcher's user avatar
0 votes
1 answer
3k views

how to copy folder\subfolder\files to program files directory with batch script inside the folder

:: BatchGotAdmin :------------------------------------- REM --> Check for permissions IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( >nul 2>&1 "%SYSTEMROOT%\SysWOW64\...
Gary Doman's user avatar

1
2 3 4 5
10