Automating the gMigrate Program

August 4th, 2009 by Roman Olynyk

Back in April 2009, I wrote about Getting Your GroupWise Calendar on an iPod Touch (a penny-pincher’s solution). This trick lets you use a free program called gMigrate to migrate your GroupWise calendar over to Google Sync (Beta), which in turn synchronizes your calendar with your iPhone or Touch. This synchronization process is entirely manual, however. You have to run gMigrate whenever you update your GroupWise calendar and want to have that information to appear on your iPhone. Well, that’s not entirely true any more. With a little bit of Windows tweaking, I can show you how to automate this process.

In a nutshell, we are going to use a freeware scripting language called AutoIt to run the gMigrate program for us, and then we are going to use the Windows Scheduled Tasks utility to automatically run the script.

AutoIt

AutoIt is a freeware scripting language, which can be used to automate the Windows graphical user interface. It will work on Windows 2000, XP, 2003, Vista, and Windows Server 2008. One of AutoIt’s cool features is a Windows Info monitor, which you use to determine the ID numbers of command buttons. Once you know those IDs you can write an AutoIt script that will execute a program and interact with it by clicking specific command buttons. In addition, you can also complile the script into an executable file.

The download page for AutoIt is here: http://www.autoitscript.com/autoit3/downloads.shtml.

Assuming that you have already configured your gMigrate with your GroupWise and GMail account information, here is a simple script that will run gMigrate and click the appropriate command buttons:

; gMigrate Automation by Roman Olynyk, 8/4/2009
Run ( “C:\Program Files\gMigrate\CompanionLink.exe”)
WinWaitActive(“gMigrate”, “”, 10)
ControlClick (“gMigrate”, “”, “[ID: 1881]“)
WinWaitActive ( “gMigrate”, “Completed Synchronization”, 20)
ControlClick (“gMigrate”, “”, “[ID: 2]“)
ControlClick (“gMigrate”, “”, “[ID: 1]“)

I saved my script with the name “automigrate.AU3.” Here’s what this script does:

  1. Comments begin with semi-colons
  2. The Run command needs the exact path. In this script I am using the default installation path for gMigrate. If your path is different, change it here.
  3. The WinWaitActive command will wait for up to 10 seconds for the dialog box titled “gMigrate” to appear.
  4. Once the dialog box appears, simulate a mouse click to the ” Migrate” command button (ID 1881).
  5. After clicking, wait for up to 20 seconds for the message “Completed Synchronization” to appear.
  6. When “Completed Synchronization” dialog appears, click the OK button (ID 2).
  7. Finally, clicking the OK button (ID 1) on the gMigrate dialog causes that program to close.

That’s it. This is a bare-bones script. A more careful programmer can add proper error handling routines to allow for instances where the gMigrate program might fail. Also, this script will run as a foreground task, as I have not added any commands to hide its operation from the user.

You can test out the script by right-clicking over the AU3 file and selecting “Run Script” from the top of the menu. Once you are satisfied with the operation, you can go to the Tools menu of the SciTE4AutoIt3 program editor and run the complile command, which will convert your script into an executable file.

In a separate posting, we’ll talk about how you can configure Scheduled Tasks in Windows to periodically run your migration script.


One Response

You can follow the comments for this article with the RSS 2.0 feed.

Why can’t the GroupWise password be “synched” with the MasterID? I know it is technically possible …

In order to query active directory you need to have the entire DN in the query. You need to query AD with the string: cn=bbobb, ou=users, dc=subdomain1, dc=subdomain2, dc=tld This would be accurate for bbobb living in OU users, and having a domain of subdomain1.subdomain2.tld.

What needs to be done to get this working correctly:

Create your external LDAP server entry by going to:
- consoleone
- select your domain
- Tools menu
- Groupwise System Operations menu
- LDAP Servers
- add a new one and put in: ip, ssl if u need it, and bind method
- select your post office from the available and move it over to the left, we are setting up ldap authentication only for this selected post office
- once finished continue on

Now we must tell the POA to use ldap authentication.

- select your POA object in consoleone
- properties
- cilck on groupwise drop down menu
- security
- change the level of security to high
- select to use ldap authentication
- don’t fill in the user name, since we are using bind we don’t need to
- click on servers and select the ldap server that you setup before

We are done there … but not done yet.

Now this is the unfortunate part, and I’m not sure how to get around it at this time. But now you need to go to your groupwise view in console one and:

- right click user
- properties
- go to groupwise tab
- go down to ldap authentication and enter the full distinguished name (DN), i.e. cn=bbobb, ou=users, dc=subdomain1, dc=subdomain2, dc=tld .

Hit apply, and wait for the email to be processed by the POA and the change has now been effective. Proceed to login and WOOT it works ;)

Now you say why even use AD when we have eDir just chillin here. Well, we happen to incorporate a bunch of applications which use AD to store information. By using AD for our authentication for groupwise we now have only ONE password for each user to remember without using password replication programs! Living in a world with Windows this seems the best way to go about things.

1    Dog Faced Boy August 25, 2009 9:15 am

Comments

Visitors are welcome to contribute feedback. Please be aware that comments are moderated and any post that goes against our terms of service is subject to removal.

Most Recent Post

Questionable Software and Programs

The following post will help you safeguard your computer from data loss or damage…

Spyware, Adware and Questionable Programs
by Ted Wiles, Outbound Manager for OIT Support Services
In the Outbound Support group, we see many programs that promote serious computer problems caused by spyware, adware, or viruses. While every effort is made to keep these programs off [...]

Content © Office of Information Technology Blog
Powered by WordPress
Log in

Entries (RSS)
Comments (RSS)

37 queries.
0.615 seconds.