"Phil Wilson" wrote:
> Some tools have IDE support for firing a custom action off a button, some
> don't. The internal mechanism is in the ControlEvent table for the form,
> where you'd add a DoAction event to the list things that happen when the
> Close button is clicked (which is probably just an EndDialog in your current
> setup).
now I tried this:
In table ControlEvent:
already present:
(FinishedForm,CloseButton,EndDialog,Return,1,1)
I added:
FinishedForm,CloseButton,DoAction,ExecuteDeviceUpdater,-,2
In table CustomAction:
ExecuteDeviceUpdater,210,_786C22ABA1A5409294157DEAB5FA3D40,-
(_786C22ABA1A5409294157DEAB5FA3D40 is the key in the field "file", table
"File" of the installed executable).
(210 means CustomAction type 18 + 192:
0 Immediate execution.
0 Always execute. Action may run twice if present in both sequence tables.
192 msidbCustomActionTypeAsync + msidbCustomActionTypeContinue
18 Custom Action Type 18 (EXE file that is installed with a product.)
Actually this should be enough, but after hitting the close button i get
an "error 2762".
Is there something I miss?
thanks for your answers
doc
>I added:
>FinishedForm,CloseButton,DoAction,ExecuteDeviceUpdater,-,2
>
>In table CustomAction:
>
>ExecuteDeviceUpdater,210,_786C22ABA1A5409294157DEAB5FA3D40,-
I suggest you try the following instead:
In table ControlEvent:
FinishedForm, CloseButton, DoAction, ExecuteDeviceUpdater, 1, 4
In table CustomAction:
ExecuteDeviceUpdater, 402, _786C22ABA1A5409294157DEAB5FA3D40,-
Type 402 means CustomAction type:210+192 (msidbCustomActionTypeAsync +
msidbCustomActionTypeContinue )
Good Luck!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! :C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
> Hi doc,
>
> >I added:
> >FinishedForm,CloseButton,DoAction,ExecuteDeviceUpdater,-,2
> >
> >In table CustomAction:
> >
> >ExecuteDeviceUpdater,210,_786C22ABA1A5409294157DEAB5FA3D40,-
>
> I suggest you try the following instead:
>
> In table ControlEvent:
> FinishedForm, CloseButton, DoAction, ExecuteDeviceUpdater, 1, 4
>
> In table CustomAction:
> ExecuteDeviceUpdater, 402, _786C22ABA1A5409294157DEAB5FA3D40,-
>
> Type 402 means CustomAction type:210+192 (msidbCustomActionTypeAsync +
> msidbCustomActionTypeContinue )
since it is a bitfield, the 192 is already in 210 (which is Custom Action 18
+ msidbCustomActionTypeAsync + msidbCustomActionTypeContinue).
The only difference is the Ordering 4 (against 2) but this helped. Anyway
the problem seems to be the same:
the device updater tries to open the driver via CreateFile() and seems not
to be allowed to, even it is (according to the docs) running in the users
context (Administrator/Poweruser). If I run it from the start menu it can
open the device but not of the MSI starts the process.
Are there any restrictions when the process is started from a custom action?
I call CreateFile() with SECURITY_ATTRIBUTES = NULL. May I have to get aquire
more priviledges?
thanks for any hints
doc
>Are there any restrictions when the process is started from a custom
> action? I call CreateFile() with SECURITY_ATTRIBUTES = NULL.
>May I have to get aquire more priviledges?
I have performed the test with a simple Win32 execute, it works well, so
the configuration of that custom action would be alright.
I am not very clear what's the application you want to invoke in your
package's custom action, I suggest you may try to start that process in a
script which I suggest in the previous thread(with some delay).
By the way, giving more privileges to your CreateFile() call may be a good
idea, but the MSI error you got doesn't mean a privilege problem...
Thanks!
> Hi doc,
>
> >Are there any restrictions when the process is started from a custom
> > action? I call CreateFile() with SECURITY_ATTRIBUTES = NULL.
> >May I have to get aquire more priviledges?
>
> I have performed the test with a simple Win32 execute, it works well, so
> the configuration of that custom action would be alright.
> I am not very clear what's the application you want to invoke in your
> package's custom action, I suggest you may try to start that process in a
> script which I suggest in the previous thread(with some delay).
>
> By the way, giving more privileges to your CreateFile() call may be a good
> idea, but the MSI error you got doesn't mean a privilege problem...
I have to apologize, I was looking at the wrong end. The problem is, that a
custom action does not set the working directory, just executing the binary.
The updater is a single executable that contains other files wrapped by a
"single executable packer", which delivers the hidden content only when the
current working directory is equal the executable directory... DOH!
So it didn't find the "payload" and disabled the functionality.
Sorry for the trouble I may caused.
thanks for your help
doc
Have a nice day!
How do you edit msi's in this way?
<schoe...@gmail.com> wrote in message
news:1127091822....@g47g2000cwa.googlegroups.com...