PDA

View Full Version : Files installation simultaneously in different locations.



havard
05-04-2004, 12:13 AM
I try to install program files into two folders. One part of them in Common Files another one in Program files. Because I have dependences between these files I get registration errors. Is there a way to solve this problem ?
Thank you.

jsimpson
05-05-2004, 03:11 PM
Why not call regsvr32 in OnMoved event?

You can specify each file in the order you need to eliminate registration errors.

havard
05-05-2004, 11:25 PM
I can't do it becouse some files from one location have depenedces from files from another locasion. So because at setup time path of the first folder haven't set in environment path yet, it's impossible to register some files such way.

jsimpson
05-06-2004, 08:27 AM
SendMessage will refresh Environment as called below

prototype BOOL USER.SendMessageTimeout(HWND, SHORT, SHORT, POINTER, SHORT, SHORT, POINTER);

#define HWND_BROADCAST 0xFFFF
#define WM_SETTINGCHANGE 0x001A

// Flush the NT registry to all applications.
szEnv = "Environment";
pEnv = &szEnv ;

SendMessage (HWND_BROADCAST, WM_SETTINGCHANGE, 0, pEnv );

havard
05-07-2004, 01:59 AM
Hi,
Thank you for your help.
I tried code given here, and also tried code with replaced
SendMessage (HWND_BROADCAST, WM_SETTINGCHANGE, 0, pEnv ); by

SendMessageTimeout (HWND_BROADCAST, WM_SETTINGCHANGE, 0, &szEnv , SMTO_ABORTIFHUNG, 5000, &dwReturnValue);
But it didnt help me. I tried to set a new variable refresh environment and then get it, but GetEnvVar function fails.
Coul you please verify if instructions given by you are complete.
Thank you.