How to convert absolute paths to relative paths in .ini file?

 Adviant | Deluxe | 32bit ----------------------- Forms 

How to set up the relative path for Deluxe and Forms? Below is the .ini file. Adviant, Deluxe, 32bit and Forms represent folders in the illustration above


[Preferences] ConnectionPref=0 PartnerOffers=1 [UninstallInfo] ProgramFolder=Adviant Deluxe RegFolder=Adviant Deluxe InstDir=C:\Program Files\Adviant\Deluxe [EngineOptions] FormPath1=C:\Program Files\Adviant\Deluxe\Forms [Cache] Build=Yes 

The .ini file itself is inside 32bit folder

I tried the following and it did not work

InstDir=..\..\..\Deluxe FormPath1=..\..\Forms 

Very simple! The program worked with absolute path in the .ini file above. When I tried to convert absolute path to relative path, it said "Forms are missing, program cannot start".

I want to know how to convert the absolute paths to relative paths for portability.

The tricky part for me is that, the .ini file is in the 32bit folder and not in the main program folder which is Deluxe folder.

I hope this explanation clarifies thing a bit.

1

1 Answer

InstDir=../ FormPath1=../Forms/ 

That should fix it. Try it and let me know.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like