News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Writing good code for program installation

Started by Magnum, September 09, 2009, 11:08:14 AM

Previous topic - Next topic

Magnum

Since setting up my limited user acct., I sometimes forget that I can't install software in that account.

When trying to install on a limited user account, I get things such as can't initialize, can't write to the registry, etc.

Then later, I often have to do some extensive clean up.
Even Winzip 8.1 has some difficulties.

Is it that hard to determine if the program is running in a non-admin account?
I would like to learn and read up on how to determine that.

Thanks
Have a great day,
                         Andy

dedndave

i would think all you have to do is test a registry write/read
if it fails, it is probably due to access rights

Magnum

That may be a way.

But I was thinking about how an admin can assign rights to users.

But with registry changes having the potential to induce the "Oh crap, what did I do now!!",
I would not think that an admin could grant that right.

I will have to read up on it.

Take care,
                Andy
Have a great day,
                         Andy

Astro

Hi,

Isn't there a simple check of privledges? A quick Google suggests not...

The last example is what I had in mind - try and perform an admin-only function, and see if it fails:

http://vcfaq.mvps.org/sdk/21.htm

Best regards,
Astro.

Magnum

This site has some good info that I think answered my question.

When I get to the point when I want to write an installation program, I will properly check for errors, and gracefully bow out if there is a problem instead of "firing and forgetting" which is what quite a few installation programs do.

http://technet.microsoft.com/en-us/magazine/cc160944.aspx
Have a great day,
                         Andy