Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Cust. Act. Condition? - AdminUser vs NOT REINSTALL


4 replies to this topic

Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 04 March 2010 - 23:02

Hi there,

I'm testing my install on a Windows 7 machine and we do require admin rights to install. With that, there is no problem.

Now, when a standard user log in, some User registry keys and the like have to be 'repaired' or placed for that user. During this repair, I'm getting two Custom Action errors that I think are related to rights (both run in system context). During a repair, I don't really need these actions to run.

What I was thinking of doing for these Deferred Custom actions if certain properties are available... If possible could I condition with NOT REINSTALL or do I have access to AdminUser or Privileged. If so, which is the better method.

Or, if there is something better, please let me know.

Thanks!


VBScab

VBScab
  • Full Members
  • 436 posts

Posted 05 March 2010 - 13:14

The condition you want is 'NOT Installed'. Remember that case is important: "NOT INSTALLED" and "NOT installed" will be ignored.

I wouldn't worry about adding IsAdmin/AdminUser/Privileged: the place for that - if you use it - is at the very start of the install.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 05 March 2010 - 16:59

Thanks VBScab!

It appears you'll see my other post, but the action in question is also located in a NOT PATCH block.

I don't want it to run during a patch, but I don't want it to run during a repair install for a different user either. Will the NOT Installed condition meet that criteria.

Also, another quick question. I've been doing this 'MSI stuff' for quite a few years, but I really forget stuff I've learned and really only have to dig in on an as needed basis. Do you know of a good centralized place to really starting Learning the ins and outs of Windows Installer or is it best to just check out the help and Microsoft?

Thanks for your help!!

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 05 March 2010 - 19:26

Yup, 'NOT Installed' is what you want.

As for boning up, I normally recommend Phil Wilson's The Definitive Guide to Windows Installer which, IIRC, is available as a free download these days. Also, search Windows Live for John McFadyen's blogs. There's a wealth of stuff there.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 05 March 2010 - 23:10

OK, here's the next Custom Action question that somewhat relates...

Our app requires an Admin to install, but when a Standard User attempts to launch our app., Windows Installer repair is initiated to write some HKCU keys, etc.

What I need to do is, during this repair as a Standard User, kill the app that was initiated to start the repair and restart it.

First, I'm wondering if I'm going to be able to do this in User Context and also, what is the best method for doing so (.dll, .exe, etc.)?

In this case, would I use REINSTALL as the condition?

Thanks in advance!!