Questions tagged [wscript.shell]
63 questions
0
votes
1 answer
Use AppActivate to Save As
I'm working on a macro which will get PDF from SAP according to of invoice list which I will provide in column "A". This invoices will be saved in the given path "D6".
Public Declare PtrSafe Function GetActiveWindow Lib "user32" () As Long
Sub…

Lukas
- 3
- 3
0
votes
1 answer
Which user runs cmd on server where aspx file is located
We use an aspx webpage that has two variables in the link. Example:
aspxpage.aspx?argument1=arg1&argument2=arg2
the aspx calls a .cmd and passes the two arguments to it. The code is:
dim wshell
dim arg1
dim arg2
dim runcmd
arg1 =…

Sunfile
- 101
- 1
- 4
- 22
0
votes
1 answer
How to pass two arguments to cmd via wscript.shell
We use an aspx webpage that has two variables in the link. Example:
aspxpage.aspx?argument1=arg1&argument2=arg2
the aspx calls a .cmd and needs to pass the two arguments to it divided by a space. When I started working on this, no arguments were…

Sunfile
- 101
- 1
- 4
- 22
0
votes
0 answers
Run WScript.exe using VB.NET
I want to run .wsf script using VB.NET so I am using below code.
System.Diagnostics.Process.Start("WScript.exe", Chr(34) + scriptFilePath + Chr(34) + " " + argument)
It is not working if I call it from the code but If I use the same thing using cmd…

Jeeten Parmar
- 5,568
- 15
- 62
- 111
0
votes
0 answers
How can I run JavaScript on a network computer remotely?
I would like to remotely install IBM iAccess 1.1 on a network computer using PSexec to run the JS file. The problem with this is that the installation would be hung on some computers (wscript.exe would be stuck in Task Manager).
The installation…

Hexalogy
- 63
- 1
- 1
- 8
0
votes
1 answer
Running sqlite command inside of shell
I am trying to run sqlite3 from command prompt remotely through a jscript. I am using a shell to start the database and it does. However any commands after that do not work.
var oShell = WScript.CreateObject("WScript.Shell");
var ret =…

Brett Gonterman
- 1
- 1
0
votes
0 answers
How to run dot command with space in shell?
Using jScript to run a command line remotely. The first three commands work fine. It is not until i get to the dot command after I have opened the sqlite3 data base that it just stops executing. When I run .quit I either get
sqlite> .quit
The…

Brett Gonterman
- 1
- 1
0
votes
1 answer
How to file filter using wscript.shell when populating with Application.WorksheetFunction.Transpose(files)
Cannot determine the correct parameter to file filter with recursive wscript.shell.
Have tried to filter in Application.FileDialog, failed.
Have tried to include .txt extension following dir, failed, still retrieves all files in the recursive…

Tahor Sui Juris
- 131
- 1
- 12
0
votes
1 answer
How to Get the File Path from Clipboard in Windows Explorer?
I have tried getting the file path from Clipboard (copied file) in Windows Explorer.
I wrote:
Set Ws = CreateObject("WScript.Shell")
MsgBox Ws.ClipBoard
But it states error:
Error: Object doesn't support this property or method:…

Thompson
- 1,954
- 10
- 33
- 58
0
votes
0 answers
How to capture shell WScript Shell output from Excel VBA without using cmd?
I have used the various posts similar to this and come up with the following, but not sure why this doesn't work for me. I have a UserForm wherein I am trying to run a script and capture the output, including any errors. However, the console window…

D.prd
- 605
- 1
- 7
- 21
0
votes
1 answer
How to Maximize Screen from VBScript?
The web application that displays database information is much more readable in full-screen mode rather than a small window. Problem is, I cannot get the window to maximize from UFT/QTP.
I've tried running the browser object from Wscript.Shell, but…

William Humphries
- 541
- 1
- 10
- 21
0
votes
2 answers
How to use wscript.shell to ALT+Tab?
Is it possible to use wscript.shell to send an ALT+TAB ?
$wshell = New-Object -ComObject wscript.shell;
$wshell.SendKeys('\t')

leeand00
- 25,510
- 39
- 140
- 297
-1
votes
0 answers
VBS click popup button with text
I want to automatically click a button on a popup prompt that has multiple buttons. I cant find a script that selectively clicks a button when there are multiple buttons.
So lets say I have a Popup window with 3 buttons with text "One", "Two" and…

JakeUT
- 359
- 1
- 4
- 16
-1
votes
1 answer
How do I put quotation marks into quotation mark (vbs, sendkeys)
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.sendkeys "some "text""
But it shows an error.

Andrew
- 33
- 3
-1
votes
1 answer
Pywin32: win32api.SendMessage to a DOS box program not possible?
Is it possible to use win32api.SendMessage to send characters to a program which seems to be running in some sort of DOS box?
In my Windows Task Manager I see a process called ntvdm.exe (apparently that is the "Virtual DOS Machine"). It looks like…

Robert
- 432
- 1
- 4
- 15