Questions tagged [vbscript]

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

Filter by
Sorted by
Tagged with
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
2 votes
1 answer
44 views

How to automate vb script

I have this code: Sub NewYearData() Dim wb1 As Workbook, wb2 As Workbook Dim r1 As Range, r2 As Range Dim addy As String, sh As Worksheet Dim shName As String Set wb1 = ...
Domagoj Culinovic's user avatar
0 votes
1 answer
2k views

Use VBS To focus on a specific process without process title or PID

I have a VBScript that should work to focus a given process (taken from here): Dim ObjShell :Set ObjShell = CreateObject("Wscript.Shell") ObjShell.AppActivate("Notepad") But ...
A__'s user avatar
  • 317
0 votes
0 answers
185 views

Robocopy started hidden with vbs script not showing exit codes in Task Scheduler

Trying solutions here and here works fine, except in Task Scheduler Last run result always shows as The operation completed successfully. (0x0) instead of 0x2 or 0x3 without vbs: Is it possible to ...
lemeie's user avatar
  • 1
0 votes
1 answer
803 views

How do I make a text to speach vbs script [closed]

I'm trying to make a VBS file that will say what I type my original code didn't work at all what must I do sapi.voice create box sapi speak("Hello world")
user avatar
1 vote
1 answer
262 views

How can i append the source folder name to the file copied to another location in vbs?

I have a folder "Documents" with a lot of subfolders. There are files under these subfolders. My objective is to move the files to one folder location then at some point be able to move them ...
Coding Newbie's user avatar
1 vote
1 answer
1k views

How to get screen resolution and save it to a text file?

I found the following vbs script to get the screen resolution but I would like to save the result in a text file please help me Dim HTM, wWidth, wHeight Set HTM = CreateObject("htmlfile&...
frankell's user avatar
  • 608
0 votes
0 answers
137 views

How to delete this hotkey/keyboard-shortcut?

I've made a hotkey/keyboard-shortcut that does the same thing when you right-click on the desktop. My goal wasn't that at all. So I want to delete this hotkey, but I don't know how to. The hotkey is ...
stupidboy123's user avatar
0 votes
0 answers
483 views

Run a script with a different user credentials implemented

I have a VBS script that create folders and subfolders. dim filesys, newfolder, newfolderpath, number, address number=inputbox("Please enter the request number to create","Request ...
Alain's user avatar
  • 1
0 votes
3 answers
704 views

Need to create a .bat or .vbs to load at startup using Task Scheduler that shows me a message box asking OK/Cancel to a matter

I need to create a .vbs or .bat file to be used in a task of Windows 10 Task Scheduler (I know it works for .vbs files, dunno if with .bat files is the same). What I need is simple: I need to see a ...
SteveSimons's user avatar
2 votes
0 answers
2k views

How to get rid of "this script contains malicious content" error?

I've made a VB script for my startup procedure in Windows 10 that launches an executable. It uses the following structure: Dim Host Set Host = CreateObject("WScript.Shell") Host.Run "...
Nomenator's user avatar
  • 155
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 (...
Foad's user avatar
  • 626
-1 votes
1 answer
73 views

Improve the following VBScript share drive output to txt

I'm using the following VBScript to generate current share drive for users I would like to improve the efficiency of the MappedDrives.txt Now the output is like this H: (\\singsfile03\apps) I: (\\...
Eugene JONG's user avatar
2 votes
2 answers
11k views

How to tell what program is using Windows Based Script Host?

I regularly have Microsoft ® Windows Based Script Host (located at C:\Windows\SysWOW64\wscript.exe) popping in my Task Manager and using a lot of CPU. From my understanding this software is used by ...
Roméo Després's user avatar
1 vote
1 answer
484 views

RunOnce VBscript for new users who have not logged in is behaving in a way other than expected

I have a software application that I must deploy to the enterprise, and part of it relies on having the script run as the user's context. So my deployment script loops through all the HKU SIDs and ...
Joshua Parnell's user avatar
1 vote
1 answer
317 views

Received a possible malware .vbs on Skype and ran it [duplicate]

I received a vbs file on Skype from someone I thought I knew and against my best judgement I ran it. Can someone please tell me what it does? Here's the vbs file code - https://pastebin.com/HPA9DaP1 I ...
user3411901's user avatar
2 votes
3 answers
216 views

Batch File How to not print final space in a vbscript

I have a question about something I've been trying to figure out for at least a good hour. I have a batch file that creates a small VBS script so that I can do some complex calculations (well, at ...
Flaver-D's user avatar
  • 165
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 ...
Nick J's user avatar
  • 141
1 vote
1 answer
922 views

.bat/.vbs script runs manually, but not from task scheduler

I have set up a task in task manager that calls a single .bat file (which then calls a .vbs) to tackle 4 easy steps: .bat file: Step 1: Grabs a handful of .xlsx files from over the network and copies ...
edanowski's user avatar
3 votes
2 answers
1k views

On Startup this message pops up : "how do you want to open this .vbs file"

I got my laptop back from a friend who might have put a vb script to prank to me or something I deleted the script right away, but now how do you want to open this .vbs file message pops up every time ...
Kenny's user avatar
  • 31
2 votes
3 answers
1k views

Sort Large amount of files into equally sized folders (windows)

I have about 15000 zip files with a total size of just over 10 gb that need to be sorted into folders that should not exceed 200 mb. (none of the files are larger than 40 mb and most of them sub 1mb) ...
Niels Henrik's user avatar
2 votes
1 answer
283 views

command to open dialoge box

Running Windows 10 Pro here. I am using a simple script that acts as a shortcut to my Windows game controller configuration, but I always have to manually navigate to the 'properties' button in the ...
Kalamalka Kid's user avatar
2 votes
2 answers
2k views

How to run psexec minimized from a VB script (VBS)

When you do ... Set WshShell = CreateObject("WScript.Shell") Call WshShell.Run("psexec -u administrator -p pw1234 cmd /c ipconfig > C:\Output.txt", 2, True) ... you see for a short time the ...
Seeky's user avatar
  • 118
2 votes
0 answers
40 views

Is there a way to find out what's exactly executing the Windows Script Host? [duplicate]

So, long time ago I got a malware from a pendrive, it cloned a directoy on my system32 folder and attempted to do bitcoin mining on my pc. After that, every new pendrive connected to my pc would also ...
kevin miranda's user avatar
1 vote
0 answers
1k views

How to remove another debugger so that Visual Studio can debug script

So I messed up and installed a crappy scripting program to debug VBscript before I realized that it could be done with VS. So now, despite uninstalling the other debugger (seems it did not uninstall ...
Chris Torres's user avatar
2 votes
0 answers
136 views

Copy cell data from MS Word table to Excel based on value of cell

I have a rather large Word questionnaire. It has several similar irregular (meaning some rows have merged cells and some do not) tables in it. I need to read each table for 3 specific values and take ...
The Rev's user avatar
  • 21
1 vote
2 answers
1k views

Run VisualBasicScript from keyboard shortcut

I've written a bat file to execute a python script, and to avoid popping up of cmd, I'm calling it through a vbs script. Now I need to execute the python script through vbs script but using keyboard ...
Avinash's user avatar
  • 21
2 votes
1 answer
293 views

Recurring Message Box VbScript

I have a vbs file whose content is : MsgBox "some thing here",vbOkOnly,"some other thing" I have set it to run periodically using Windows Scheduler. It indeed is running periodically (which i ...
rooni's user avatar
  • 131
0 votes
0 answers
868 views

how to rename a folder in vbs script

I am trying achieve renaming outlook folder around 100+ windows 10 client using below vbs script and nothing happening except (Microsoft VBScript compilation error: Expected end of statement) . Can ...
Aariz's user avatar
  • 1
2 votes
1 answer
13k views

How to run VBS code in a batch file?

I know the cscript "filename.VBS" command, but I want to run VBS code within a batch file so I will not have to make a VBS file to do it. This is my VBS code: sub Loading do while brw.busy ...
user avatar
1 vote
1 answer
1k views

VBScript CopyHere Function Stalling

I have a script to extract the contents of a .zip folder that isn't working (code at bottom of post, for reference). I create a destination folder if it doesn't exist, then use CopyHere to move the ...
detroitwilly's user avatar
0 votes
0 answers
137 views

generating of sheets per class for Parent-Teacher Meetings

I have to create an Excel spreadsheet for Parent-Teacher Meetings. In the master sheet I will put two columns. The first column is for the name of the teacher, the second column is for the name of the ...
nicovon's user avatar
  • 21
-1 votes
1 answer
928 views

How to hide a VBScript in a Word

How can I hide a .vbs file in a document (Word, excel, etc.)? It should also be executed when I open the document. I tried it with the command 'copy' but it didn't execute the script.
the test user's user avatar
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 ...
Chuck's user avatar
  • 45
0 votes
2 answers
5k views

Changing wallpaper using VBS on Windows 10 doesn't work

So I've been trying to use a vbs file to change my desktop wallpaper on Windows 10. The vbs file contains: dim shell Set shell = WScript.CreateObject("WScript.Shell") wallpaper = "C:\Users\mypc\...
gabyarg25's user avatar
0 votes
1 answer
412 views

How to extract email:pass using batch or vbs? [duplicate]

I have a text file named file.txt which contains, [email protected]: [email protected]:password000 [email protected]: [email protected]:qwerty123 [email protected]: philip007@ymail....
Philip's user avatar
  • 686
0 votes
0 answers
373 views

Is it possible to kill the task through psexec command before it even gets chance to execute?

We have over 100 computers in our gaming network. We have deployed Deep Freeze Enterprise on our machines to control the customers' abuse of PCs. That is well taken care of, but there's another ...
Emperor's user avatar
0 votes
1 answer
4k views

remove mp4 metadata with script

I want to remove meta data from a bunch of MP4 video files. I would like to do this without remux as that would take a long time. I am opened to a batch/powershell/python/vbscript solution. I have ...
medic17's user avatar
  • 267
1 vote
1 answer
679 views

Is it possible to get a word count of a pdf from the console with MS word?

I often use MS Word to open .pdfs generated by latex just so I can get a quick accurate word count of the document as it is. But it seems like there should be a faster way of doing this if all I am ...
nmu's user avatar
  • 316
0 votes
0 answers
3k views

Open google chrome and change url with vbscript

I want to open chrome with a url. After 10 seconds, it needs to redirect to other url. Dim iURL Dim iURL2 Dim objShell iURL = "http://10.184.165.112/platform-gwt-war/" iURL2 = "http://10.184.165....
Kono's user avatar
  • 13
2 votes
1 answer
95 views

How I can delete all keys that cointain ProgramName?

How to delete all folders(path) that contain key with a name that contain "ProgramName1"? CCleaner and programs like that doesn't help. I google for bat,vbs scripts but they scan only ...
user1092194's user avatar
1 vote
0 answers
195 views

How to fill new tab form with vbscript on internet explorer?

I am using this vbscript to fill out a form: Option Explicit Dim objIE, ipf On Error Resume Next Const PAGE_LOADED = 4 Set objIE = CreateObject("InternetExplorer.Application") objIE.Navigate("https://...
loveman2019's user avatar
0 votes
0 answers
103 views

Why is VBScript slow when it comes to unzipping files?

I know that there are of course going to be some struggles. But I'd love to know what specifically makes it so much slower, compared to a JavaScript equivalent, or just using 7-Zip.
Andrew Larson's user avatar
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' ...
user avatar
0 votes
1 answer
227 views

Shutdown a domain client automatically through server

so this one here is from a noob, please bear with me. So I want to shut down the computers connected to my domain automatically everyday at 4:15 pm. Now I have been snooping around and have found out ...
Ibrahim's user avatar
1 vote
1 answer
102 views

7zip will only zip up certain files

I have a script for zipping up old files and deleting them. The script works fine in all other directories but one specific directory will not work. It will attempt to zip it up but end up only ...
techguy1029's user avatar
0 votes
0 answers
282 views

Disable display scaling on high DPI settings from a USB Stick Drive

My question is very similar to other requests for disabling high DPI settings but mine has a bit of a twist. I am using various USB stick drives to enact a script to 'reset' desktops to a certain ...
DKeeler's user avatar
0 votes
0 answers
149 views

Compiling thesis chapters in microsoft word

I am used to the Latex typesetting where in writing my thesis, I partitioned my thesis into the various chapters and in the end used the \include keyword to compile all my chapters into the master ...
stackuser's user avatar
  • 101
0 votes
2 answers
7k views

How do I make a vbs file delete other files

I have a junk folder that I download stuff to, and every once in a while, I want to clean up the folder by deleting certain files of a certain extension. How would I be able to do that?
Alexa's user avatar
  • 1
0 votes
1 answer
2k views

Refresh desktop after registry edit without restarting explorer.exe

I am editing the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell FoldersKey and DesktopValue. The new location does work intentionally once explorer has been restarted, ...
Amelia Magee's user avatar

1
2
3 4 5
10