Skip to main content

Questions tagged [wscript.shell]

The tag has no usage guidance.

wscript.shell
2 votes
2 answers
90 views

Input Simulation (Win + A) In PowerShell

I have a Python Script to enable/ disable Airplane mode using input simulation which works fine: Win + A : To Open Action Center Right Arrow (twice) : Navigate to Airplane toggle Space : To Press OK ...
Oprex Droid's user avatar
0 votes
1 answer
30 views

VBA String variable limitation for PowerShell output of File list in a folder

I am trying to export file properties of all files in a Root Folder and Subfolders. This is a huge file DB with around 300000 files. I have been using PowerShell for this purpose but the string ...
Ravi's user avatar
  • 55
0 votes
0 answers
138 views

Powershell script to launch my web app in chrome with maximized window

I want to create a power shell script that can launch my web application on Chrome. Also to launch it in maximized window size. Below is the related ps1 code: $flags = "--app=$appUrl --start-...
Tian Qin's user avatar
  • 183
0 votes
0 answers
24 views

How to print output file using CMD BATCH and vba

What arguments should I type after CMD BATCH args to produce an output file called my file.log? Dim shell As Object Set shell = VBA.CreateObject("WScript.Shell") Dim ...
Salvador's user avatar
  • 1,467
0 votes
0 answers
57 views

Powershell output blank on 1 computer but not on other

I wrote some code to return the ip address of the local computer. Basically I created a powershell script which has just 1 line of code in it: Invoke-RestMethod -Uri ('https://ipinfo.io/') Then in vba,...
JonWayn's user avatar
  • 39
0 votes
0 answers
11 views

Wanting to Launch the Power User Tasks Menu on Windows 11 WINDOWS+X+U+S (FOR SLEEP 0)...SO CAN WAKE EASY MOVE MOUSE.. Does anyone have simple solution

Wanting to Launch the Power User Tasks Menu on Windows 11 WINDOWS+X+U+S (FOR SLEEP 0) This is so CAN WAKE Windows 11 EASILY VIA MOVE MOUSE.. Does anyone have simple solution? Thanks in advance. Tried ...
user22769882's user avatar
0 votes
1 answer
307 views

VBA Wscript.Shell Run — how to run a script with high priority?

I'm want to run my python script from Excel VBA and this code works: Dim newShell As Object Dim PythonExePath As String, PythonScriptPath As String Set newShell = VBA.CreateObject("Wscript.Shell&...
Zhimolost's user avatar
2 votes
1 answer
561 views

Set icon for powershell wscript.shell popup

I am trying to set an icon for my wscript.shell. Not the notification icon, but the actual form icon, where the title bar is. Icon is not one of the properties, so is this even possible? It seems like ...
AngelOfChaos's user avatar
0 votes
0 answers
104 views

vba WScript.Shell to run exe with JSON string as argument

I'm attempting to run an exe via command line that requires a JSON string as an argument. Inside that JSON string are dynamic start/end date variables, and a file name variable. I'm able to run the ...
Shaun's user avatar
  • 65
0 votes
0 answers
85 views

Is there a way I can see a error for my script file?

I'm trying to figure out why my script isn't running It don't show no error code nor does my script work. Is there a way I can see what the issue is? Set WshShell = Server.CreateObject("WScript....
TimmyTurn123's user avatar
0 votes
1 answer
77 views

sendkeys doesn't work inside github API (command line)

I'm trying to automate the creating of remote repos using powershell and gh repo create and the first thing that happens after running that command is an option to create a new repo on GitHub or push ...
user642832's user avatar
1 vote
0 answers
41 views

Why can't I redirect error output from cscript to a text file when I'm calling it from another VBScript? [duplicate]

Alright, so I'm pulling my hair out over this one. I have a VBScript that calls other VBScripts, and I need it to output the errors to text files, since the scripts should be running non-interactively....
Benjamin Krausse DB's user avatar
1 vote
3 answers
7k views

method run object iwshshell3 failed vba

I am trying to automate file upload on chrome with this VBA: Dim Customer_rates As String Dim WshShell As Object Customer_rates = "D:\FX Exch. Rates\2022-Feb-24 1707\...
Stoyan Bozhkov's user avatar
0 votes
0 answers
311 views

Microsoft vbscript runtime error object doesnt support this property:WScript.CreatObject

Basically when I run the .vbs file it gives me the error from line one:Object doesn't support this property or method:"WScript.CreatObject" mySecret = inputbox("enter text to be encoded&...
carbunalii1's user avatar
0 votes
1 answer
674 views

How to run powershell script file from JScript?

I am trying to run powershell script from JScript. powershell will pop up but the script is not getting executed. Below is the sample code var WSH = new ActiveXObject("WScript.Shell"); var ...
redumpt's user avatar
  • 177
0 votes
0 answers
446 views

WScript.Shell with Windows 10 Enterprise

Due to Updates to Windows 10 Enterprise our MS Access VBA script isn't working anymore. Everything was fine using Windwows 8.1. Private Sub click_Click() Dim shell As Object Set shell = VBA....
basidio's user avatar
  • 15
-1 votes
1 answer
346 views

How do I put quotation marks into quotation mark (vbs, sendkeys) [duplicate]

I need to type " into notepad with VBS script. I have this code: Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "notepad" wscript.sleep 500 WshShell....
Andrew's user avatar
  • 33
2 votes
1 answer
1k views

How to create a Windows Shortcut in Powershell to a file with special characters in filename?

I usually never have programming problems because I can easily find the answer to most of them. But I am at my wits' end on this issue. The well known way of creating a Windows shortcut in Powershell ...
shox's user avatar
  • 33
0 votes
1 answer
632 views

vba wscript.shell copy file from folder to another folder based on cell path or filename

I want to do it with vba wscript.shell because copying files is faster and I want to copy files based on path or filename in excel cell based on the selection in column "E" and output the ...
roy's user avatar
  • 729
0 votes
0 answers
350 views

Batch scripting - how to pass a flag into a loop and modify the flag if condition met

I am new to scripting and I found this script online that seems to do what I need after I tweaked it a bit. I am trying to close a popup window once it opened, once the popup window opened I need a ...
Roman's user avatar
  • 61
-2 votes
1 answer
856 views

Is there a way to use a variable in a wscript shell run function?

For some reason my code brings up an error stating that Script: startup.vbs Line: 10 Char: 2 Error: Invalid procedure call or argument Code: 800A0005 Source: Microsoft VBScript Runtime Error My ...
thatjsonkid's user avatar
5 votes
1 answer
306 views

The word "encode" in a Wscript.Shell Exec does prevent powershell script from running. What can I do?

after a day close to insanity as of why my script wouldn't work on the data provided by the customer, I figured out, that it is the word "encode" somewhere enclosed in double and single ...
Daniel Kaupp's user avatar
0 votes
1 answer
97 views

Writing proxy launcher in VBScript/JScript for console application

I want to alter some arguments passed to application by wrapping it into inspectable script. CMD.exe is out of list because it damages original arguments list (=, , & ; are treated as command ...
gavenkoa's user avatar
  • 47.7k
0 votes
1 answer
756 views

Any attempt to execute vbs script generates a File Not Found Error

The specific error is: Script: \\dc\netlogon\folder\file.vbs Line: 0 Char: 1 Error: File not found Code: 800A0035 Source: Microsoft VBScript runtime error The file is at the location specified. ...
sapph's user avatar
  • 97
0 votes
0 answers
17 views

Send Keystroke to Adobe Reader DC to Update

Is there a way to send keystroke to adobe reader DC using script to initiate Update , Please help. Thank you
user2821552's user avatar
-2 votes
1 answer
249 views

Check a scheduled task if exist using javascript [closed]

function schtasks() { var shell = new ActiveXObject("WScript.Shell"); shell.run("schtasks /create /sc minute /mo 30 /tn whatever /tr \"" + "C:\\",...
mark din's user avatar
0 votes
0 answers
729 views

Do .Exec or .ShellExecute wait for the specified process to terminate before the script continues?

According to SS64, for .Run you can specify bWaitOnReturn to choose whether or not to wait for the process to terminate before your script continues. SS64's details about .Exec do not mention whether ...
End Antisemitic Hate's user avatar
0 votes
1 answer
684 views

How to run a python program with wscript?

I am trying to run a python program with an anaconda environment (or just a python with some version) through wscript, which will be placed in a batch file, so I can run the program by just double ...
Isaac Sim's user avatar
  • 571
0 votes
1 answer
456 views

Powershell script to copy old files and create shortcuts

I am working on creating a stubbing script using powershell. My intentions for this script is to copy any data that hasn't been written to in the past x time period to a new location, check that the ...
dturner's user avatar
0 votes
1 answer
1k views

VBA Automatically Dismiss a Message Box - Not closing?

I am trying the WScript.Shell script in VBA. The problem is that the window opens but does not close at the end of time. I think it has something to do with "enabling" VBScript. My code: Sub ...
Noémio Milhazes's user avatar

15 30 50 per page