iiminit returns -1 on Windows 10

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

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.

iiminit returns -1 on Windows 10

by jwrana on Tue Jun 13, 2017 6:43 pm

Hi,

Windows 10
iMacros V6.85
Excel 2007 VBA

I'm trying get an Excel VBA project that uses iMacros scripting to work on a fresh copy of Windows 10.

iim = CreateObject("imacros")
iret = iim.iimInit("-kiosmode") // I've also tried other parameter variations... same result.

This bit of code will open a separate iMacros brower on the iimInit call but return a -1
Subsequent iim calls will fail with an error code -4.

I've tried disabling windows firewall and defender but still the same.

This code as written works on an old Windows 7 system I've been using for years and on a fresh install of Windows 7 on another newer machine.

Does anyone have any idea what I could try to get this to work on Windows 10?

(All my existing macros work inside an open imacros brower. I just need to get it up and running inside excel)

Thanks for any suggestions,
Jeff
jwrana
 
Posts: 9
Joined: Tue Jan 06, 2009 7:27 pm

Re: iiminit returns -1 on Windows 10

by chivracq on Wed Jun 14, 2017 10:39 am

jwrana wrote:Hi,

Code: Select all
Windows 10
iMacros V6.85
Excel 2007 VBA


I'm trying get an Excel VBA project that uses iMacros scripting to work on a fresh copy of Windows 10.

Code: Select all
iim = CreateObject("imacros")
iret = iim.iimInit("-kiosmode") // I've also tried other parameter variations... same result.


This bit of code will open a separate iMacros brower on the iimInit call but return a -1
Subsequent iim calls will fail with an error code -4.

I've tried disabling windows firewall and defender but still the same.

This code as written works on an old Windows 7 system I've been using for years and on a fresh install of Windows 7 on another newer machine.

Does anyone have any idea what I could try to get this to work on Windows 10?

(All my existing macros work inside an open imacros brower. I just need to get it up and running inside excel)

Thanks for any suggestions,
Jeff

Woaw...!, you are one of the oldest "Dinosaurs" on this Forum, ah-ah...!, from your Registration Date back in 2009, fiouffffff....! 8)
And still using iMB v6.85, ouf-ouf-ouf...!, I guess you are the only one, ah-ah...! I'm nearly surprised it still works/installs on Win10... :shock:

But yep, "RetCode=-1" on Win10 rings a bell, I think I remember we had a few Threads on the Forum about 2 years ago I think, when Win10 came out, and most Users were using iMB v10 at that time, and I think it only got "solved" with iMB v11 or maybe v11.5.
But from what I remember, the only "Pb" was the RetCode being incorrect (and Negative), 'iimInit()' and 'iimPlay()' and playing Scripts would still "work", the only Pb was if you were using that RetCode for some Conditional Logic in your Script..., if that's correct then you would need to adapt your Script to take this Change in Behaviour into account...
Reply from TechSupport if they notice this Thread will of course be that you have to update to v11.5 and that there is NO chance iMB v6.x will still get an Update, ah-ah...! (Even iMB v10 is not maintained anymore...)

A Workaround for you otherwise could be to run your Script(s) on Win10 from a VM (Virtual Machine) with Win7 on it...? :idea:

>>>

You never finished btw this older Thread of yours "a bit neatly" and useful for other Users with a Solution, even if it was a Duplicate of this other Thread of yours where you got the Solution... You should have posted the Solution as well in the first Thread, or at least a Link to the second Thread...
(I normally only help Users who handle all their Threads "correctly" with FCI mentioned and neat Follow-up and sharing the/their Solution...)
- (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: 6276
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iiminit returns -1 on Windows 10

by jwrana on Wed Jun 14, 2017 4:32 pm

Thank you for the quick response!

Yeah... I've been using V6 daily for years now and its starting to show its age (and mine... yikes!) I've been putting off an upgrade for the amount of work I figure it'll take to upgrade all my scripts and the chance it'll break my current system. (With an upgrade to Windows 10 I guess this has already started!)

In any event, I cannot get any scripting code to 'iimPlay' inside Excel VBA (they work fine in the imacros browser), therefore it's probably more than just a return code problem. Oh well. Plan B was to do exactly what you said and run my system inside a Win7 VM and hope that doesn't lead me on a wild goose chase. :(

Thanks,
Jeff

PS As for the old threads, I totally forgot I posted those. (The second 'duplicate' one was nearly two years after the first). In any event, I agree q/a forums would be much nicer if threads were 'cleaned up' after use. :)
jwrana
 
Posts: 9
Joined: Tue Jan 06, 2009 7:27 pm

Re: iiminit returns -1 on Windows 10

by chivracq on Wed Jun 14, 2017 6:37 pm

jwrana wrote:Thank you for the quick response!

Yeah... I've been using V6 daily for years now and its starting to show its age (and mine... yikes!) I've been putting off an upgrade for the amount of work I figure it'll take to upgrade all my scripts and the chance it'll break my current system. (With an upgrade to Windows 10 I guess this has already started!)

In any event, I cannot get any scripting code to 'iimPlay' inside Excel VBA (they work fine in the imacros browser), therefore it's probably more than just a return code problem. Oh well. Plan B was to do exactly what you said and run my system inside a Win7 VM and hope that doesn't lead me on a wild goose chase. :(

Thanks,
Jeff

PS As for the old threads, I totally forgot I posted those. (The second 'duplicate' one was nearly two years after the first). In any event, I agree q/a forums would be much nicer if threads were 'cleaned up' after use. :)

Hum..., I don't expect any "wild geese" for you on a Win7 VM, the only Issues I know of with a VM are related to the 'EVENT' Mode needing the Browser Window to have the Focus, but iMB v6 didn't know anything about the 'EVENT' Mode, hum, the 'CLICK X/Y' Mode could be impacted if you use it, but iMB has always been a bit "Focus"-proof with the '-tray' and '-kiosk' Modes...

Would be nice btw after you've tested on your Win7 VM if you can confirm that "it works"... :idea:

>>>

Don't be "ashamed" about your "old" Scripts, I still have "old' Scripts from about 10 years ago when I started to use iMacros (from v5.40 for FF I think), and they still work, and I still use a few (well once a year for some stupid Halloween Game, ah-ah...!), iMacros has always been very good with backward Compatibility, even Commands deprecated 8 or 5 years ago still work, I think only once I really had to modify a few Scripts for one Command that really got "completely" deprecated and dropped, and a few times for Commands that got broken in some Version, for which I each time found a Workaround, but making sure I could revert my Changes with some easy "Switch" at the beginning of my Macros or some easy "Find & Replace" would the Bug be repaired in some later Version...
And for my "Prod" Macros, I still use daily v8.8.2 for FF myself which is now 3 years old but still the most stable Version for FF ever and I only maintain an Env with the latest stable Version for FF (v8.9.7 + FF53 On Win10-x64) "for the Forum"...

>>>

Yep, saw your (never too) "late" Update after 8 years ah-ah...!, on the "Green Box" Thread, very good...! :D
Well, about cleaning up the Forum, yep for Duplicates which I try to prevent as much as possible, and I didn't really attention to the Dates for your 2 Threads as no FCI was mentioned and the standalone Thread about the Green Boxes still had a function as it was easier to find for sbd searching the Forum than the other one which didn't mention anything about "Green Boxes" in its Thread Title...
- (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: 6276
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iiminit returns -1 on Windows 10

by jwrana on Thu Jun 15, 2017 9:25 pm

So... I got a Windows 7 VM on my Windows 10 Surface Pro 4 computer up an running. Installed Excel 2007 and iMacros V6.85 and gave it a go. (Had one install issue where I had to check a compatibility property 'run as administrator' on the imacro.exe otherwise imacros would fail to start with a dll error?!?)

Guess what? I get the same -1 error code on iimInit and -4 on subsequent call to iimPlay... and this time the browser doesn't start up. As I expected, I am now on a goose chase! Not sure how wild its going to get! At least this offers some kind of insight that maybe this is not Win 10 specific. Any ideas would be helpful.

Thanks,
Jeff
jwrana
 
Posts: 9
Joined: Tue Jan 06, 2009 7:27 pm

Re: iiminit returns -1 on Windows 10

by chivracq on Fri Jun 16, 2017 10:19 am

jwrana wrote:So... I got a Windows 7 VM on my Windows 10 Surface Pro 4 computer up an running. Installed Excel 2007 and iMacros V6.85 and gave it a go. (Had one install issue where I had to check a compatibility property 'run as administrator' on the imacro.exe otherwise imacros would fail to start with a dll error?!?)

Guess what? I get the same -1 error code on iimInit and -4 on subsequent call to iimPlay... and this time the browser doesn't start up. As I expected, I am now on a goose chase! Not sure how wild its going to get! At least this offers some kind of insight that maybe this is not Win 10 specific. Any ideas would be helpful.

Thanks,
Jeff

Hum..., damned indeed...!
But hum, if you managed to get it to work on a fresh Win7 Install you mentioned in your OP, then I would expect it to work in a Win7 VM...
Not sure anymore if iMB v6.5 was still using an '.ini' File or the Registry but you might want to compare that Content for missing or different Entries..., License Key maybe...

Some other User opened as well a very similar Thread (using iMB v7.5.1), you might be able to help each other...:
- iimInit & iimOpen returning -1
- (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: 6276
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iiminit returns -1 on Windows 10

by jwrana on Mon Jun 19, 2017 9:21 am

I tried swapping .ini files with known working versions on other machines and still nothing. Thanks for the heads up about the other user having the 'same' issue. I hope they have better luck than me (and posts any potential solutions!). Lastly trying to think of any possible differences in install settings. I dunno.

Thanks,
Jeff
jwrana
 
Posts: 9
Joined: Tue Jan 06, 2009 7:27 pm


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 4 guests

-->