The Artima Developer Community
Sponsored Link

.NET Buzz Forum
INI File Redirection When Running Non-Admin

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Peter G Provost

Posts: 849
Nickname: pprovost
Registered: Aug, 2003

Peter G Provost is a Solution Architect for Interlink Group in Denver, CO.
INI File Redirection When Running Non-Admin Posted: Dec 19, 2004 11:19 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Peter G Provost.
Original Post: INI File Redirection When Running Non-Admin
Feed Title: Peter Provost's Geek Noise
Feed URL: /error.aspx?aspxerrorpath=/Rss.aspx
Feed Description: Technology news, development articles, Microsoft .NET, and other stuff...
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Peter G Provost
Latest Posts From Peter Provost's Geek Noise

Advertisement

One of the things that I've noticed running non-admin is all the apps that work, but not always correctly. Two interesting ones that you may not have noticed are the Windows Calculator (calc.exe) and Character Map (charmap.exe).

In Calculator, the problem is that is forgets your current view. As a geek, one of the first things I do is to switch it into Scientific mode. But when you're running non-admin, it never seems to remember this and starts up again in Standard mode. Annoying, but if you aren't looking for it, you may not even notice. After all, you don't get any errors or warnings.

In Charmap there is a similar problem. Before, when running as admin, charmap would remember the last font you had selected in the dropdown list. But when runnning non-admin, it forgets and starts you off with Arial. Once again, you don't get any error messages or warnings, it just doesn't seem to remember.

The reason for both of these failures is that both apps persist their state information into the WIN.INI file. Yes, you heard me right, the Windows INI file. This is leftover from the old days of Windows 3.x. Since INI files are located in your Windows installation directory (typically C:\WINDOWS), the app can't write to them because your non-admin account doesn't have write privileges for files in that folder.

But thanks to the wonderful folks on the nonadmin alias (an internal list for discussing non-admin issues and techniques), I now know of a way around this problem. It turns our that since Windows NT, when the registry was introduced, we have had the ability to redirect INI files into the registry. (See Knowledge Base Article 102889 for the details of how this works.)

So, armed with this information, you can redirect those two apps into your HKEY_USERS registry hive with the following entry. (To use this copy-paste it into Notepad, save it with a .reg extension, and double click on it. You will have to be Admin to make this change!!!!)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\win.ini]
"SciCalc"="USR:Software\\Microsoft\\SciCalc"
"MSUCE"="#USR:Software\\Microsoft\\CharMap"

 Now playing: The Breeders - Drivin' on 9

Read: INI File Redirection When Running Non-Admin

Topic: An excellent article on extending Lithium Ion battery life Previous Topic   Next Topic Topic: Searching SPS using MSN Desktop Search

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use