Jump to content

%Systemdrive% or similiar for ini files?


 Share

Recommended Posts

Hi,

I have a ini file with a hardcoded setup destination like path=c:\bla. Is it possible to use variables like %systemdrive% for ini files? Or can I update ini files via a batch file?

I would really appreciate a solution for that

Link to comment
Share on other sites


I thought that codes only work in inf files, but not in ini files???

I'll try it anyway, thanks.

Sorry, could not resist the temptation... ur nick sounds really funny in swedish! :D

Edited by Br4tt3
Link to comment
Share on other sites

I thought that codes only work in inf files, but not in ini files???

I'll try it anyway, thanks.

Man, I'm sorry! I read it inf not ini.

Well, then you'd better use batch file. Here's an example.

--------------------------------------------------------------------------------------------

When I install Hex Workshop, I face a similar problem. I need to provide the absolute path where Hex Workshop should be installed.

I divide my SETUP.ISS into two parts: SET01.ISS and SET03.ISS

Then, I use a batch script to create SET02.ISS which contain the absolute path.

I, then, use the copy command to combine the three ISSs into a usable SETUP.ISS.

[installShield Silent]

Version=v5.00.000

File=Response File

[File Transfer]

OverwriteReadOnly=NoToAll

[DlgOrder]

Dlg0=SdWelcome-0

Count=5

Dlg1=SdLicense-0

Dlg2=SdAskDestPath-0

Dlg3=SdSelectFolder-0

Dlg4=SdFinish-0

[sdWelcome-0]

Result=1

[sdLicense-0]

Result=1

[sdAskDestPath-0]

----- This is a blank line (carriage return) -----

Result=1

[sdSelectFolder-0]

szFolder=Hex Workshop 4.2

Result=1

[Application]

Name=Hex Workshop 4.2

Version=4.23

Company=BreakPoint

Lang=0009

[sdFinish-0]

Result=1

bOpt1=0

bOpt2=0

echo szDir=%SystemDrive%\Program Files\BreakPoint Software\Hex Workshop 4.2>%SystemDrive%\Install\HW423\SET02.ISS

copy %SystemDrive%\Install\HW423\SET01.ISS+%SystemDrive%\Install\HW423\SET02.ISS+%SystemDrive%\Install\HW423\SET03.ISS %SystemDrive%\Install\HW423\SETUP.ISS >NUL

This is the resulting SETUP.ISS:

[installShield Silent]

Version=v5.00.000

File=Response File

[File Transfer]

OverwriteReadOnly=NoToAll

[DlgOrder]

Dlg0=SdWelcome-0

Count=5

Dlg1=SdLicense-0

Dlg2=SdAskDestPath-0

Dlg3=SdSelectFolder-0

Dlg4=SdFinish-0

[sdWelcome-0]

Result=1

[sdLicense-0]

Result=1

[sdAskDestPath-0]

szDir=C:\Program Files\BreakPoint Software\Hex Workshop 4.2

Result=1

[sdSelectFolder-0]

szFolder=Hex Workshop 4.2

Result=1

[Application]

Name=Hex Workshop 4.2

Version=4.23

Company=BreakPoint

Lang=0009

[sdFinish-0]

Result=1

bOpt1=0

bOpt2=0

Edited by mazin
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...