cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kirann_hegde
Level 5

Exclusively locking a file in InstallScript function

I have a file in support directory which i need to lock exclusively for the time of the installation.The contents of this file should not be compromised with nor the file to be deleted.

I have not come across any function in Installscript yet which allows me to get an exclusive lock to a file.
The C runtime library does provide functions to accomplish the same. However when i try loading the C runtime library dll's using UseDll, i get the following runtime error:

R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.

I googled about the same and it suggests that the manifest files are missing. However even with the manifest files, i cannot get the runtime library msvcr90.dll to load.

Has anybody ever tried calling runtime library functions before?
Any help would be very much appreciated.
Labels (1)
0 Kudos
(4) Replies
GetExp
Level 6

Hope, instead of UseDLL try using CallDLL function since you can specify the function parameters too in this.
0 Kudos
kirann_hegde
Level 5

Thanks. That is something which i can try. However installshield 2009 recommends not using it. It recommends loading the dll using UseDll and then using the functions within it. So i was trying to load the msvr90.dll and use its functions.

Have you ever tried this approach?
0 Kudos
GetExp
Level 6

Yes I have created a custom DLL and tried to import the functions. That was created with InstallShield 11....
0 Kudos
kirann_hegde
Level 5

Actually what i meant was, have you ever tried loading the vc runtime dll using UseDll and tried consuming the functions in installscript?

What are the other options i could explore? I want to avoid exporting functions from an external dll(that would be my last resort)
0 Kudos