Jump to content

MCP

Member
  • Posts

    2
  • Joined

  • Donations

    0.00 USD 
  • Country

    Germany

About MCP

Profile Information

  • OS
    XP Pro x86

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MCP's Achievements

0

Reputation

  1. No waranty for any crashes or damages. Please be careful when you "play games" in your registry! Dear all, i know, this is a old topic. But i want to write my message here. Ok, for all who want to add shortcuts with inf script's, i have a working example here for you. It is a unattended script to install "poweroff 3.0.1.3" from Jorgen Bosman. This is my working code description for a Link. setup.ini, 001,,"""(LNK NAME)"",""""""(PATH TO FILE)"""" (PARAMETER)"","""""(ICON FILE)""""",(ICON INDEX),,""""""(START IN DIR)"""""",,""(LNK DESCRIPTION)""" setup.ini, 001,,"""Help"",""""""%11%\poweroff.exe"""" /?"","""""%11%\shell32.dll""""",23,,,,""Command line switches""" if you want to run the script form command prompt or .CMD/.BAT file you must go to the folder where the script is located. i.e.: CD "D:\Documents and Settings\admin\Desktop" "%SystemRoot%\System32\rundll32.exe" setupapi,InstallHinfSection DefaultInstall 132 .\poweroff.inf (This example is working on Windows XP Pro SP3 US) And here is the complete code with uninstall. [version] signature="$Windows NT$" AdvancedINF=2.5,%ADVPKPRMPT% [DefaultInstall] RequiredEngine=setupapi SmartReboot=I CheckAdminRights=1 AddReg=InstallReg [DefaultUnInstall] RequiredEngine=setupapi SmartReboot=I CheckAdminRights=1 AddReg=UnInstallReg [InstallReg] HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce\setup","%SoftName%" HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce\setup","Version: %VERSION%%REVISION%" HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce\setup","____________________________" HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce\setup","Install %SoftName% ...",0,"RunDll32.exe advpack.dll,LaunchINFSection %SoftFILE%, SoftInstall" [UnInstallReg] HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce\setup","%SoftName%" HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce\setup","Version: %VERSION%%REVISION%" HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce\setup","____________________________" HKLM,"Software\Microsoft\Windows\CurrentVersion\RunOnce\setup","Remove %SoftName% ...",0,"RunDll32.exe advpack.dll,LaunchINFSection %SoftFILE%, SoftUnInstall" [SoftInstall] Copyfiles=INFFILE,Progra01 AddReg=AddRegInst DelReg=DelRegInst UpdateInis=UpdateInisInst [SoftUnInstall] BeginPrompt=BeginPromptUnInstall EndPrompt=EndPromptUnInstall AddReg=AddRegRemove DelReg=DelRegRemove DelDirs=DelDirsRemove Delfiles=INFFILE,Progra01 UpdateInis=UpdateInisRemove [SourceDisksNames] 1="%SoftName% %VERSION%%REVISION%","poweroff.cab",0 [SourceDisksFiles] %SoftFILE%=1 poweroff.exe=1 [DestinationDirs] INFFILE=17 Progra01=11 [Progra01] poweroff.exe,,,2 [INFFILE] %SoftFILE%,,,2 [AddRegInst] ;Allow rename of protected files (i. e. NTLDR) HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager","AllowProtectedRenames",0x00010001,"0x00000001" ; HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%SoftName% %VERSION%",,0x00000000,"" HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%SoftName% %VERSION%","DisplayIcon",,"%11%\poweroff.exe,0" HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%SoftName% %VERSION%","DisplayName",,"%SoftName% %VERSION%%REVISION% (Remove only)" ;Section to create a Update Subfolder in "Add/Remove Programs" ;HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%SoftName% %VERSION%","ParentDisplayName",,"%ParentDisplayName%" ;HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%SoftName% %VERSION%","ParentKeyName",,"%ParentKeyName%" HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%SoftName% %VERSION%","DisplayVersion",,"%VERSION%%REVISION%" HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%SoftName% %VERSION%","Comments",,"%COMMENT%" HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%SoftName% %VERSION%","UninstallString",,"rundll32.exe setupapi,InstallHinfSection DefaultUnInstall 132 %17%\%SoftFILE%" ;Add Registry key on installation here ; [DelRegInst] HKCU,"Software\JoBo\Poweroff" ;HKCU,"Software\JoBo" ;(use it if you dont use any other JoBo software) [UpdateInisInst] setup.ini, progman.groups,,"001=%16407%\%SoftName%" setup.ini, 001,,"""%SoftName%"",""""""%11%\poweroff.exe"""""",,,,,,""%DESCRIPTION%""" setup.ini, 001,,"""Help"",""""""%11%\poweroff.exe"""" /?"","""""%11%\shell32.dll""""",23,,,,""Command line switches""" ;setup.ini, 001,,"""(LNK NAME)"",""""""(PATH TO FILE)"""" (PARAMETER)"","""""(ICON FILE)""""",(ICON INDEX),,""""""(START IN DIR)"""""",,""(LNK DESCRIPTION)""" ;Uninstallation [BeginPromptUnInstall] Prompt=%UNINSTASK% %SoftNAME% %VERSION%%REVISION%? ButtonType=YESNO Title=Warning !!!!!! [EndPromptUnInstall] Prompt=%SoftNAME% %UNINSTEND% [DelRegRemove] HKLM,"Software\Microsoft\Windows\CurrentVersion\Uninstall\%SoftName% %VERSION%" [AddRegRemove] [DelDirsRemove] [UpdateInisRemove] setup.ini, progman.groups,, "001=%16407%\%SoftName%" setup.ini, 001,,"""%SoftName%"" setup.ini, 001,,"""Help"" [Strings] SoftFILE="poweroff.INF" SoftName="Poweroff" VERSION="3.0.1.3" REVISION="" COMMENT="INF Script by 13/13" DESCRIPTION="Turn of computer local or remote" ParentDisplayName="Command line tools" ParentKeyName="CommandLineTools" UNINSTASK="Please check if you've removed all services from Poweroff! Do you want to uninstall" UNINSTEND="uninstallation is finished. ADVPKPRMPT = "Please install the new Advpack.dll Version 2.5 or above to run the installation!" [HELP] ;########## Help ; ; REG_SZ = 0x00000000 ; REG_MULTI_SZ = 0x00010000 ; REG_EXPAND_SZ = 0x00020000 ; REG_BINARY = 0x00000001 ; REG_DWORD = 0x00010001 ; REG_SZ_APPEND = 0x00010008 ; ; HKCR = HKEY_Classes_Root ; HKCU = HKEY_Current_User ; HKLM = HKEY_Local_Machine ; HKU = HKEY_Users ; HKCC = HKEY_Current_Config Best regards MCP poweroff.inf
  2. Smart Defrag installs the Yahoo Toolbar on normal setup. I found no command line options to install Smart Defrag without the toolbar. To install it without the toolbar i use a trick with Explorer Policy. Add below Registry entrys by Regedit or script, (reg add) ... (Example from .INF script) HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","DisallowRun",0x00010001,"0x00000001" HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun","1",0x00000000,"ydetect.exe" Start the installer for Unattended setup. DefragSetup.exe /silent After setup you can delete above Registry Keys. Done I think this trick work on other setup's too (Google Toolbar, ...). "Look at TEMP, to find that, you don't want to install". Best regards MCP
×
×
  • Create New...