Questions tagged [vbscript]
An interpreted scripting language developed by Microsoft that is modeled on Visual Basic
470
questions
1
vote
0
answers
33
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
36
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 &...
0
votes
1
answer
37
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?
0
votes
2
answers
29
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 ...
0
votes
1
answer
70
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
119
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 = ...
0
votes
1
answer
102
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
0
answers
132
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 ...
1
vote
1
answer
515
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
591
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
169
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 ...
0
votes
2
answers
223
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 ...
0
votes
0
answers
110
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("{...
2
votes
0
answers
742
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
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 ...
0
votes
1
answer
356
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 ...
0
votes
2
answers
135
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
0
answers
286
views
Microsoft VBScript Compilation Error. Code: 800a0400. Error: - Expected Statement
Error Screenshot
' ------------------------------------------------------------------------------------------------
' Perform all the SCCM Client Actions
' --------------------------------------------...
0
votes
1
answer
279
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
100
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
280
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
256
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
54
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
516
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 ...
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
198
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
0
answers
881
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....
0
votes
1
answer
607
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
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 ...
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 = ...
1
vote
0
answers
497
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("...
0
votes
0
answers
308
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 ...
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("%...
1
vote
1
answer
260
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 ...
1
vote
1
answer
599
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 ...
0
votes
1
answer
106
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) {
...
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 ...
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 ...
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?
1
vote
1
answer
556
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 ...
0
votes
2
answers
792
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 ...
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
-...
0
votes
1
answer
563
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 ...
1
vote
0
answers
200
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 ...
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.) ...
0
votes
1
answer
282
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 ...
1
vote
0
answers
512
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 ...
0
votes
0
answers
138
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(".&...