Can't read/write Miscrosoft Account as trusted device

Discussions and Tech Support related to using the iMacros Component for .NET in your applications.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Can't read/write Miscrosoft Account as trusted device

by yoli on Thu Jun 01, 2017 8:32 pm

Hi,

I'm using iMacros.Component.dll(10.1.25.9792) to automate the login for "https://www.microsoft.com/licensing/servicecenter/Home.aspx"

One of the step is to check "I sign in frequently on this device. Don't ask me for a code". But unfortunately, the script only works in Windows 2008R2. It fails on Windows 2016 and Windows 2012 R2.

It seems in the failed scenario the process can't read/write the the cookie so that it can't remember user input.

I ran the executable as administrator and it's unlikely that I'll upgrade to a newer version of the iMacro component.


I'm calling the component from a .Net application with the code and the script like below:
Code: Select all
            string sMacro = MacroScript + "\r\nSAVEAS TYPE=HTM FOLDER=\"" + m_Dir.Replace(@"\", @"\\") + "\" FILE=\"" + Path.GetFileNameWithoutExtension(m_File) + ".htm\"";
            string sStart = "CODE: SET !TIMEOUT_MACRO " + m_WebRules.Timeout + "\r\n" +
                "SET !TIMEOUT_PAGE " + 60 + "\r\n" +
               "SET !TIMEOUT_STEP " + 60 + "\r\n";

            iim.Play(sStart + sMacro);
            while (iim.PlayerMode == PlaybackModes.Playing)
               System.Threading.Thread.Sleep(100);


TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.microsoft.com/licensing/servicecenter/Home.aspx
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=NAME:ctl00$ctl00$MainContent$BodyContent$signInButton
TAG POS=5 TYPE=DIV ATTR=TXT:Email,<SP>phone,<SP>or<SP>Skype
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:loginfmt CONTENT="user1"
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:idSIButton9
TAG POS=5 TYPE=DIV ATTR=TXT:Password
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:passwd CONTENT="user1 pwd"
WAIT SECONDS=5
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:idSIButton9
TAG POS=1 TYPE=A ATTR=TXT:View<SP>License<SP>Summary
TAG POS=1 TYPE=A ATTR=TXT:Download<SP>License<SP>Information
ONDOWNLOAD FOLDER={{downloaddir}} FILE=* WAIT=YES



Any ideas?
yoli
 
Posts: 12
Joined: Fri Jun 24, 2016 4:15 am

Re: Can't read/write Miscrosoft Account as trusted device

by chivracq on Sat Jun 03, 2017 6:45 pm

yoli wrote:Hi,

I'm using
Code: Select all
iMacros.Component.dll(10.1.25.9792)
to automate the login for
Code: Select all
"https://www.microsoft.com/licensing/servicecenter/Home.aspx"


One of the step is to check "I sign in frequently on this device. Don't ask me for a code". But unfortunately, the script only works in Windows 2008R2. It fails on Windows 2016 and Windows 2012 R2.

It seems in the failed scenario the process can't read/write the the cookie so that it can't remember user input.

I ran the executable as administrator and it's unlikely that I'll upgrade to a newer version of the iMacro component.


I'm calling the component from a .Net application with the code and the script like below:
Code: Select all
            string sMacro = MacroScript + "\r\nSAVEAS TYPE=HTM FOLDER=\"" + m_Dir.Replace(@"\", @"\\") + "\" FILE=\"" + Path.GetFileNameWithoutExtension(m_File) + ".htm\"";
            string sStart = "CODE: SET !TIMEOUT_MACRO " + m_WebRules.Timeout + "\r\n" +
                "SET !TIMEOUT_PAGE " + 60 + "\r\n" +
               "SET !TIMEOUT_STEP " + 60 + "\r\n";

            iim.Play(sStart + sMacro);
            while (iim.PlayerMode == PlaybackModes.Playing)
               System.Threading.Thread.Sleep(100);


Code: Select all
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.microsoft.com/licensing/servicecenter/Home.aspx
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=NAME:ctl00$ctl00$MainContent$BodyContent$signInButton
TAG POS=5 TYPE=DIV ATTR=TXT:Email,<SP>phone,<SP>or<SP>Skype
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:loginfmt CONTENT="user1"
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:idSIButton9
TAG POS=5 TYPE=DIV ATTR=TXT:Password
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:passwd CONTENT="user1 pwd"
WAIT SECONDS=5
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:idSIButton9
TAG POS=1 TYPE=A ATTR=TXT:View<SP>License<SP>Summary
TAG POS=1 TYPE=A ATTR=TXT:Download<SP>License<SP>Information
ONDOWNLOAD FOLDER={{downloaddir}} FILE=* WAIT=YES


Any ideas?

Sorry, can't really help you, I have never used the DOT.NET Component, but I need to send a Mail to TechSup this coming week (for other "things"... (Fake Users / Spammers to be banned, etc...)), and I will mention your Thread (+ a few others...) for them to have a look...! (Sorry, that's all I can do at this moment...)
Last edited by chivracq on Mon Jun 05, 2017 4:35 pm, edited 2 times in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6486
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Can't read/write Miscrosoft Account as trusted device

by yoli on Mon Jun 05, 2017 4:18 pm

any update?
yoli
 
Posts: 12
Joined: Fri Jun 24, 2016 4:15 am

Re: Can't read/write Miscrosoft Account as trusted device

by chivracq on Mon Jun 05, 2017 4:39 pm

yoli wrote:any update?

Nope, still WE with today as a Bank-Holiday in most Countries I think, and TechSup doesn't work on WE's I think, and I haven't therefore sent my Mail yet...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6486
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros Component for .NET

Who is online

Users browsing this forum: No registered users and 1 guest

-->