kukris Posted August 16, 2006 Share Posted August 16, 2006 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 More sharing options...
mazin Posted August 16, 2006 Share Posted August 16, 2006 Here you go... Link to comment Share on other sites More sharing options...
kukris Posted August 17, 2006 Author Share Posted August 17, 2006 I thought that codes only work in inf files, but not in ini files???I'll try it anyway, thanks. Link to comment Share on other sites More sharing options...
Br4tt3 Posted August 17, 2006 Share Posted August 17, 2006 (edited) 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! Edited August 17, 2006 by Br4tt3 Link to comment Share on other sites More sharing options...
mazin Posted August 17, 2006 Share Posted August 17, 2006 (edited) 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.ISSThen, 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.000File=Response File[File Transfer]OverwriteReadOnly=NoToAll[DlgOrder]Dlg0=SdWelcome-0Count=5Dlg1=SdLicense-0Dlg2=SdAskDestPath-0Dlg3=SdSelectFolder-0Dlg4=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.2Result=1[Application]Name=Hex Workshop 4.2Version=4.23Company=BreakPointLang=0009[sdFinish-0]Result=1bOpt1=0bOpt2=0echo szDir=%SystemDrive%\Program Files\BreakPoint Software\Hex Workshop 4.2>%SystemDrive%\Install\HW423\SET02.ISScopy %SystemDrive%\Install\HW423\SET01.ISS+%SystemDrive%\Install\HW423\SET02.ISS+%SystemDrive%\Install\HW423\SET03.ISS %SystemDrive%\Install\HW423\SETUP.ISS >NULThis is the resulting SETUP.ISS:[installShield Silent]Version=v5.00.000File=Response File[File Transfer]OverwriteReadOnly=NoToAll[DlgOrder]Dlg0=SdWelcome-0Count=5Dlg1=SdLicense-0Dlg2=SdAskDestPath-0Dlg3=SdSelectFolder-0Dlg4=SdFinish-0[sdWelcome-0]Result=1[sdLicense-0]Result=1[sdAskDestPath-0]szDir=C:\Program Files\BreakPoint Software\Hex Workshop 4.2Result=1[sdSelectFolder-0]szFolder=Hex Workshop 4.2Result=1[Application]Name=Hex Workshop 4.2Version=4.23Company=BreakPointLang=0009[sdFinish-0]Result=1bOpt1=0bOpt2=0 Edited August 17, 2006 by mazin Link to comment Share on other sites More sharing options...
kukris Posted August 18, 2006 Author Share Posted August 18, 2006 @mazinThanks for your help that works great!@Br4tt3What's so funny about that name in Swedish? What does it sounds like? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now