Passing URL params to a standalone VBscript? - vbscript

Lets say in Internet Explorer you're calling the script, which resides on a network share via
file://///server/path/to/script.vbs
But that script has arguments. How to pass it those arguments? If this is not possible is there another Windows scripting language that supports this? Thanks

I know you ask to do this from Internet Explorer, but have you consider HTML Application (see Wikipedia) by renaming your web page from filename.html to filename.hta? That way your HTML page will run with full privileges and any SCRIPT you wish to embed in it will have full privileges.

Related

Is there a way to automate webpage login and download report?

Is there a way to automate a task a webpage login and download report maybe with power-automate or some other method?
open web page
enter any parameters.
click download button.
save download to local drive.
Thanks
Yes it is possible to automate it using Power Automate Desktop, you can take control of the browser, If the webpage structure remains the same and the login doesn't ask additional captcha except usual login and password fields.
You can configure the automation by
First opening the webpage using Browser Control in PAD(Power Automate Desktop)
Entering the username password can be automatically done with PAD (both should
be defined in the
automation)
Capture the web element using the action to click a button - either to
navigate the page or download something.
Can save the file into local system using PAD by usual browser download or mentioning separate path in the automation.
If you know how to code such as Python. Then Selenium,playwright,Clicknium would be a good choice. Clicknium should be the most simple one, but it can only run in Windows. In include a Recorder to identity the UI element and include APIs for click and set_text.
If you don't want to code, you can use RPA tools, such as power automate and UI path.

What can I do in order to fix my VBScript error?

So I decided to start learning VBScript coding language, but I had some issues with running it. Here is what I have done:
I made a code, specifically this code:
Picture of the source code in/of HTML and VBScript
I installed IE (internet explorer) since I saw that VBScript is only supported by IE.
The code I did wrote, I wrote it on notepad, saved the file, and gave the file extension: .vbs (file name was "test").
I right-clicked test.vbs, clicked Properties, changed "Open With" to Microsoft (R) Windows Based Script Host.
I ran the file.
This Error occurred: Picture of the Error window
So may I ask, what wrong did I do? or what is wrong? like did I personally do a mistake, or is it something like if Windows 10 does not support VBScript, or if VBScript is not supported anymore? I as well saw a thread of Microsoft saying that VBScript support will be stopped for Windows 7, 8; though I dont know the exact mistake I have done.
Thanks for the answers.
P.S. I as well tried the file in the extension .htm, but It did not work though I ran it on both firefox and IE.
I guess you misunderstood the "runs only in IE" part of VBScript. Yes, IE is the only browser that runs inline-VBScript in HTML files. But no, you don't need IE (or HTML, for that matter) to execute a simple VBScript (*.vbs) file.
You received that error, because the Windows Scripting Host doesn't "understand" HTML. Hence, it complains at line 1, column 1 about something it can't identify as VBScript.
Here's Microsoft's VBScript Primer.
For you classic Hello World! VBScript, simply paste this one line into a file...
MsgBox "...from the Scripting host with love!",, "Hello World..."
... and make sure (as you already did) that the file's extension is *.vbs. Then simply double-click to execute it.
VBScript in HTML is only supported by the Trident (MSHTML) browser engine used by Internet Explorer 10 and below and Microsoft HTML Applications (MSHTAs or HTAs). Your script failed to run as .VBS because it's not a VBScript file. It failed to run in IE because IE 11 and above only supports JavaScript.
In order to run your script, change the extension to .HTA. It will then work in Windows 7, 8, 10 and 11, and additionally allow for full access to the local computer's resources (files, registry keys, etc.).
If you really want to create a web page (to run from the Internet), use JavaScript instead of VBScript and save it as .HTM.

Windows send file to browser with the "Send to" shortcut

I would like to use the "Send to" menu of Windows to upload files to a server. There is a lot of solutions to achieve that like ftp but I need to use the default Web browser of the computer.
I wrote a simple test script that is able to:
Receive the files with their full path
Open the browser to a specific page
My questions are the following:
Is it possible to send and action/arguments to the browser that allows it to access to this files ? If yes how does it works and is it cross-browser ?
My only requierement is to use the browser to upload the files but I can use any kind of third party software to pass the files to the browser. So is there any way to do that with a java applet or something similar ?
Thank you for your time !

Expression Web: Shortcut doesn't point to an exe file, but I want to use it to edit

Problem: I have to support users who need to edit web pages. Some of these web pages exist only as textarea controls. Fortunately, there is a firefox plugin that allows the user to open the textarea in a default text editor. Unfortunately, this plugin requires you to point to the EXE file of the text editor you want to invoke.
This is a reasonable requirement, but ##$%^ Microsoft Expression Web is one of those applications whose shortcut .lnk file does not appear to point to a real EXE file. If there is an EXE file somewhere, it's hidden.
Question:
How can I locate the actual EXE file so people can configure Microsoft Expression web to be their editor of choice?
Update: I should have emphasized that I was looking for a way to automate this via script or batch file (hence the SO posting, in case anyone's "not-programming-related" spidey sense was tingling).
I found my executable in the following location:
C:\Program Files\Microsoft Expression\Web Designer\EXPRWD.EXE
I'm not sure if that gives you what you need, but you can always have your users (or programmatically) search for EXPRWD.EXE and go from there.

Web page download automation in vbscript

How would you automate logging into a website and downloading a page using vbscript?
Using the MSXML.XMLHTTP-object to first do a POST to login and then add the cookie-headers to a GET request.
As a quick and dirty solution, you could use a Shell object with SendKeys and Run as demonstrated here. These functions are quite powerful for those situations where you just can't the right object or library to use...
Well the script (given on link )works fine if you open the notepad and don't change the focus to other window.
If you change the focus above script doesn't work.

Resources