March 17, 2006

Vista Recording

Filed under: Vista — Marcus Tettmar @ 4:20 pm

Good news – we now have macro recording working nicely under Windows Vista. Macro Scheduler is able to run at the “asInvoker” level, marked as a “uiAccess” application, meaning it does not need to “elevate” and can interact with other processes – so any level of user can run it and record macros successfully.

The next challenge is to consider the scheduler service under Vista. At present admin privileges are required to start the scheduler service. Only administrators can install services anyway, so we will probably make the Macro Scheduler installer detect whether or not the user is an administrator and only install the services if the user has administrative privileges. However, Vista no longer even supports interactive services, which are needed for UI automation macros to work, so at this stage I’m not even sure if a Vista scheduler service is feasible or beneficial. In addition AutoLogon, if at all possible, will need completely re-engineering as the entire logon system changes in Vista. So we are currently looking at the feasibility of AutoLogon in Vista and how it might be achieved if it is even possible. Watch this space ….

Having used Vista for a while now, I can see the majority of users disabling User Account Control in Vista and going back to the old way of doing things – by running everything as Admin. Microsoft has done a lot of work to make Vista more secure, but the downside is the extra loops a user has to go through. For example – with a new Vista install (latest release) and no system changes – so an out-of-the-box install – I wanted to make a new directory in Windows Explorer. On doing so a box pops up saying “You aren’t allowed to do that, but do you want to do it anyway” (or something to that effect). So I click “yes”. Then another box pops up saying “Allow file control to run?”. So I click “yes”, again. So now I have a new folder called “New Folder”. Now, of course, as usual I want to rename it – I don’t want it called “New Folder”. So I hit F2. A box pops up saying “You’re not allowed to rename the folder, but do you want to do it anyway?”. So I click “yes”. Then another box says something like “Allow file control to run?”. So I click “Yes” again. Finally I can rename the folder. Phew! All that to create a new folder!? Four extra clicks! By disabling UAC and running as Admin I’d have none of that. Progress? I’m not so sure. What made Windows successful was it’s ease of use. But it is not known for being the most secure operating system. Perhaps you can have one but not the other. It seems that the more secure something is the less friendly it becomes to use, because by definition you need more controls and warnings. So it remains to be seen what happens when Vista rolls out. Perhaps by then they’d have made things simpler. If not I can see people switching off all that new technology that Microsoft have worked so hard on …

March 15, 2006

Alpine Air

Filed under: General — Marcus Tettmar @ 1:02 pm

Thought I’d share this image. This was the view I had on Monday morning from the Alps in the Portes du Soleil. I took Friday and Monday off for a long weekend snowboarding in the French and Swiss Alps. The conditions were the best I have seen in six years and we had four incredible days.

Vista Update

Filed under: Vista — Marcus Tettmar @ 12:30 pm

Some good news. I have had confirmation that Macro Scheduler will not have to run elevated at admin levels in order to set a journal hook and record macros. It will only have to be flagged as a “uiAccess” app which will allow it to record across other processes of the same security level. So a standard user will be allow to record standard processes, and an admin user will be able to record against standard and admin level processes.

That’s the theory. Unfortunately with the current Vista beta version it doesn’t actually work as described. But, hey, it’s still beta after all.

March 9, 2006

Macro Scheduler Success Story – ISBVI

Filed under: Success Stories, Uncategorized — Marcus Tettmar @ 6:48 am

By Jeff Frownfelter.

Background

My name is Jeff Frownfelter, and I am the Technology Coordinator for Indiana School for the Blind and Visually Impaired. I was employed here in 2003 for the purpose of deploying and supporting new technology for use by the students and faculty. I have worked in the IT field since 1985, supporting and managing within various types of organizations, including primarily Health Care and technology-related publications. My experience is balanced between technology and software development, although I started out as a hard-core programmer like many during the technology rush of the mid 80’s.

Established in 1847, The Indiana School for the Blind and Visually Impaired is accredited by state and national certifying organizations. The school, which has an enrollment of approximately 179 students, offers pre-school through high school programs and related services, free of charge on a residential or day school basis, to the young people of Indiana who are blind and visually impaired.

The school provides students with instruction in the same coursework required of all school-aged children in Indiana. Specialized classes include orientation and mobility, adaptive physical education, independent living skills, vocational education, music instruction, Braille and specially adapted computer technology. Also available are experiences and opportunities to participate in recreational activities, on and off campus jobs, band, chorus, piano, scouting, creative dance, and ham radio, as well as involvement in competitive speech, track and field, wrestling, cheerleading and swimming.

After graduation, students enter the work force or continue their education at colleges or technical schools. Graduates of ISBVI are involved in such careers as law, education, computer technology, business sales, manufacturing, supportive employment and health services.

The Challenge – Life Before Macro Scheduler

Software, networked computers, and other devices here must be accessible, suited for students with varying levels of vision and other conditions. Computers here are initially installed from an image, but they must quickly be customized to suit the special needs of individuals or groups in terms of software. Re-imaging to perform installs and updates does not work well here for that reason, as that type of process AND the wide ratio of support personnel to devices is too unmanageable and creates more disruption than what is simply accomplished through updates.

The challenge is that much of the specialized software used here does not support unattended / quiet / over-the-network installations. It was originally necessary to manually install the software at each workstation. This was a huge time burner of course.

The Solution – Life After Macro Scheduler

Using Macro Scheduler and its compiler, I have been able to produce scripts and executables that I can include OVER needy software installations. These executables are applied to the standard startup scripts, and they are able to execute without logging into the workstation. Some of these OVER-installs use Macro Scheduler’s robust scripting to go as far as validate a proper installation, re-stage a retry after reboot (if needed), and even enter the application after install in order to modify the defaults directly.

We are also using Macro Scheduler to help facilitate the transition of our email systems from Groupware to Microsoft Exchange. Scripts manage the changes that need to be made to the email profiles. We even have Macro Scheduler scripts which collect POP3 email, parse the emails, make changes to the headers and insert them into the new email system. These scripts are very powerful and extremely reliable and run without problems continuously for days on end.

The Benefits of Macro Scheduler

A good example of how Macro Scheduler makes a positive impact on time here … So many bridges that otherwise would have been difficult (or impossible) to build during a major deployment this past summer, involving numerous software updates / additions AND user assistance upon first-time use –- Within a few weeks, a temporary tech was able to complete the deployment on all of our workstations. Prior to the automation courtesy of Macro Scheduler, 2 extra months or sets of hands would have been necessary. Likewise, this possibly would have been the case when staff returned from summer break. Difficulties were anticipated to be far greater without Macro Scheduler. Processes and wizards created with Macro Scheduler helped many users self-start with email and other applications that were affected.

March 8, 2006

Macro Scheduler and Vista

Filed under: General, Macro Recorder, Vista — Marcus Tettmar @ 10:01 am

One of Microsoft’s main focuses with Vista is to improve security. A major problem with current versions of Windows is that to be productive you pretty much always need to be logged in as an Administrator. There are lots of day to day tasks that a regular user can’t do, but should be able to.

Because of this the vast majority of Windows users currently log in as administrators. This means they can do what they want, but since they are running everything with admin privs the system is effectively wide open. When you’re logged in as an administrator software can do pretty much anything, without your knowledge. Software that requires admin privileges will just run and perform admin tasks without warning you first. This leaves the system wide open to malware and we all know how easy it is for viruses and trojans to install themselves, and then run stealthily, leaving you with no idea of what they are doing. Problems with browser toolbars and plugins are rife. This is because with admin privileges they can install and do what they want.

To address this, Vista, by default, runs all applications with restricted standard user privileges, even if you are logged on as an administrator. By default if an application needs (or wants) administrator access it will attempt to “elevate” itself to admin level and Windows will ask you for confirmation before allowing it to run. So now whenever an admin task occurs, you get to know about it and decide whether to allow it or not. This in itself should pretty much wipe out problems with viruses, malware, spyware and adware etc. If a standard user tries to run something that requires admin privs the prompt will ask for an admin username and password. The benefit here is that an administrator doesn’t have to log off and back on again just to perform some admin task for a regular user.

What does this all mean for Macro Scheduler? Macro Scheduler’s macro recorder works by implementing what is known as a journal record hook. This hook monitors system wide events in order to record mouse and keyboard events and watch for windows to appear and disappear. I have been told by the User Account Control team at Microsoft, who are implementing the new security features, that applications that implement journal hooks may need to run at admin levels and manifest themselves as uiAccess apps. It hasn’t been confirmed yet exactly what the requirements are, but right now, in the current beta version of Vista, the only way to get Macro Scheduler to record a macro is to disable “run all apps as standard user” in UAC, so that all applications run with admin level rights. Clearly this is not an acceptable solution as it negates the whole purpose of Vista’s new security concept. The hope is that a uiAccess app will be allowed to implement a journal record hook and be able to record against apps with the same security rights. E.g. a standard user should be able to record against other standard level applications. Obviously only an admin user should be able to record against processes running with admin rights. However, there has been a suggestion that Macro Scheduler will have to run at admin levels in order to record at all. I am hoping this won’t be the case as it means only admin users would be able to record macros, where at present, anyone can. Clearly the UAC team still have some things to sort out as I am still waiting on concrete advice as to the correct solution.

Why has Microsoft changed the rules regarding journal record hooks? Well, unfortunately, these system wide hooks which monitor keyboard and mouse events, can be, and have been, used by malware to log passwords and generally implement keyloggers. And as I said earlier, because the majority of Windows users log in with administrative rights, and because up until now all applications would therefore run at admin levels, such malware could log keyboard entry without you even knowing about it. So the new UAC rules mean this can’t happen in Vista. But while I applaud Microsoft’s new rules to combat such malware, I feel it is important that they find a way to ensure legitimate implementers of these functions are not tarred with the same brush. Software like Macro Scheduler, which depend on these functions for valid uses, should not be made awkward to use by those that need to use it. So we’ll have to wait and see what the UAC guys figure out.

So stay tuned while we work with Microsoft on this. One thing is for sure though – by the time Vista ships at the end of the year we will have a fully Vista-ready version of Macro Scheduler.

March 6, 2006

Downloading and Parsing RSS Feeds

Filed under: Automation, Scripting — Marcus Tettmar @ 9:25 am

Probably the simplest way to parse XML, such as an RSS feed, is to use Microsoft’s MSXML object which is built into Windows. I wrote a very quick and dirty routine using MSXML2 to download and parse this blog’s RSS feed. All it does is put the title, link and content of each item into arrays. You can then get the data easily by querying the array. My example runs a VBScript function which populates the arrays and then some native MacroScript loops through the array showing the data in a message box, as a simple example. You will find my code on the forum, here.

March 3, 2006

No, I’ll pay!

Filed under: General — Marcus Tettmar @ 10:08 pm

I reckon you must be doing something right when an offer of a free upgrade is refused and the customer insists on paying! I’ve been helping Randy Bass out with a whole bunch of WebRecorder scripts. He was an early adopter of WebRecorder, and because of his intensive use, and the fact that he needed to use it with a large variety of different websites, many with complicated structures, it really gave WebRecorder a workout. Early on, this helped us identify a few bugs and areas for improvement and allowed us to test the software with a larger array of different website layouts and html objects, in real-world scenarios. It identified a need for a better tag extraction wizard for example, so that it was easier to extract data from the web page. So while Randy was getting loads of help from us with his script generation, we were getting invaluable testing and feedback which sped up the improvement process.

Randy was about to upgrade to Macro Scheduler 8.0, but as a thank you, I offered to waive the upgrade fee. I felt we owed him. His reply:

“OH NO!! I OWE YOU!!!! I consider you a friend now, and I would like to help support your business! Your help and assistance has been UNBELIEVABLE!”

Wow! Well, Randy, saying stuff like that does help support the business. Feedback like that is priceless. So you’ve got that free upgrade whether you like it or not! Let’s not turn this into one of those comical situations where you argue with your mother over who’s going to pay the restaurant bill (sorry, check, for you US readers)! 🙂

Origami – what is it?

Filed under: Web/Tech — Marcus Tettmar @ 3:18 pm

There’s a lot of hype at the moment over what Microsoft’s Origami device is going to be. As far as I can see so far it looks like it’s going to be a small handheld/tablet PC. Somehow I wonder if the device will live up to the expectations the hype is generating. Especially as the concept is nothing new. I’ve already got my eye on this little fellow: OQO Ultra PC. This solves the problem that most small computers have – the lack of a qwerty keyboard. I’m always answering emails on the move and I used to use a Pocket PC – but, what a nightmare without a real keyboard. So, recently I purchased this HP iPAQ hw6510 which has a small qwerty. It makes a real difference. It’s really good for answering emails, and even, despite the small screen, surfing the web – and it is a phone too – so I don’t need to carry around two devices. But because it is Windows Mobile I can’t run stuff like Macro Scheduler on it – which means I can’t test things out until I get back to a regular PC. So I’m now drooling over this OQO which runs full Windows XP Pro. It would let me put my whole office in my pocket. I wonder how the Origami will compare. Will it be worth the hype? Scoble thinks not:

“There’s no way this thing is going to be able to meet the expectations of the hype being placed on it.”

March 1, 2006

Thinking too much? Take a break!

Filed under: General — Marcus Tettmar @ 8:45 pm

How many times has this happened to you? You’re working on some code and everything seems right. It’s a really simple bit of code. But it doesn’t work. So you check it over again – it looks fine. You can’t understand why it won’t work. You check it over and over and you just can’t see the problem, but it’s jinxed. You start to think you must be going mad, and it gets really frustrating. You want to get this thing working so you keep staring at it but you just can’t see the problem. Eventually you just have to move on to something else, or it’s time to go pick your kids up and you just have to leave it. Next morning, you take a look at that code again, and you see the problem, right there, staring you in the face! Why didn’t you see it before? Or, worse, you ask someone else to take a look and they see the problem right away. Most annoying! I know it’s happened to me loads of times.

For example, we had a support call today where the customer was trying to run an exe with Macro Scheduler’s Run Program command. The script was throwing up an error saying it couldn’t run the file – error code 2 – which is file not found. “But the file is there – I’ve checked the path like a 100 times!” So support hooked up to the customer’s screen using that excellent BeamYourScreen.com service, took a look and saw the problem right away. The filename was wrong. Lots of groans and “Why didn’t I see that?” from the customer. Everyone had a laugh about it, and we were quite sympathetic – it happens to all of us.

When I’m working on a coding problem I hate to leave it. I get really stubborn and won’t stop until I’ve solved it. But if I were honest I’d probably accept that this is often counter-productive. Countless times I’ve been working late into the night, trying to get something to work, and I just can’t see what’s wrong. Finally I just have to give in and get some sleep. Then in the morning I solve the problem in 10 minutes.

Sometimes you just don’t see the wood for the trees, even though the problem is right there in front of you. Sometimes it’s because we’re tired and we need a break. But often I reckon we just think about it too much. The more you think about an issue the more your intuition is clouded.

So next time this happens to you, take a break, clear your mind, do something else, and then go back to the problem later. More often than not you’ll find you solve it straight away. The question is, will I heed my own advice next time it happens to me?

As an aside, I’m currently reading Malcolm Gladwell’s excellent book Blink. Blink is about rapid cognition – solving problems with the unconscious mind – thinking without thinking. I have a feeling there’s an element of that in solving programming puzzles – sometimes I reckon we can spend too long on problems. And with a clear mind we can often solve them immediately.