Simulating Users with the RunAs Command

This is an update of a post that originally appeared on April 26, 2011.

One of the problems with writing applications, administering any network, or understanding system issues is to ensure that you see things from the user’s perspective. It doesn’t matter what your forte might be (programmer, administrator, DBA, manager, or the like), getting the user view of things is essential or your efforts are doomed to failure. Of course, this means seeing what the user sees. Anyone can run an application at the administrator level with good success, but the user level is another story because the user might not have access to resources or rights to perform tasks correctly.

Most knowledgeable users know that you can simulate an administrator by right clicking the application and choosing Run As Administrator from the context menu. In fact, if you Shift+Right Click the application, you’ll see an entry for Run As A Different User on the context menu that allows you to start the application as any user on the system. However, the GUI has limitations, including an inability to use this approach for batch testing of an application. In addition, this approach uses the RunAs command defaults, such as loading the user’s profile, which could cause the application to react differently than it does on the user’s system because it can’t find the resources it needs on your system.

A more practical approach is to use the RunAs command directly to get the job done. You can see some basic coverage of this command on page 480 of Windows Command-Line Administration Instant Reference. To gain a basic appreciation of how the user views things, simply type RunAs /User:UserName Command and press Enter (where UserName is the user’s fully qualified logon name including domain and Command is the command you wish to test). For example, if you want to see how Notepad works for user John, you’d type RunAs /User:John Notepad and press Enter. At this point, the RunAs command will ask for the user’s password. You’ll need to ask the user to enter it for you, but at that point, you can work with the application precisely as the user works with it.

Note that I highly recommend that you create test user accounts with the rights that real users have, rather than use a real user’s account for testing. Otherwise, if something goes wrong (and it usually does), you’ve damaged a real user’s account. Make sure you follow all of the usual policies to create this test user account and that you have as many test user accounts as needed to meet your organization’s needs.

Of course, many commands require that you provide command line arguments. In order to use command line arguments, you must enclose the entire command in double quotes. For example, if you want to open a file named Output.TXT located in the C:\MyDocs folder using Notepad and see it in precisely the same way that the user sees it, you’d type RunAs /User:John “Notepad C:\MyDocs\Output.TXT” and press Enter.

In some cases, you need to test the application using the users credentials, but find that the user’s profile gets in the way. The user’s system probably isn’t set up the same as your system, so you need your profile so that the system can find things on your machine and not on the user’s machine. In this case, you add the /NoProfile command line switch to use your profile. It’s a good idea to try the command with the user’s profile first, just to get things as close as you can to what the user sees. The default is to load the user’s profile, so you don’t have to do anything special to obtain this effect.

An entire group of users might experience a problem with an application. In this case, you don’t necessarily want to test with a particular user’s account, but with a specific trust level. You can see the trust levels setup on your system by typing RunAs /ShowTrustLevels and pressing Enter. To run an application using a trust level, use the /TrustLevel command line switch. For example, to open Output.TXT as a basic user, you’d type RunAs /TrustLevel:0x20000 “Notepad C:\MyDocs\Output.TXT” and press Enter. The basic trust levels are:

  • 0x40000 – System
  • 0x30000 – Administrator
  • 0x20000 – Basic User
  • 0x10000 – Untrusted User

Many people are experiencing problems using the /ShowTrustLevels and /TrustLevel command line switches with newer versions of Windows. The consensus seems to be that Microsoft has changed things with the introduction of UAC and that you’ll need to work with the new Elevation Power Toys to get the job done. You may also want to review the article PowerToys running with administrator permissions because it provides some insights that may be helpful in this case as well. I’d be interested in hearing about people’s experiences. Contact me at [email protected].

Using Tooltips on a Web Page

This is an update of a post that originally appeared on May 6, 2013.

Some developers focus on functionality, rather the usability, when designing their Web pages. The tradeoff is usually a bad one because users favor usability—they want things simple. One of the issues that I find most annoying on some sites is the lack of tooltips—little balloons that pop up and give you more information about a particular item. Adding tooltips requires little extra time, yet provides several important benefits to the end user:

  • Less experienced users obtain useful information for performing tasks such as filling out a form.
  • More experienced users obtain additional information about a given topic or the endpoint of a link.
  • Special needs users gain additional information required to make their screen readers functional.
  • Developers are reminded precisely why an object is included on the page in the first place.

In short, there are several good reasons to include tooltips. The only reason not to include them is that you feel they take too much time to add. If you find that you want additional information on making your site more accessible so that everyone can use it, check out another one of my books, Accessibility for Everybody: Understanding the Section 508 Accessibility Requirements. This book contains all of the information you’ll ever need to address every accessibility issue for any kind of application you want to create.

Accessibility is becoming more and more of a concern as the world’s population ages. In fact, everyone will eventually need some type of accessibility assistance if they live long enough. If you’re a developer, adding something as simple as tooltips to your pages can make them significantly easier to use. Users should request the addition of accessibility aids when sites lack them (and vote with their pocketbook when site owners refuse to add them). Let me know your thoughts about accessibility in general and tooltips in specific at [email protected].

Considering Perception in User Interface Design

This is an update of a post that originally appeared on January 24, 2014.

The original version of this article had humans seeing images in as little as 13 ms. Nothing much has really changed since then. I read a few articles recently that reminded me of a user interface design discussion I once had with a friend of mine. First, let’s discuss the articles:

  • The first, Everything we see is a mash-up of the brain’s last 15 seconds of visual information, says that humans can actually see something in as little as 15 ms. That short time frame provides the information the brain needs to target a point of visual focus.
  • The older second article, ‘Sixth Sense’ Can Be Explained by Science, explains how the sixth sense that many people relate as being supernatural in origin is actually explainable through scientific means. The brain detects a change-probably as a result of that 15 ms view-and informs the rest of the mind about it. However, the change hasn’t been targeted for closer inspection, so the viewer can’t articulate the change.
  • The third article, The silent “sixth” sense, is a more scientific and slightly modernized view of the second article. In short, you know the change is there, but you can’t say what has actually changed.

So, you might wonder what this has to do with website design. It turns out that you can use these facts to help focus user attention on specific locations on your site. Now, I’m not talking here about the use of subliminal perception, which is clearly illegal in many locations. Rather, it’s possible to do as a friend suggested in designing a site and change a small, but noticeable, element each time a page is reloaded. Of course, you need not reload the entire page. Technologies such as Asynchronous JavaScript And XML (AJAX) make it possible to reload just a single element as needed. (Of course, changing a single element in a desktop application is incredibly easy because nothing special is needed to do it.) The point of making this change is to cause the viewer to look harder at the element you most want them to focus on. It’s just another method for ensuring that the right area of a page or other user interface element gets viewed.

However, the articles also make for interesting thoughts about the whole issue of user interface design. Presentation is an important part of design. Your application must use good design principles to attract attention. However, these articles also present the idea of time as a factor in designing the user interface. For example, the order in which application elements load is important because the brain can perceive the difference. You might not consciously register that element A loaded some number of milliseconds sooner than element B, but subconsciously, element A attracts more attention because it registered first and your brain targeted it first. This essentially explains the difference between UX and UI, since the two are eternally intermingled in the world of development.

As science continues to probe the depths of perception, it helps developers come up with more effective ways in which to present information in a way that enhances the user experience and the benefit of any given application to the user. However, in order to make any user interface change effective, you must apply it consistently across the entire application and ensure that the technique isn’t used to an extreme. Choosing just one element per display (whether a page, window, or dialog box) to change is important. Otherwise, the effectiveness of the technique is diluted and the user might not notice it at all.

What is your take on the use of perception as a means of controlling the user interface? Do you feel that subtle techniques like the ones described in this post are helpful? Let me know your thoughts at [email protected].

Sending Comments on My Books

This is an update of a post that originally appeared on February 23, 2012.

I regularly receive a stack of e-mail about my books. Readers question everything and it makes me happy to see that they’re reviewing my books so closely. It means that I’m accomplishing my principle goal, helping you understand computers in every possible way so that you can be more productive and accomplish tasks with less effort. When I make something easier for someone and they tell me about it, the grin extends from one side of my face to another. It really makes my day.

Some readers are still asking me if it’s OK to send me comments. I definitely want to see any constructive comment that you have. Anything that helps me understand your needs better makes it possible for me to write better books. I really do want to hear from you. The main element that I need to obtain a usable comment is that it’s constructive. A comment that lacks details isn’t helpful because I’ve written so many books. Emotional comments without any substance are especially hard to deal with because they leave me wondering what you need from me. Here are some of the things you can do to create a constructive comment:

  • What is the title of the book you’re reading (be sure to include the edition number, which is usually right on the cover unless it’s a first edition)?
  • Are you using the downloadable source code if this is a programming book?
  • Did you install the recommended version of any required software using the instructions found in the book?
  • Which page contains the error (if you’re using Kindle or other electronic media, please provide a chapter number and section title as a minimum)?
  • What do you view as an error on that page?
  • How would you fix the error?
  • What sort of system are you running?
  • When did you encounter the problem?

The more information you provide, the easier it is for me to understand the issue and provide you with feedback. In many cases, I’ll upload the fix to my blog so that everyone can benefit from the response (so be sure you keep an eye on my blog for new entries). I work hard to ensure that my books are as error free as possible, but everyone makes mistakes. Also remember that sometimes mitigating factors, such as differences in software versions or anticipated hardware, make it appear that there is an error in the book when you’re really looking at a different in environment. Help me provide you with better books—send me comments!

There are a few things that I won’t do for you. I won’t help you pass an exam at school. Your learning experience is important to me, which means that I want you to continue your education by working through the instruction on your own. I also don’t provide free consulting. This means I won’t check the code that you created on your own for errors. In addition, if you don’t use the downloadable source, be sure to read Verifying Your Hand Typed Code for restrictions on the level of support that I provide. I’ll help you with any book-specific question, but I draw the line at that point. Let me know if you have any input or insights on my books at [email protected].

Book Reviews – Doing Your Part

This is an update of a post that originally appeared on October 4, 2013.

Readers contact me quite a lot about my books. On an average day, I receive around 65 reader e-mails about a wide range of book-related topics. Many of them are complimentary about my books and it’s hard to put down in words just how much I appreciate the positive feedback. Often, I’m humbled to think that people would take time to write.

There is another part to reader participation in books, however, and it doesn’t have anything to do with me—it has to do with other readers. When you read one of my books and find the information useful, it’s helpful to write a review about it so that others can know what to expect. I want to be sure that every reader who purchases one of my books is happy with that purchase and gets the most possible out of the book. The wording that the publisher’s marketing staff and I use to describe a book represents our viewpoint of that book and not necessarily the viewpoint of the reader. The only way that other readers will know how a book presents information from the reader perspective is for other readers to write reviews. A good review will tell:

  • What you liked about the book
  • How it met your needs
  • What it provides in the way of usable content
  • Whether you liked any intangibles, such as the author’s writing style
  • When you used the content to obtain a new job or learn a new skill
  • Who recommended the book to you

    The review should also present any negatives (obviously, I want to know about the flaws, too, so that I can correct them in the next edition of the book and also discuss them on my blog):

    • Did the book provide enough detailed procedures needed to accomplish a task?
    • Are significant technical flaws and why do you feel they’re an issue?
    • Are there enough graphics to augment the text and make it clearer?
    • Is the source code useful?

    Many reviewing venues, such as the one found on Amazon, also ask you to provide a rating for the book. You should rate the book based on your experience with other books and on how this particular book met your needs in learning a new topic. The kind of review to avoid writing is a rant or one that isn’t actually based on reading the whole book. As always, I’m here (at [email protected]) to answer any questions you have and many of your questions have appeared as blog posts when the situation warrants.

    So, just where do you make these reviews? The publishers sometimes provide a venue for expressing your opinion and you can certainly go to the publisher site to create such a review. I personally prefer to upload my reviews to Amazon because it’s a location that many people frequent to find out more about books. You can go to the site, click Write a Customer Review (near the bottom of the page), and then provide your viewpoint about the book.

    Thank you in advance for taking the time and effort required to write a review. I know it’s time consuming, but it’s an important task that only you can perform.

    Apathy, Sympathy, and Empathy in Books

    This is an update of a post that originally appeared on May 23, 2016.

    I’ve written more than a few times about the role that emotion plays in books, even technical books. Technical books such as Accessibility for Everybody: Understanding the Section 508 Accessibility Requirements and Machine Learning Security Principles are tough to write because they’re packed with emotion. The author not only must convey emotion and evoke emotions in the reader, but explore the emotion behind the writing. In this case, the author’s emotions may actually cause problems with the book content. The writing is tiring because the author experiences emotions in the creation of the text. The roller-coaster of emotions tends to take a toll. Three common emotions that authors experience in the writing of a book and that authors convey to the reader as part of communicating the content are apathy, sympathy, and empathy. These three emotions can play a significant role in the suitability of the book’s content in helping readers discover something new about the people they support, themselves, and even the author.

    It’s a mistake to feel apathy toward any technical topic. Writers need to consider the ramifications of the content and how it affects both the reader and the people that the reader serve. For example, during the writing of Artificial Intelligence for Dummies, 2nd Edition, Python for Data Science for Dummies, and Machine Learning for Dummies, 2nd Edition Luca and I discussed the potential issues that automation creates for the people who use it and those who are replaced by it in the job market. Considering how to approach automation in an ethical manner is essential to creating a positive view of the technology that helps people use it for good. Even though apathy is often associated with no emotion at all, people are emotional creatures and apathy often results in an arrogant or narcissistic attitude. Not caring about a topic isn’t an option.

    I once worked with an amazing technical editor who told me more than a few times that people don’t want my sympathy. When you look at sympathy in the dictionary, the result of having sympathy toward someone would seem positive, but after more than a few exercises to demonstrate the effects of sympathy on stakeholders with disabilities, I concluded that the technical editor was correct—no one wanted my sympathy. The reason is simple when you think about it. The connotation of sympathy is that you’re on the outside looking in and feel pity for the person struggling to complete a task. Sympathy makes the person who engages in it feel better, but does nothing for the intended recipient except make them feel worse. However, sympathy is still better than apathy because at least you have focused your attention on the person who benefits from the result of your writing efforts.

    Empathy is often introduced as a synonym of sympathy, but the connotation and effects of empathy are far different from sympathy. When you feel empathy and convey that emotion in your writing, you are on the inside, with the person you’re writing for, looking out. Putting yourself in the position of the people you want to help is potentially the hardest thing you can do and certainly the most tiring. However, it also does the most good.

    Empathy helps you understand that someone who loses a job to automation isn’t looking for a new career, the old one worked just fine. The future doesn’t look bright at all to them. Likewise, some with disabilities isn’t looking for a handout and they don’t want you to perform the task for them. They may, in fact, not feel as if they have a disability at all. It was the realization that using technology to create a level playing field so that the people I wanted to help could help themselves and feel empowered by their actions that opened new vistas for me. The experience has colored every book I’ve written since the first time I came to realize that empathy is the correct emotion to convey and my books all try to convey emotion in a manner that empowers, rather than saps, the strength the my reader and the people my reader serves.

    Obviously, a good author has more than three emotions. In fact, the toolbox of emotions that an author carries are nearly limitless and its wise to employ them all as needed. However, these three emotions have a particular role to play and are often misunderstood by authors. Let me know your thoughts on these three emotions or about emotions in general at [email protected].

    Contemplating the Future of Prosthetic Devices

    I keep up with the technology used to help people live fuller lives when they have a special need in as much as is possible. Of course, even if I devoted full time to the task, keeping up with every innovation would be impossible. Still, I try to find articles and other resources that go along with some of the concepts I originally discussed as part of Accessibility for Everybody: Understanding the Section 508 Accessibility Requirements. I recently read a Smithsonian article that helped me better understand precisely where prosthetic technology will be going in the future. Hugh Herr has turned a terrible life experience into something incredibly positive by creating prosthetic devices that work more like the flesh and blood counterparts they’re designed to replace.

    The technology described in the article is simply amazing. However, the article also underscores some of the underlying issues that anyone with a special need faces. People automatically think that anyone with a special need is somehow deficient or requires special treatment. Given the resources, training, and devices available today, most special needs people can live as if they don’t have a special need. In fact, as far as they’re concerned, they don’t have one. So, while the article does describe really cool technology and tells of the heroic battle fought by several people to live normal lives, it also tells of a society that just isn’t ready to understand how technology can level the playing field and what a desirable response to special needs people should be.

    Which brings me back to my book. When readers write me about my book, they often miss the point. Yes, my book is designed to help developers create really cool applications. It’s also designed to help people understand their legal and moral responsibilities in helping people with special needs. A few readers even get the idea that they’re likely to require special aids at some point in their lives. However, almost everyone misses the the point that I wrote my book to help people, all people, feel acceptance for who they are—no matter who they might be or what their requirements are.

    Forward thinking people like Hugh Herr really are important today because technology such as bionics have the potential to change how we view humans as a species. A recent MIT Technology Review article highlights where Dr. Herr is going and where he wants to take us. If he can realize his vision, the things we’ll be able to do boggles the imagination. More importantly, the loss of a limb will no longer be an impediment to doing anything at all. Perhaps the makers of The Six Million Dollar Man had it right all along.

    Where do you think we’re going with technology designed to overcome special needs in a way that makes them all but invisible? More importantly, what do you feel are the changes society needs to make with regard to treatment of special needs people? Let me know your thoughts at [email protected].

     

    Considering the Human Face of 3D Printing

    A lot of my posts discuss the technical side of issues such as 3D printing. They’re a clinical treatment of a technical topic—devoid of sentimentality. Of course, this is a natural outcome of the kind of writing that I do. Most of my books contain accessibility aids in them because I strongly believe in the power of the computer to level the playing field for those who need a little extra help to be productive. Some of the things I’ve seen during my career have just amazed me and I’m sure that I’d be even more amazed were I to see it all. However, the technology I present is often faceless and lacks that human touch that really is needed to convince people about the validity of using technology to make life easier for those around us. That’s why a recent Parade article, How 3-D Printing is Transforming Everything from Medicine to Manufacturing, struck such a chord with me.

    No longer is the technology faceless. You hear about how 3D printing has helped a real little girl live a normal life. The look on Anastasia Rivas’ face tells the whole story. It’s the same look that I’ve seen before when people’s lives are transformed by accessible technologies and it’s the same look that continues to drive me to cover accessibility in every book I write, in every way I possibly can. For me, technology isn’t about games or productivity software; it’s about making a difference in people’s lives—helping them do more with every asset they have. It’s the reason that I’d love to see fully secure, ultimately reliable, and easy to use software sometime in my lifetime, even though such a goal seems absurdly unrealistic today.

    The point of this post is that the software you develop has real implications for real people. There is a tendency by developers to view software as an abstraction—as something that simply exists. In fact, there is a tendency to view software simply as a means to an end, but software and the hardware it runs on is so much more. I usually leave out the specific “who” part of an article to help you better concentrate on the technology you’re using. However, after seeing the Parade article, I just had to say something about a specific person affected by the technology that we all use and create as developers.

    When you write software, make sure you consider the specific “who” of that software. Specifically who will use the application and what are the needs of that specific person? It’s a question we all need to answer despite the tendency to view software in the abstract. Let me know your thoughts about the human face of technology at [email protected].

     

    Death by Connected Device

    The title for this post is dramatic on purpose. In my book, Accessibility for Everybody: Understanding the Section 508 Accessibility Requirements, I describe all sorts of useful technologies for making the lives of those with special needs better. In fact, this particular book has received so much attention that I’ve expanded its coverage significantly by devoting forty (and counting) posts to it. The fact is that implanted devices will continue to be a part of our lives and their use will only increase, which is why articles, such as Cyber crime: First online murder will happen by end of year, warns US firm, have me more than a little concerned. The fact is that we’re all in line for a major wake-up call at some point if something isn’t done to secure the Supervisory Control and Data Acquisition (SCADA) systems we all rely on to connect devices to the Internet today. The hardware, software, and other functionality required to make everything happen is encapsulated in a technology known as the Internet of Things (IoT). Soon, everyone will know about IoT, but few people will know or understand the underlying SCADA systems that goes with it.

    The part of the articles that I’ve read so far that intrigues me most is that politicians and others in the know have been disconnecting themselves from the Internet. Note the mention of Dick Chaney disconnecting himself from the wireless part of his implanted device in the aforementioned article. If the devices and their connections were secured, our former vice president wouldn’t be quite so worried. Unfortunately, the rest of us probably won’t be quite so lucky unless we refuse to have the devices implanted at all (which would seem to be a self-defeating stance to take). I’ve actually been discussing this issue for quite some time now. The latest significant treatment of the topic appears in my An Update On Special Needs Device Hacking post. I’ve also broached the topic in Determining When Technology Hurts. The point is that this issue isn’t new, but we certainly haven’t done anything about it.

    Will it actually require a slew of front page news stories depicting people assassinated through their implanted devices for someone to get the idea that there are really awful people out there who would like to kill someone (anyone) with impunity? It seems to be the case. So, now we’re seeing stories about the event actually taking place sometime soon. Even if we don’t see someone killed, I can see a situation where people have money extorted from them by hackers who have gained illegal access to their implanted devices.

    I’m all for the advancement of technology that has significant potential to help people. I’ve written more than a few posts on the topic. Helping people to walk, see, hear, touch, and have generally better lives is a great idea in my book. However, the time is long past for securing these devices in a meaningful way so that only those who really need access will actually get it. Just why there hasn’t been any legislation regarding this need is beyond me. Our politicians are obviously aware of the problem and have done the work required to protect themselves, but they don’t see to be in much of a hurry to protect their constituents.

    Given what I’ve seen in the past, I’m sure the medical community won’t be in any hurry to secure these devices because security has been a legislated requirement in the past. With this in mind, what do you feel needs to happen with these devices to make them a better deal for those who need them? Let me know your thoughts about the lack of security for implanted devices and devices connected to IoT in general at [email protected].

     

    A Question of Balancing Robot Technologies

    The question of just how robots will affect us in the future consumes quite a bit of my time because I’m so interested in how they can be used for good. For example, robots are currently used to fight fires and to keep humans out of inhospitable environments. We also rely on robots to build some of the goods we enjoy and as a result, there are fewer assembly line accidents today than there were in the past (the quality of the output is also increasing). In the future, you can count on robot technology to help you remain independent, rather than ending up in a nursing home. There are even cars that rely on robots to drive them today and if things turn out as I expect, everyone will eventually use this sort of vehicle because robots will actually follow the traffic laws and reduce accidents as a result. In fact, it’s not too surprising to think that robots will appear in a lot of different situations that you don’t see them in today.

    Humans are afraid of change. So, I’m also not surprised to find reports online that range from robots stealing jobs to terminator type robots killing us all off in order to save us (as in I, Robot). The fact is that robots really are under our control and as long as we exercise even a modicum of judgement, things will remain that way. I’m not saying that we couldn’t create a terminator-style robot. Recent advances in chip technology make it quite possible that we could create such a robot, but it’s important to ask why we’d ever do such a thing. In order for a new robot to become successful, there has to be a commercial reason to develop it and no one is interested in creating a terminator to destroy the human race.

    What I think is more likely to happen is that robots will become companions to humans—devices that are both willing and able to take the risk out of human existence. The reduction of risk is an essential element in the robot/human relationship. We’ll continue to increase our use of robots as long as we can see a significant benefit to our personal lives. For example, it would be nice if we could eliminate the use of nursing homes altogether—that people could continue to live in their homes using robotic assistance. And, because those robots would be dedicated to the humans they serve, the standard of caregiving would increase dramatically. Of course, we have to get used to the idea of talking to a mechanical contrivance. Wait, we already do that—just consider how people interact with applications like Apple’s Siri.

    Of course, people are asking what humans will do in the future if robots take on all of the tasks we have them slated for. For better or worse, the human condition has been changing at an ever more rapid pace over the last several years. If you look at just one statistic, you’ll miss what I’m trying to say here. For example, humans now live to an average age of 80 in many areas of the world—the average age will only increase barring some major change. People have children later in life now and focus more on career during the early years. Schools focus on getting kids to college and the college courses are becoming more challenging. In short, the environment in which we live today will change significantly in the next 40 or 50 years—to the point that most people won’t recognize the future as being any part of the past.

    The change that has grabbed my attention most though is how much technology is now incorporated into humans (and the pace is only increasing). Yes, most of the technology currently does things like help people walk—it meets accessibility requirements. However, it’s only a matter of time before the technology will be used to help extend life and potentially make humans better adapted at excelling at tasks that we can’t even imagine now. So the question isn’t one of robots stealing jobs or killing us off terminator style, it’s one of understanding that humans are changing is a significant way and we’ll actually need robots to excel in the future. Let me know your thoughts about robots and our future at [email protected].