Page 1 of 1

before we order the product

Posted: Tue May 22, 2007 5:03 pm
by Jesús Vargas
We’re evaluating InstallAware but we have two problems we need to resolve before we order the product.

When using a “webbased” install the product creates everything just fine.
But if I remove a DLL (For example if I run: “Revsvr32 c:\\program files\\myapp\\x.dll /u”) which is part of the installation from the Registry the .msi does not repair or re-install it automatically.

Another issue I need to resolve is:
I need to check if a file (text file) exists on the hard drive; if so then I need to copy it to another location on the hard drive.
I tried to script it; I also tried to use Kernerl32.dll functions but without success.
Is there a way to do that?
Thanks

Posted: Tue May 22, 2007 5:37 pm
by CandiceJones
For self repair functionality, you should use advertised shortcuts and file types, so Windows Installer can be invoked and make repairs as necessary.

For your other issue, certainly this is possible; however without knowing what you tried, its hard to help you out.

Posted: Tue May 22, 2007 6:42 pm
by Jesús Vargas
Issue 1:

Yes; we use Advertised Shortcuts and file types.

Advertised Shortcut $SHORTCUTFOLDER$\\MyApp to $TARGETDIR$\\MyApp (unconditionally executes when target is installed)

Advertised Shortcut $DESKTOPDIR$\\MyApp to $TARGETDIR$\\MyApp (unconditionally executes when target is installed)

Advertised File Type MyAppName with extensions .DLL,.OCX,.CUR,.XLS,.TLB,.MANIFEST,.SQL and associate with program $TARGETDIR$\\MyApp (unconditionally executes when owner is installed)

Issue 2:

Set Variable ConfigINI to

This returns the file path if the file si located on drive C; but does not returna nything if the file is located on another drive, like D.

Find All Files in path \\Config.ini (include subfolders), write result into variable ConfigINI.

This code tells me which is the folder of the (windows\\system32)
If the file is found on drive C it returns:

c:\\delete\\config.ini

Get Folder Location System->System Directory into System Folder

I don’t know how to specify that the file has to be copied; the full path including the file name is the variable CofigINI

Copy Local Files $ConfigINI$\\ to $Folderdelsistema$\\Config.Ini


When calling a DLL I use the function Call DLL; how can I specify the parameters of the function.

The DLL I need to call is Kernerl32.DLL which is in the folder Windows\\system32\\kernel32.dll

Thanks.

Posted: Tue May 22, 2007 6:57 pm
by CandiceJones
Could you post the actual script? A little hard to follow from your existing post.

I guess the self-repair doesn't cover the manually unregistered DLL. Did you try removing the target of the shortcut and seeing what happens then?

Posted: Tue May 22, 2007 7:43 pm
by Jesús Vargas
Thanks.

File Attached:

Admincontrol.mpr

Posted: Wed May 23, 2007 12:30 pm
by Jesús Vargas
Tha attached file contains the script; hopefully You can halp me out.

File Attached:

Admincontrol.txt

Posted: Fri May 25, 2007 12:25 pm
by CandiceJones
I guess this is the relevant part of your source code?
Find All Files in path \\Empresas.ini (include subfolders), write result into variable EmpresasINI

Comment: Copy Local Files $EmpresasINI$\\ to $FolderdeProgramas$\\Empresas.Ini

MessageBox: Admincontrol Plus, Existe una version anterior de Admincontrol. $NEWLINE$Por favor desinstalela y reintente nuevamente.
Terminate Installation

Even if you hadn't commented out Copy Local Files, this approach wouldn't work because you aren't calling Apply Install. You can add an Apply Install, or a Call DLL Function command to directly copy.