jander44 Posted July 7, 2007 Posted July 7, 2007 Any idea how to run a inf addOn from RunOnceEx?So far I have have extracted any cab files in the addOn into the same folder as the inf and tried running the following from a command line:rundll32 setupapi,InstallHinfSection DefaultInstall 128 setup.infWhich resulted in the following "Files needed" notification:I think I have narrowed it down to the [sourceDisksNames.x86] entry in the inf. By deleting any reference to the .cab the installer seems to load with no "files needed" notifications. This has not been tested on a new install though it works on a pre loaded OS.If any of the resident inf addOn makers have any suggestions, tips or tricks I would be greatly thankful.-Thanks in advance Quote
jander44 Posted July 7, 2007 Author Posted July 7, 2007 Can you post the inf fileThanks for taking a look at this. Any of you or kel's addons that are not dependant on the T13 stage can be used as an example.[Version]Signature=$Windows NT$[defaultinstall]OptionDesc ="PowerMenu Visual Enhancement"Tip ="PowerMenu"Modes =0,1,2,3CopyFiles =PowerMenu.copyADDReg =Start[Optional Components]PowerMenu[PowerMenu]OptionDesc ="PowerMenu Visual Enhancement"Tip ="PowerMenu"Modes =0,1,2,3CopyFiles =PowerMenu.copyADDReg =Start[uninstall]BeginPrompt = BeginUnInsPromptEndPrompt = EndUnInsPromptRunPreSetupCommands=Kill.PowerMenu:1DelFiles = PowerMenu.copyDelReg = StartDelDirs = folder.del[Kill.PowerMenu]taskkill.exe /IM PowerMenu.exe /F[folder.del]%16422%\%PowerMenu%[BeginUnInsPrompt]Prompt = %UninsQuest%Title = %UninsTitle%ButtonType = OKCANC[EndUnInsPrompt]Prompt = %UninsFinal%Title = %UninsTitle%[SourceDisksNames.x86]1="PowerMenu Files","PMenu.cab",,"i386"[DestinationDirs]PowerMenu.copy = 16422,"%PowerMenu%"[SourceDisksFiles]PowerMenu.exe=1PowerMenuHook.dll=1readme.htm=1[PowerMenu.copy]PowerMenu.exereadme.htmPowerMenuHook.dll[Start]HKLM,"%RemoveMe%\PowerMenu","Comments",0,"PowerMenu Visual Enhancement"HKLM,"%RemoveMe%\PowerMenu","DisplayName",0,"PowerMenu"HKLM,"%RemoveMe%\PowerMenu","DisplayIcon",0,"%16422%\%PowerMenu%\PowerMenu.exe"HKLM,"%RemoveMe%\PowerMenu","DisplayVersion",0,"1.5.1"HKLM,"%RemoveMe%\PowerMenu","NoModify",0x00010001,01,00,00,00HKLM,"%RemoveMe%\PowerMenu","NoRepair",0x00010001,01,00,00,00HKLM,"%RemoveMe%\PowerMenu","Publisher",0,"Thong Nguyen"HKLM,"%RemoveMe%\PowerMenu","UninstallString",0,"rundll32.exe advpack.dll,LaunchINFSection %17%\PowerMenu.inf,uninstall"HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","PowerMenu",0,"%16422%\%PowerMenu%\PowerMenu.exe"[Strings]PowerMenu = "Visual+\PowerMenu"RemoveMe = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"UninsTitle = "KelCorp addon uninstaller"UninsQuest = "Uninstall PowerMenu?"UninsFinal = "Uninstallation is now completed!." Quote
ricktendo Posted July 7, 2007 Posted July 7, 2007 Another question: Why do you want to install this during RunOnce when the regular way of integration is better?BTW removing the [sourceDisksNames.x86] and [sourceDisksFiles] sections will solve the problem Quote
jander44 Posted July 7, 2007 Author Posted July 7, 2007 Another question: Why do you want to install this during RunOnce when the regular way of integration is better?BTW removing the [sourceDisksNames.x86] and [sourceDisksFiles] sections will solve the problemI would like to be able to select a few inf addons during the runonce stage of integration using a installer tool. Some inf addons are set up and installed perfectly to my taste as well as they are very customizable. If I could package the inf's into a switchless installer I would, unfortunately I do not possess that knowledge at the time.I am surprised [sourceDisksFiles] is not needed. I will test and respond.Thanks Rick Quote
jander44 Posted July 7, 2007 Author Posted July 7, 2007 I would like to be able to select a few inf addons during the runonce stage of integration using a installer tool. Some inf addons are set up and installed perfectly to my taste as well as they are very customizable. If I could package the inf's into a switchless installer I would, unfortunately I do not possess that knowledge at the time.I am surprised [sourceDisksFiles] is not needed. I will test and respond.Thanks RickTest on running OS completed successfully. Will test install from runonceex. Quote
jander44 Posted July 7, 2007 Author Posted July 7, 2007 The following works if the path to the .inf is true.rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 C:\<FOLDER>\<FILENAME>.infHowever does anyone have any ideas how to run this code from within a temp folder? Quote
ricktendo Posted July 7, 2007 Posted July 7, 2007 Yea... This should do it. (not adding C:\PATH)rundll32 setupapi,InstallHinfSection DefaultInstall 128 setup.infIf you use WinRAR it can do this ya know, try adding this in your sfx commentTempModesetup=setup.infSilent=1Overwrite=1WinRAR will extract the files to a temp folder and use the defaultinstall section (it should show the progress bar) Quote
jander44 Posted July 8, 2007 Author Posted July 8, 2007 Yea... This should do it. (not adding C:\PATH)rundll32 setupapi,InstallHinfSection DefaultInstall 128 setup.infIf you use WinRAR it can do this ya know, try adding this in your sfx commentTempModesetup=setup.infSilent=1Overwrite=1WinRAR will extract the files to a temp folder and use the defaultinstall section (it should show the progress bar)I forgot about WinRAR! That worked like a charm. I did not test the rundll32 method yet as I accomplished what I was looking for in the WinRAR SFX method. If I try the other method down the road I will post my results. I really appreciate your help on this ricktendo64. 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.