Working with Microsoft Outlook using VBScript - vbscript

Trying to automate some things with Microsoft Outlook, but a login prompt is giving me troubles.
Dim objOL, outlook_NS
Set objOL = CreateObject("Outlook.Application")
Set outlook_NS = objOL.GetNamespace("MAPI")
outlook_NS.Logon "username#email.com", "password", False, True
This code here attempts to start Microsoft Outlook, but I get prompted with a Windows Security popup to enter my username and password. I thought the Logon was used for this purpose but it appears it's not. Anyone have any ideas?
I'm trying to log in on a Citrix server, so it's necessary to provide login information as it won't have a Default profile setup.
The prompt looks like this:
Update: I did some further testing and here's what I believe to be happening, the line
Set objOL = CreateObject("Outlook.Application")
Doesn't complete execution until we log in with that prompt. With that being said, I don't see a way we are going to be able to accomplish this because the prompt is created from that line of code, but once we hit that line of code we are stuck "in limbo" until either a timeout or we log in.

Firstly, Namespace.Logon takes the name of an existing profile, not an email address. One way or another, a profile must be created before you can use Outlook.

Related

How do you disabled saving logins in Firefox?

I read numerous posts on this topic. The steps are pretty clear, however it is not working for me. My PC is Ubuntu Linux and the Firefox version is: 88.0 64 bit. The first time I followed the steps I did find a list of saved logins, so I removed them all.
In the left column it says:
No logins found
When you save a password in Firefox, it will show up here.
Sounds optimistic. So next I return to a form requiring a login/password to sign in and if I click in the login field the list of logins is still there.
Curious - I took a look within the .mozilla/firefox folder and did a search for one of the unwanted logins:
% grep -rlw $unwanted_login *
It lead me to a file called: yxcdgn8u.default/cert9.db
or .mozilla/firefox/yxcdgn8u.default/cert9.db
and if I look through the file I can find the unwanted_login I searched and others I don't want saved.
I returned to Settings for Logins and Passwords.
about:preferences?entrypoint=menubar#privacy
Under Logins and Passwords none of the checkboxes are checked, same for Forms and Autofill. That tells me that Firefox should not be saving logins and passwords. Next I returned to a Login form and typed in a totally bogus login, zzzzzzzzzzzzzzzzzzzz#zzzzzzzzzzzzz.com and password. Of course it failed but the login now is found in the cert9.db file.
I visited Firefox, https://accounts.firefox.com, as recommeded but the new account option is disabled meaning that there is no way to a message to Firefox support.
Suggestions?

Setting up ErpQueryEndpoint Destination for VDM

I have created a destination for VDM called ErpQueryEndpoint and have unsuccessfully attempted to obtain business partner info with one of the java VDM tutorials. Below is an export of that destination - I've tried this with and without TrustAll = true. When I use the 'Check Connection' button on the Destination screen, I get "302: Redirect" instead of 200. When I attempt to navigate to the URL below from Chrome, it re-directs me to a non-SAP logon screen. (I believe our Basis team has tried to set-up SSO with Azure.) I'm wondering if this redirection is what is causing my java VDM program to fail.
#Password=<< Existing password/certificate removed on export >>
#
#Mon Mar 11 15:17:38 UTC 2019
Description=ErpQueryEndPoint for java programs that use Virtual Data Model (VDM)
Type=HTTP
Authentication=BasicAuthentication
Name=ErpQueryEndpoint
ProxyType=Internet
URL=https\://my######-api.s4hana.ondemand.com
User=S000#######
Thanks for your help. The tutorial program is now working. Getting a 302: Redirect when clicking 'Check Connection' was not the problem. Even though only the base URL was in the destination, I still needed to supply the credentials from the business partner communication arrangement. (It is also works for sales contracts when I supply the credentials from its respective communication arrangement.)

Mathematica: setting "SetDirectory" to a remote server?

How do I set "SetDirectory" to a remote server with Mathematica?
I have tried SetDirectory["//server/folder/"] but without success. I also tried putting "smb:" before the // but it doesn't work. I get:
SetDirectory::cdir: Cannot set current directory
Looked at the documentation, but could not find help. Any suggestion? The server is password protected. I was expecting a username/password pop-up window, and I wonder if it's possible to set that up.
Thanks
I found a better way: I leave the Mathematica notebook file within the remote directory instead. That way I only have to go through password protection once.

Google app script installable trigger using wrong permission on protected spreadsheet

According to Google's documentation regarding container-specific installable triggers, the trigger will "run as the user who installed the trigger, not as the user triggering the event."
This seems to mean that a trigger could update a protected sheet in Google Docs, because although the user may not be able to edit the protected sheet, the trigger could if it was installed by a user with write privileges.
To test this idea in the simplest way possible, I tried using an onOpen event that triggers a script that edits the value of a cell on a protected sheet. This was installed by a user that can edit the sheet. Although it works if the user opening the sheet has write access, it fails to update the sheet if the user does not.
Is this due to my misunderstanding of how it is supposed to work, or is it a bug? It seems like Google was pretty clear that the script runs with the authority of the user that uploaded the script.
It's a bug.
In March I [posted][1] on the old GAS forum about it. Anton Soradoi from Google replied to me privately by email because I was unable to share the spreadsheet publicly. I shared it with him and got this reply via email on Tue Apr 3rd:
"The issue you are running into appears to be a bug.
We are currently investigating it.
I will get back to you with more info once I have it."
I didn't raise an issue because they were already on the case but I haven't heard any more since.
it's interesting.
if you did this for onEdit, you would have to manually add a trigger to run "On Edit" and call onEdit function and it would run under your name whenever anybody edited something, but I think for onOpen it will run only if you are the user opening the spreadsheet, you can try.

Watin's LogonDialogHandler not working for Firefox 3.6

I'm writing automation scripts for a website using WatiN. when I browse to a particular url, a authentication dialog pops up. I have following code to handle the dialog. This code basically enters the specified
// Create a logon dialog handler
LogonDialogHandler ldh = new LogonDialogHandler(user, password);
browser.DialogWatcher.Add(ldh);
browser.GoTo("URL that pops up the authentication dialog");
Now this works just fine in IE. But in Firefox, the dialog appears and nothing happens after that. (No username or password entered in their text boxes)
Any idea what's going wrong here?
I'm sorry but the automation of firefox popups/dialogs is not supported by WatiN at this moment (WatiN 2.1 and lower). It probably can be done but this is not high on my priority list.

Resources