Validating MT plan on Vista
Hi Friedrich,
One more question on the MT plan.
The installers I use are set to requireAdmin. My program is
manifested asInvoker.
I write the MP key to HKCU when my customer enters it into the
program.
How do I read it from the elevated installer so I can validate it?
Best regards,
Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com
Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php
Re: Validating MT plan on Vista
Arnor,
My Installer is elevated and so is my app
The installer writes the mp and date to HKCU
The app reads it perfectly
The updater being also elevated reads it also perfectly
all elevated read same place
All should be fine for you except that the app cannot read it if asInvoker
so the best is to 'copy' within Installer to an ini.....in data path that
the exe can read
--
Thank you
Cordialement - Best regards
Jean-Pierre GUTSATZ
CGF
Data Management Center - A tool to let you Migrate Import Export Transfer
all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"
Re: Validating MT plan on Vista
Hi Arnór,
> One more question on the MT plan.
>
> The installers I use are set to requireAdmin. My program is
> manifested asInvoker.
>
> I write the MP key to HKCU when my customer enters it into the
> program.
>
> How do I read it from the elevated installer so I can validate it?
Well, let us assume, you start your "asInvoker" application elevated (Run as
administrator). How do you read the registry value from your elevated
application to validate the subscription <g> If you have a "Standard user"
account then you can't read the correct HKCU value from an elevated
application.
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
Re: Validating MT plan on Vista
Hi Friedrich,
>Well, let us assume, you start your "asInvoker" application elevated (Run as
>administrator). How do you read the registry value from your elevated
>application to validate the subscription <g> If you have a "Standard user"
>account then you can't read the correct HKCU value from an elevated
>application.
"How do I read it from the elevated installer so I can validate it?"
I'm looking for recommendations on ___how___ to actually do this. In
previous communication you suggested writing the MP to a registry
key??? Seems that that recommendation cannot work under Vista. I
feel like I'm on a wild goose chase where the target moves every time
I ask:(
Best regards,
Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com
Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php
Re: Validating MT plan on Vista
> "How do I read it from the elevated installer so I can validate it?"
>
> I'm looking for recommendations on ___how___ to actually do this. In
> previous communication you suggested writing the MP to a registry
> key??? Seems that that recommendation cannot work under Vista. I
> feel like I'm on a wild goose chase where the target moves every time
> I ask:(
Yes, writing the MP from the installer to the HKLM registry is no problem.
You can read that value from an elevated and unelevated application.
Did you tell us that you would like to update the maintenance key from your
own unelevated application?
Regards,
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
Re: Validating MT plan on Vista
This is what I answered to one of your questions on April 05, 2008 (what we
are doing in SetupBuilder).
---
BTW, what we do in our own SetupBuilder IDE is the following. The IDE opens
a Clarion dialog box where the customer can paste the maintenance plan.
After the verification process, the maintenance key is written to registry.
IMPORTANT: if the IDE is running elevated, it is written to a
HKEY_LOCAL_MACHINE key. If it is running unelevated, it is written to a
CURRENT_USER registry key. The web update installer package can handle this
scenario. It checks the HKEY_LOCAL_MACHINE key first to verify the
subscription. If it is valid, it continues with the installation. If it is
invalid, it checks the CURRENT_USER key. If this retrieved value is valid,
it continues - otherwise, the installation is aborted.
Of course, you can do whatever you want with the subscription key. Write it
to the registry, to an INI or ASCII text file, write it to a TPS, SQL, or
whatever database file.
---
Or are you referring to another "recommendation"?
Regards,
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
Re: Validating MT plan on Vista
Hi Friedrich,
>Did you tell us that you would like to update the maintenance key from your
>own unelevated application?
"The installers I use are set to requireAdmin. My program is
manifested asInvoker.
I write the MP key to HKCU when my customer enters it into the
program.
How do I read it from the elevated installer so I can validate it?"
Yes, I'm writing the MP key to the HKCU when the customer enters it in
to MY program.
From a thread last month:
Newsgroups: softvelocity.clarion.addons.setupbuilder
Subject: Re: Subscription keys
Date: 5 Apr 2008 14:02:00 -0500
"BTW, what we do in our own SetupBuilder IDE is the following. The
IDE opens a Clarion dialog box where the customer can paste the
maintenance plan. After the verification process, the maintenance key
is written to registry. IMPORTANT: if the IDE is running elevated, it
is written to a HKEY_LOCAL_MACHINE key. If it is running unelevated,
it is written to a CURRENT_USER registry key. The web update
installer package can handle this scenario. It checks the
HKEY_LOCAL_MACHINE key first to verify the subscription. If it is
valid, it continues with the installation. If it is
invalid, it checks the CURRENT_USER key. If this retrieved value is
valid, it continues - otherwise, the installation is aborted."
Does this apply to BOTH normal install and the Web update or just the
web update and does this scenario work under Vista WS2008?
As far as I can tell the WebUpdate must run elevated. My app does not
run elevated. Can the WebUpdate still read the HKCU keys under
Vista/WS2008? Can the normal install still read the HKCU keys under
Vista/WS2008? I was under the impression that an elevated program is
running under the admin account, not the user account and has a
different HKCU key and would therefor not find it.
Best regards,
Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com
Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php
Re: Validating MT plan on Vista
>>Did you tell us that you would like to update the maintenance key from
>>your
>>own unelevated application?
>
> "The installers I use are set to requireAdmin. My program is
> manifested asInvoker.
>
> I write the MP key to HKCU when my customer enters it into the
> program.
>
> How do I read it from the elevated installer so I can validate it?"
Yes, the above information is in your *new* message.
You made the following kind statement:
> I feel like I'm on a wild goose chase where the target moves every time I
> ask:(
What I mean is, did you tell it in your *previous* communication where I
suggested writing the MP to a registry?
Please note that I said (I think you are refering to this previous
communication)
> Of course, you can do whatever you want with the subscription key. Write
> it to the registry, to an INI or ASCII text file, write it to a TPS, SQL,
> or whatever database file.
> From a thread last month:
>
> Newsgroups: softvelocity.clarion.addons.setupbuilder
> Subject: Re: Subscription keys
> Date: 5 Apr 2008 14:02:00 -0500
>
>
> "BTW, what we do in our own SetupBuilder IDE is the following. The
> IDE opens a Clarion dialog box where the customer can paste the
> maintenance plan. After the verification process, the maintenance key
> is written to registry. IMPORTANT: if the IDE is running elevated, it
> is written to a HKEY_LOCAL_MACHINE key. If it is running unelevated,
> it is written to a CURRENT_USER registry key. The web update
> installer package can handle this scenario. It checks the
> HKEY_LOCAL_MACHINE key first to verify the subscription. If it is
> valid, it continues with the installation. If it is
> invalid, it checks the CURRENT_USER key. If this retrieved value is
> valid, it continues - otherwise, the installation is aborted."
>
> Does this apply to BOTH normal install and the Web update or just the
> web update and does this scenario work under Vista WS2008?
Yes, the above is completely correct. And yes, this scenario works for web
update, full install, and maintenance plan verification when running
elevated or unelevated. The SetupBuilder IDE (asInvoker) does this on all
Windows versions (including Vista and 2008).
Regards,
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
Re: Validating MT plan on Vista
Hi Friedrich,
>Yes, the above is completely correct. And yes, this scenario works for web
>update, full install, and maintenance plan verification when running
>elevated or unelevated. The SetupBuilder IDE (asInvoker) does this on all
>Windows versions (including Vista and 2008).
So the elevated installer CAN read from the user registry key?
This is really confusing<g> I had the firm believe after reading what
you have written over the years on Vista/WS2008 that an elevated
program (installer for example) could NOT reliably read/write HKCU
because when elevated it's supposed to be running under the admin
account.
I could put this in a file somewhere, but dealing with Vista/WS2008 it
seems that every folder I come up with for my program to write to
won't work for the installer or the other way around<g>
Sorry if I sound frustrated, I need a break;)
Best regards,
Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com
Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php
Re: Validating MT plan on Vista
Hi Arnór,
>>Yes, the above is completely correct. And yes, this scenario works for
>>web
>>update, full install, and maintenance plan verification when running
>>elevated or unelevated. The SetupBuilder IDE (asInvoker) does this on all
>>Windows versions (including Vista and 2008).
>
> So the elevated installer CAN read from the user registry key?
Yes, you CAN read from the HKCU registry key from an elevated application,
but there is a huge difference between the Administrator and Standard user
account. If you provide a "real" mixed-mode application (that works from
the Admin and Standard user account) then you have to take care of this
difference.
Let us assume, you are logged-in to the Administrator account and running an
application elevated. Your elevated application can write and read to/from
the HKCU key. The same application running unelevated will read/write the
same registry key. No problem.
-BUT- (there is always a -BUT-)
You are logged in as Standard User now and running the application elevated.
Please note that you have your own privat profile now. If you run the
application elevated and you read/write the HKCU key, then you read/write
the values from the Administrator account!!! Not from your Standard User
account!!! Completely different "locations". And if your application is
running unelevated and tries to read HKCU information from a key written by
an elevated application then you are accessing again completely different
locations.
> This is really confusing<g> I had the firm believe after reading what
> you have written over the years on Vista/WS2008 that an elevated
> program (installer for example) could NOT reliably read/write HKCU
> because when elevated it's supposed to be running under the admin
> account.
Well, and that is correct. That's why I wrote in our previous
communication:
---
> IMPORTANT: if the IDE is running elevated, it is written to a
> HKEY_LOCAL_MACHINE key. If it is running unelevated, it is
> written to a CURRENT_USER registry key.
---
> I could put this in a file somewhere, but dealing with Vista/WS2008 it
> seems that every folder I come up with for my program to write to
> won't work for the installer or the other way around<g>
>
> Sorry if I sound frustrated, I need a break;)
In fact, there is no difference between the installer and your application.
Why? Because if your user runs your application "as administrator" then it
is also running elevated and your own program gets access to the information
located in the Admin profile.
Do you see what I mean?
Friedrich