Kal Posted August 8, 2008 Posted August 8, 2008 (edited) Hi,I've tried to launch advpack.dll through Optional Components, like this:[Version]Signature=$Windows NT$[Optional Components]Unix[DefaultInstall]CopyFiles = InfFile.FilesRegisterDLLs = LaunchAdvancedInstall[Unix]RegisterDLLs = LaunchAdvancedInstall[LaunchAdvancedInstall]11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %1%\%MAIN_INF%,Install"[Install]OptionDesc = %UnixDisplayName%Tip = "Gnu Unix Utilities AddOn By Kal"Modes = 0,1,2,3RunPostSetupCommands = Unix.Add.Path:1CopyFiles = InfFile.FilesCopyFiles = Unix.Files,Wgetrc.FilesAddReg = Unix.AddRegBut it doesn't seem to work when it's installed with SYSOC. On a running windows, it works. Have I made a mistake ?Cheers,Kal Edited August 8, 2008 by Kal Quote
LUZR4LIFE Posted August 8, 2008 Posted August 8, 2008 (edited) The default install should be the same as the install, also you have 2 CopyFiles in the install.Try this.[Version]Signature=$Windows NT$[Optional Components]Unix[DefaultInstall]CopyFiles = Unix.Files,Wgetrc.FilesAddReg = Unix.AddRegRegisterDLLs = LaunchAdvancedInstall[Install]OptionDesc = %UnixDisplayName%Tip = "Gnu Unix Utilities AddOn By Kal"Modes = 0,1,2,3RunPostSetupCommands = Unix.Add.Path:1CopyFiles = Unix.Files,Wgetrc.FilesAddReg = Unix.AddRegRegisterDLLs = LaunchAdvancedInstall[Unix]RegisterDLLs = LaunchAdvancedInstall[LaunchAdvancedInstall]11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %1%\%MAIN_INF%,Install"It's been awhile for me but, give it a try. Edited August 8, 2008 by LUZR4LIFE Quote
ricktendo Posted August 8, 2008 Posted August 8, 2008 [Optional Components]OCSection[OCSection]OptionDesc=""Tip=""Run=Launch.PostInstall[Launch.PostInstall]CommandLine="rundll32.exe advpack.dll,LaunchINFSection INF_FILE.INF,NameOfSection"TickCount=500To fix yours just remove the %1%\ its not needed...only use that for manual installers not during setup, leave it with no path it will assume that INF is the default dirBTW what do you want to launch a installer during windows setup for? Quote
Kal Posted August 8, 2008 Author Posted August 8, 2008 Thanks Rick, your help is still appreciated I need to launch a program that I've just coded, to change path keeping %SystemDrive% value in it. It can also remove a directory from path. ; after installation[Unix.Add.Path]%11%\%UNIXPATH%\chgpath.exe add %%SystemRoot%%\System32\%UNIXPATH%; before uninstallation[Unix.Remove.Path]%11%\%UNIXPATH%\chgpath.exe remove %%SystemRoot%%\System32\%UNIXPATH%Thanks LUZR4LIFE for pointing my double CopyFiles Kal Quote
Kal Posted August 8, 2008 Author Posted August 8, 2008 (edited) I just realised some things keeping me from succesfully installing this inf with advpack.dll.If I run CopyFiles in the section executed by advpack.dll, like this : [Version]Signature=$Windows NT$[Optional Components]Unix[DefaultInstall]CopyFiles = InfFile.FilesRegisterDLLs = AdvancedInstall[unix]OptionDesc = %UnixDisplayName%Tip = "Gnu Unix Utilities AddOn By Kal"Modes = 0,1,2,3RegisterDLLs = AdvancedInstallOC[AdvancedInstall]11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %1%\%MAIN_INF%,Install"[AdvancedInstallOC]11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %MAIN_INF%,Install"[install]RunPostSetupCommands = Run.Add.Path:1CopyFiles = Unix.Files,Wgetrc.FilesAddReg = Unix.AddReg[sourceDisksNames.x86]1="Unix Files",%MAIN_CAB%,,"i386"That won't work during Windows installation. Indeed, it will look for cab file in %SystemRoot\Inf\i386 (from where INF is launched).So that's how it needs to be writted :[Version]Signature=$Windows NT$[Optional Components]Unix[DefaultInstall]CopyFiles = InfFile.FilesCopyFiles = Unix.Files,Wgetrc.FilesAddReg = Unix.AddRegRegisterDLLs = AdvancedInstall[unix]OptionDesc = %UnixDisplayName%Tip = "Gnu Unix Utilities AddOn By Kal"Modes = 0,1,2,3CopyFiles = Unix.Files,Wgetrc.FilesAddReg = Unix.AddRegRegisterDLLs = AdvancedInstallOC[AdvancedInstall]11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %1%\%MAIN_INF%,Install"[AdvancedInstallOC]11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %MAIN_INF%,Install"[install]RunPostSetupCommands = Run.Add.Path:1[sourceDisksNames.x86]1="Unix Files",%MAIN_CAB%,,"i386"Moreover, I just discovered that OptionDesc, Tip and Modes directives are only used by Option Components. So no need to put them in DefaultInstall. Edited August 8, 2008 by Kal Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.