18,587 questions
0
votes
2
answers
59
views
Access the path of a file copied to clipboard in VBS [duplicate]
I need to read the path of (multiple) files that have been pasted to the clipboard (e.g. selected in Windows Explorer and copied).
When I paste this clipboard content into a command line, the path of ...
1
vote
1
answer
94
views
Can't get 7-zip to work via vbscript to calculate a CRC32 for a file with spaces in the filename
I'm in need to generate a CRC32 efficiently from within vbScript. I'm aware of doing this with CRC32 tables and so on, but this is very slow for large files. Therefore I'm using 7-zip.exe with option ...
-3
votes
0
answers
44
views
Running a vbs with cscript works fine, but when run with wscript it fails mid-script [closed]
Sample vbs script file.vbs:
Set shell = CreateObject("WScript.Shell")
shell.Run "notepad.exe", 1, False
wscript.sleep 500
shell.Run "notepad.exe", 1, False
wscript.sleep ...
2
votes
3
answers
151
views
Showing VBA macro output in a VBS script
I'm running a VBA macro through a VBS Script:
scriptDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
Set excel = CreateObject("Excel....
2
votes
1
answer
109
views
Create shortcut to batch file with "cmd /c" in VBScript?
I'm working on a VBScript to create a shortcut link to a batch file (the batch file downloads and launches a frontend Access database copy). The following code technically works but the shortcut link ...
0
votes
0
answers
98
views
vbScript to open multipe chrome windows and then tile them
I'm trying to open 4 separate chrome windows and then tile them on my screen when I double click a shortcut on my desktop.
this code works differently each time I run it. sometimes it works correctly,...
1
vote
1
answer
123
views
How to add a VBScript command that renames an Excel File with the previous workday's date to existing VBScript code [duplicate]
I already have a VBA string that is used by Task Scheduler to open a certain workbook "ORCA Refresh" every day. It refreshes all sheets then closes the document.
I need to add a command to ...
0
votes
1
answer
94
views
VBScript not setting variable inside If block [closed]
I'm working on a basic login check in VBS on Windows, just running from a .vbs file. I’ve been trying to set a loginSuccess flag based on a username check. It prints the welcome message correctly when ...
0
votes
1
answer
90
views
Moving files into folders based on their file name [closed]
I have been trying to figure out how to use VBScript to process files in a folder based on their names, create a couple of subfolders, and place the different files into the corresponding subfolders ...
0
votes
1
answer
91
views
VBS Script - Silent Command Line [closed]
Can Any one please help me out this. i can run this command but Message pops up 'Yes' or 'No' in Command line. How i can pass through this in command line silently. I need this to put in SCCM Task ...
0
votes
1
answer
70
views
No table to run vbs script to convert xlsx to tab delimited [duplicate]
I have a script that is supposed to convert xlsx files to tab delimited files in a folder. When I run it gives me a "excepted ')' at the following line by FileFormat
Call oWSH.SaveAs (oFile.Path &...
0
votes
2
answers
103
views
Retrieve only unique values from the string "20C:23B: 26G:67G:26G" using VBScript [duplicate]
I Have code delimited by ":" and I want to remove all the values that are appearing more than once and display only unique values.
This code is not giving me the right output.
strSourceBins=&...
0
votes
0
answers
73
views
VBS OpenText keeps returning an error message [duplicate]
I have this VBS code:
Dim txtFilePath
txtFilePath = WScript.Arguments(0)
Dim excelApp
Set excelApp = CreateObject("Excel.Application")
Dim workbook
Set workbook = excelApp.Workbooks....
0
votes
1
answer
36
views
Is there a character limit to encoded commands for VBS? [duplicate]
First of all I am a noob in terms of VBS. So of this question does not make sense, please bear with me.
I have created a PowerShell script that I wanted to be launched via .vbs file.
I have ...
-1
votes
1
answer
101
views
If Statement for VBScript is not Working. No Errors when executing script [closed]
I am trying to create a script that reads the contents of a file and reacts to certain error messages. So far everything is working as intended; however, I cannot get the 'If' statement to perform any ...