Jump to content

INF not installing


Recommended Posts

Ya I Made An Inf File to Import Some services Tweaks Instead Of Useing The Registry. for Example.

[Version]

Signature=$CHICAGO$

[services]

HKLM,"%Services%\Messenger",0x00010001,4

When I right click It And Install It does But after I Reboot Something Has changed Messenger would be On Automatic Still.. Can They's Only Be used In A Preinstall Of XP ?

Link to comment
Share on other sites


Ok Just Tryed It messenger was Turned Off I Went to Enable It

HKLM,%Services%\Messenger,Start,0x10001,2 Still nothing Happend When I Rebooted. Its On Disable still. Any Idea? Ive Also tryed

HKLM,"SYSTEM\CurrentControlSet\Services\Messenger","Start",0x00010001,2

Which I Looked Up in A Hiv.inf Off The Xp Cd. This Must Have to Be Ran while Windows Is Installing Cause None Of Them Work

Edited by hatred
Link to comment
Share on other sites

This would be my stripped down version. How are you calling the inf?

[Version]
Signature="$Windows NT$"

[DefaultInstall]
AddReg=Services.Auto

[Services.Auto]
HKLM, %Services%\Messenger,      "Start", %REG_DWORD%, %AUTO%

[Strings]
Services              = SYSTEM\CurrentControlSet\Services
AUTO                  = 0x00000002
REG_DWORD             = 0x00010001

RUNDLL32.EXE setupapi,InstallHinfSection DefaultInstall 128 %PATHTOINF%\services.inf

Make sure there are no quotes around the last section, it seems to screw up with them on the rundll command. Make sure you are using 128 also.

Edited by sleepnmojo
Link to comment
Share on other sites

Thanks For The Reply sleepnmojo. Ok This Is what Ive Done And It Works Finally!!! I Put

Version]

Signature=$Windows NT$

[DefaultInstall]

AddReg=Services

[services]

HKLM,"SYSTEM\CurrentControlSet\Services\Messenger","Start",0x00010001,2

And I right Clicked Installed Rebooted And got It To Work So I Tryed Makeing A bat file I put It In The Same folder As My Inf. In that Bat The Command Was

rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\mytweak.inf Ran That Bat And It fired Up The inf No Prob So Now that I Know That Its working Im Makeing The $OEM$ folder And Adding That To My Cmdlines.txt .Sooo Used To Registry This Whole Inf Throws me off.. Anyways Thanks For Your Help :D

Edited by hatred
Link to comment
Share on other sites

Messenger would be On Automatic Still..
If you had said you wanted Messenger on Automatic, it would also have been corrected in my reply. The above sounds to me as if you were trying to prevent it from being on Automatic still. From XP sp2 the messenger service is disabled by default, but as you didn't state your service pack level or setup, how were we supposed to help?
Link to comment
Share on other sites

Oh you Did Help Me though . I know Messenger Is Default Value 4 When windows Sets It Up What I Was Doing Was just trying To Turn It On With An inf file And It wasint working. I Was Trying to Get It To Turn On so I new I had The right Command Because I want To use it In A preinstall And If it aint Turning A services On And Off For me By Installing It .. Its not going To work When Installing My Windows. Sorry For Not Explaining more Better On what I was trying To Do.

Link to comment
Share on other sites

sleepnmojo Your inf You Showed Me whats the "Start", %REG_DWORD%, %AUTO% Part Of Your Inf What would You Change The AUTO To If Used To Disable A service. for Short term As You used AUTO Stupid Question But Guessing Before On another Inf made Me have to format Ive wrote A big One But In A different way but i like your Way Better. if You have Any Other Methods For shutting Down services Feel free To Post them. I like to Try Different commands out

Edited by hatred
Link to comment
Share on other sites

Here is a batch file template, just insert the 'Service names' of the services you want set

[example]

:: Automatic

  • set Aut=Dhcp lanmanworkstation SharedAccess Themes wuauserv

:: Disabled

  • set Dis=lanmanserver RemoteAccess seclogon srservice WZCSVC

:: Manual

  • set Man=COMSysApp EventSystem Netman RasAuto TermService

@echo off&setlocal enableextensions
set Aut=
set Dis=
set Man=
for %%a in (%Aut%) do sc config %%a start= auto
for %%d in (%Dis%) do sc config %%d start= disabled
for %%m in (%Man%) do sc config %%m start= demand
endlocal&goto :eof

Link to comment
Share on other sites

sleepnmojo Your inf You Showed Me whats the  "Start", %REG_DWORD%, %AUTO% Part Of Your Inf What would You Change The AUTO To If Used To Disable A service.  for Short term As You used AUTO Stupid Question But Guessing Before On another Inf  made Me have to format  Ive wrote A big One But  In A different way but i like your Way Better. if You have Any Other Methods For shutting Down services Feel free To Post them. I like to Try Different commands out

I have a string for each setting: auto, manual, and disabled. So if I want to change one from auto to disable I would just change %AUTO% to %DISABLED%. If you want to do the same just add an extra string. Add the following to your Strings section

DISABLED=0x00000004

You can shorten that to just 4, but I like the long hex way :thumbup .

Link to comment
Share on other sites

Thanks Man I used your Command but Instead I Used addreg=services.dis Then Put REG_DWORD%, %DIS% And Under string The Same Hoped to god It worked . Since The Last time I Didint Have the syntax right I got A blue screen And A harsh reboot LoL but anyways It Worked. so instead Of DIS I could just Use The addreg= Services.disabled %REG_DWORD%, %Disabled% Then For string Add the disabled To that With The value. thanks! your wAy is much Better then I Was Useing Looks More Pro Like To. Im tRying To Really Get into the whole Inf thing since I know LOngHorn will Be useing This. One Quick Question where do you Find tHe syntax For Addreg= like to Add services.Auto Ect.. Ive searched MS site And They dont give You The Description On It . Like say I wanted to Add Tweak To Lets say Advanced In the HKLM Instead Of Typeing The Whole String Out Could you use like Addreg=Advanced instead Of HKLM ? and Then Use It In your method You should Me? And Have the String = software/CurrentVersion\Explorer\Advanced

REG_DWORD = 0x00010001,4 "Example"

Link to comment
Share on other sites

Thanks Man  I used your Command but Instead I Used addreg=services.dis Then Put REG_DWORD%, %DIS% And Under string The Same Hoped to god It worked . Since The Last time I Didint Have the syntax right I got A blue screen And A harsh reboot LoL but anyways It Worked. so instead Of DIS I could just Use The addreg= Services.disabled  %REG_DWORD%, %Disabled% Then For string Add  the disabled To that With The value.

Thats how I have it set up, a section for disable, manual, and auto. Then if I wanted to make one manual, I would just move it from the section it is currently in, and modify the value at the end to %MANUAL%.

thanks! your wAy is much Better then I Was Useing Looks More Pro Like To. Im tRying To Really Get into the whole Inf thing since I know LOngHorn will Be useing This. One Quick Question where do you Find tHe syntax For Addreg= like to Add services.Auto Ect.. Ive searched MS site And They dont give You The Description On It . Like say  I wanted to Add  Tweak To Lets say  Advanced In the HKLM Instead Of Typeing The Whole  String Out Could you use like Addreg=Advanced instead Of HKLM ? and Then Use It In your method You should Me? And Have the String = software/CurrentVersion\Explorer\Advanced

REG_DWORD            = 0x00010001,4  "Example"

Here is where I go. When I work on an inf, and I have a question, this would be the site I reference. If you are starting out, I'd also recommend gosh inf tutorial. Gosh hasn't been around for a while, and I don't think he answers questions anymore, so posting on the board would be your best bet.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...