Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I am fairly new to VB scripting and need some urgent help with a issue. I have a .msi application which creates an .ini file in the user profile, say C:\Users\XYZ when launched for the first time after installation. This .ini file contains License server and port details, which are incorrect. I have a .ini file which has correct details and I want it to replace the incorrect .ini file in a way so that when the application is launched, it shows the correct license server details.

Note:- The application creates .ini file with incorrect license server details in the the user profile when launched for the firs time.

What I have tried:

I have tried using standard scripts for replacing the file, However all failed due to the fact that .ini file to be replaced is not created by the application until it is launched for the first time.
Posted
Comments
CHill60 7-Nov-17 8:32am    
You will get more help if you share the code that you are using to replace the file.
Is it the MSI application which is creating the ini file or the application that is being installed? Can you not amend either of them?
Vbs learner 7-Nov-17 8:41am    
Actually I have repackaged an exe into .msi file. The .msi installs the application and when the application is launched it creates the .ini file.

I have tried adding the correct .ini file to the .msi file, however when the application is launched it overwrites the correct file with a incorrect one.
Dave Kreskowiak 7-Nov-17 8:58am    
That's a problem in your .EXE code. It appears to be making the assumption that the .INI needs to be created on first run no matter what. It should have been coded to only create the .INI if it wasn't found.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900