problem with applyin inf files

Discuss & post Update Pack addons here.
Post Reply
Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

problem with applyin inf files

Post by Weed » Wed Sep 27, 2006 5:52 am

Hi,
i created some addons which have .inf files to apply some regsettings but it doesnt apply them :(
for example Process Explorer
the only thing what it does do is, copy procexp.exe to sys32 folder
but if i install the inf files manually by rightclick it works with regsettings and creats the shortcut
ENTRIES.INI File

Code: Select all

[general]
[general]
builddate=2006/09/24
description=Process Explorer
language=English 
title=Process Explorer
version=10.2
website=http://www.sysinternals.com/Utilities/ProcessExplorer.html

[sysoc] 
procexp=ocgen.dll,OcEntry,procexp.inf,HIDE,7 

[dosnet_files] 
d1,procexp.inf
d1,procexp.exe

[txtsetup_files] 
procexp.inf = 1,,,,,,,20,0,0
procexp.exe = 1,,,,,,,2,0,0,,1,2
[/size]

procexp.inf

Code: Select all

[Version]
Signature=$Windows NT$

[DefaultInstall]
CopyFiles    = Main.Install
ProfileItems = Processexplorer.AddShortcut
AddReg       = REGEntries.AddReg

[procexp]
OptionDesc   = "Process Explorer"
Tip		     = "Process Explorer"
Modes	     = 0,1,2,3
CopyFiles    = Main.Install
ProfileItems = Processexplorer.AddShortcut
AddReg       = REGEntries.AddReg

[DestinationDirs]
Main.Install    = 11

[Main.Install]
procexp.exe

[Processexplorer.AddShortcut]
Name       = Process Explorer
CmdLine    = 11,,procexp.exe /t
InfoTip    = Sysinternals Process Explorer
WorkingDir = 11,,procexp.exe /t
SubDir     = %autostart%

[REGEntries.AddReg]
HKLM,"%Regadd%","Debugger",0,"""C:\WINDOWS\SYSTEM32\PROCEXP.EXE"""

[Strings]
sys = system32
autostart = Startup
Regadd = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe"
and same Problem with VMWare

Code: Select all

[EditFile]
SVCPACK.INF,SetupHotfixesToRun,AddProgram

[AddProgram]
VMWare.exe

[sysoc] 
VMWare=ocgen.dll,OcEntry,vmware.inf,HIDE,7 

[dosnet_files] 
d1,vmware.inf

[txtsetup_files] 
vmware.inf = 1,,,,,,,20,0,0
[/size]

Code: Select all

[Version]
Signature=$Windows NT$

[DefaultInstall]
AddReg     =VMWare.AddReg

[VMWare]
OptionDesc ="VMWare Register"
Tip        ="VMWare Register"
Modes      =0,1,2,3
AddReg     =VMWare.AddReg

[VMWare.AddReg]
HKLM,"SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation\License.ws.5.0","Name",0,"xxxx"
HKLM,"SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation\License.ws.5.0","CompanyName",0,"xxxx"
HKLM,"SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation\License.ws.5.0","Serial",0,"xXXx-xxxx-xxxx-xxxx"
i dont understand, all looks good
new entries in sysoc.inf

Code: Select all

[Components]
VMWare=ocgen.dll,OcEntry,vmware.inf,HIDE,7
procexp=ocgen.dll,OcEntry,procexp.inf,HIDE,7
[/size]

both inf files exists in I386 Folder
and both inf files does exists in Windows\INF Folder after install
what am i doin wrong? :(

User avatar
MrNxDmX
Moderator
Posts: 3112
Joined: Mon Jan 03, 2005 7:33 am

Post by MrNxDmX » Wed Sep 27, 2006 8:19 am

you are missing a line in both inf files.
this one is for procexp.inf:
.....
[DefaultInstall]
CopyFiles = Main.Install
ProfileItems = Processexplorer.AddShortcut
AddReg = REGEntries.AddReg

[Optional Components]
procexp


[procexp]
OptionDesc = "Process Explorer"
.....

this one is for vmware:
.....
[DefaultInstall]
AddReg =VMWare.AddReg

[Optional Components]
VMWare


[VMWare]
.....
try these and report back. I hope they will work.

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Wed Sep 27, 2006 10:59 am

thanks for answer

but no that havent fixed it :(
iam hopeless now :) :cry:

MrWoo
Posts: 39
Joined: Mon Aug 07, 2006 12:59 pm

Post by MrWoo » Wed Sep 27, 2006 11:28 am

sys = system32
autostart = Startup
You might want to enclose the string variables in quotes.

MrWoo

User avatar
ricktendo64
Posts: 3214
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Wed Sep 27, 2006 12:16 pm

FGCBA Is a very usefull inf tool

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Wed Sep 27, 2006 1:18 pm

!- 1 warning(s):
- [SourceDisksNames(.x86)] section does not exist in procexp.inf!
!- 1 warning(s).
why do i need this section? what do i need to enter here?
anyway, on my other files which does just apply regsettings i got no warnings

User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Post by n7Epsilon » Wed Sep 27, 2006 1:21 pm

You can ignore this warning, this section is only used in order to add files, since to do so you need to add that section + CopyFiles directives + DestinationDirs ... etc.

Warnings are not the same as errors, they just mean be careful, or make sure this is intentional ... etc.

User avatar
MrNxDmX
Moderator
Posts: 3112
Joined: Mon Jan 03, 2005 7:33 am

Post by MrNxDmX » Wed Sep 27, 2006 6:06 pm

are u using xp 64bit?

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Thu Sep 28, 2006 3:55 am

i always try my addons on x86 and x64
i know i need to remove in vmware.inf "Wow6432Node" but my other infs should be workin on x86 too like CalcPlus but all same problem :(

procexp.inf = 1,,,,,,,20,0,0
procexp.exe = 1,,,,,,,2,0,0,,1,2
i dont really know what that means, but is that correct ?

User avatar
ricktendo64
Posts: 3214
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Thu Sep 28, 2006 4:11 am

There was a Collective list of Txtsetup.sif directory codes but its not there anymore... anybody have a pdf or chm file with this?

BTW have you been here Weed? http://www.ryanvm.net/forum/viewtopic.php?t=1290

TechnoHunter
Posts: 506
Joined: Sun Feb 26, 2006 4:13 am

Post by TechnoHunter » Thu Sep 28, 2006 1:04 pm

bleh... apologies in adavance for the long post...

<code>
;
; The [DeleteMe] section removes an entire key and ALL of it values
;
; Additions must use the format: MainRegistryKey,"SubKeyToDelete"
;
; Valid MainRegistryKey abbreviations are:
; HKCR = Hkey_Classes_Root
; HKCU = Hkey_Current_User
; HKLM = Hkey_Local_Machine
; HKU = Hkey_Users
;
; Registry Data Types
; types with NCLOB don't overwrite existing values
;
; REG_SZ = 0x00000000 (or 0)
; REG_BINARY = 0x00000001 (or 1)
; Reg_SZ_NOCLOBBER = 0x00000002 (or 2)
; REG_BINARY_NOCLOBBER = 0x00000003 (or 3)
; REG_MULTI_SZ_APPEND = 0x0001000A
; REG_MULTI_SZ = 0x00010000
; REG_DWORD = 0x00010001
; REG_MULTI_SZ_NOCLOBBER = 0x00010002
; REG_DWORD_NOCLOBBER = 0x00010003
; REG_MULTI_SZ_DELVAL = 0x00010006
; REG_ADDREG_APPEND = 0x00010008
; REG_EXPAND_SZ = 0x00020000
; REG_EXPAND_SZ_NOCLOBBER = 0x00020002
;
; To make a default value, use ,,, For example see iesearch settings
;
; A DIRID can be one of the following values: -01,
;
; Value Destination Directory
;
; 01 SourceDrive:\pathname (the directory from which the INF file was installed)
; 10 Windows directory
; This is equivalent to %windir%.
; 11 System directory
; This is equivalent to %windir%\system32 for NT-based systems,
; and to %windir%\system for Windows 9x/Me.
; 12 Drivers directory
; This is equivalent to %windir%\system32\drivers for NT-based platforms,
; and to %windir%\system\IoSubsys on Windows 9x/Me platforms.
; 17 INF file directory
; 18 Help directory
; 20 Fonts directory
; 21 Viewers directory
; 23 Color directory (ICM) (not used for installing printer drivers)
; 24 Root directory of the system disk.
; This is the root directory of the disk on which Windows files are installed.
; For example, if dirid 10 is "C:\winnt", then dirid 24 is "C:\".
; 25 Shared directory
; 30 Root directory of the boot disk, also known as "ARC system partition,"
; for NT-based systems. (This might or might not be the same directory as
; the one represented by dirid 24.)
; 50 System directory for NT-based operating systems
; This is equivalent to %windir%\system (NT-based systems only).
;
; 51 Spool directory (not used for installing printer drivers see Printer Dirids)
; 52 Spool drivers directory (not used for installing printer drivers)
; 53 User profile directory
; 54 Directory where ntldr.exe and osloader.exe are located (NT-based systems only)
; 55 Print processors directory (not used for installing printer drivers)
; -1 Absolute path
;
;
; Value Shell Special Folder
;
; 16384 %userprofile%\Desktop
; 16386 %userprofile%\Start Menu\Programs
; 16389 %userprofile%\My Documents
; 16390 %userprofile%\Favorites
; 16391 %userprofile%\Start Menu\Programs\Startup
; 16392 %userprofile%\Recent
; 16393 %userprofile%\SendTo
; 16395 %userprofile%\Start Menu
; 16397 %userprofile%\My Documents\My Music
; 16398 %userprofile%\My Documents\My Videos
; 16400 %userprofile%\Desktop
; 16403 %userprofile%\NetHood
; 16404 C:\WINDOWS\Fonts
; 16405 %userprofile%\Templates
; 16406 %allusersprofile%\Start Menu
; 16407 %allusersprofile%\Start Menu\Programs
; 16408 %allusersprofile%\Start Menu\Programs\Startup
; 16409 %allusersprofile%\Desktop
; 16410 %userprofile%\Application Data
; 16411 %userprofile%\PrintHood
; 16412 %userprofile%\Local Settings\Application Data
; 16415 %allusersprofile%\Favorites
; 16416 %userprofile%\Local Settings\Temporary Internet Files
; 16417 %userprofile%\Cookies
; 16418 %userprofile%\Local Settings\History
; 16419 %allusersprofile%\Application Data
; 16420 System Root (C:\WINDOWS)
; 16421 C:\WINDOWS\System32
; 16422 Program Files
; 16423 %userprofile%\My Documents\My Pictures
; 16424 %userprofile%
; 16425 C:\WINDOWS\System32
; 16427 C:\Program Files\Common Files
; 16429 %allusersprofile%\Templates
; 16430 %allusersprofile%\Documents
; 16431 %allusersprofile%\Start Menu\Programs\Administrative Tools
; 16432 %userprofile%\Start Menu\Programs\Administrative Tools
; 16437 %allusersprofile%\Documents\My Music
; 16438 %allusersprofile%\Documents\My Pictures
; 16439 %allusersprofile%\Documents\My Videos
; 16440 C:\WINDOWS\resources
; 16441 C:\WINDOWS\resources\0409
; 16443 %userprofile%\Local Settings\Application Data\Microsoft\CD Burning
;
;
; ProfileItems
;
; 0x00000001 Create menu item in Current User flag
; 0x00000002 Delete menu item flag
; 0x00000004 Create Start menu group under All Users\Start\Programs
; 0x00000005 Create Start menu group under Current User\Start\Programs
; 0x00000006 Delete Start menu group under All Users\Start\Programs
; 0x00000007 Delete Start menu group under Current User\Start\Programs
;
;
;
;
</code>
There ya go Rick.. enjoy

TechnoHunter

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Fri Sep 29, 2006 5:33 pm

fixed now :)
procexp works now too, it was a bug with nlite which is fixed in new version :)
my other infs too, have learned much from mr. nuhi today :D

now i just have one problem
i want to create a shortcut to "Startup" Folder
SubDir = 16408
this is the dir code for startup, but it creates a Folder 16408 in Programs with the Shortcut :shock:
it works if i use a String (%autostart%) but then its not compatible with other windows languages...
[Version]
Signature=$Windows NT$

[Optional Components]
procexp

[DefaultInstall]
ProfileItems = Processexplorer.AddShortcut
AddReg = REGEntries.AddReg

[procexp]
OptionDesc = "Process Explorer"
Tip = "Process Explorer"
Modes = 0,1,2,3
ProfileItems = Processexplorer.AddShortcut
AddReg = REGEntries.AddReg

[Processexplorer.AddShortcut]
Name = Process Explorer
CmdLine = 11,,procexp.exe /t
InfoTip = Sysinternals Process Explorer
WorkingDir = 11,,procexp.exe /t
SubDir = 16408

[REGEntries.AddReg]
HKLM,"%Settings1%","Debugger",0,"""C:\WINDOWS\SYSTEM32\PROCEXP.EXE"""
HKCU,"%Settings2%","EulaAccepted",0x00010001,1
HKCU,"%Settings2%","HideWhenMinimized",0x00010001,1
HKCU,"%Settings2%","AlwaysOntop",0x00010001,1
HKCU,"%Settings2%","OneInstance",0x00010001,1
HKCU,"%Settings2%","OneInstance",0x00010001,0

[Strings]
autostart = Startup
Settings1 = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe"
Settings2 = "Software\Sysinternals\Process Explorer"[/code]

User avatar
ricktendo64
Posts: 3214
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Fri Sep 29, 2006 8:04 pm

TechnoHunter wrote:There ya go Rick.. enjoy

TechnoHunter
Thank you TechnoHunter

EDIT: @Weed... Have you tried AddReg?
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","Sysinternals Process Explorer",0,"%11%\procexp.exe /t"

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Fri Sep 29, 2006 8:32 pm

hey thats a good idea :)
gonna try this tomorrow, thanks
gonna upload this addon on nliteos.com l8er

edit: oh just seen, thats not allowed from sysinternals :o

TechnoHunter
Posts: 506
Joined: Sun Feb 26, 2006 4:13 am

Post by TechnoHunter » Fri Sep 29, 2006 9:07 pm

hence the nifty sysinternals addon builder that we have and love :)

post your fix in there and see if the maker will incorporate it for us all :)

TechnoHunter

User avatar
ricktendo64
Posts: 3214
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Fri Sep 29, 2006 10:53 pm

Post your fixed inf file and a link to the program so we can make our own addon :P

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Sat Sep 30, 2006 4:23 am

download it from here :)
http://www.nliteos.com/addons

hope the Instruction is easy to understand :)

iam gonna update the vmware addon l8er with an .inf file to allow peoples enter there serial, since now i know how to use .inf files :D
edit:vmware updated :)

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Sat Sep 30, 2006 7:39 am

now i have another question :)

whats the best solution to remove the .inf after its been applied? also the .pnf file which will be created after .inf is applied

wanna make my addons as clean as possible :)

User avatar
ricktendo64
Posts: 3214
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Sat Sep 30, 2006 9:20 am

Found an error in your inf file Weed.
[DefaultInstall]
AddReg = REGEntries.AddReg

[procexp]
OptionDesc = "Process Explorer"
Tip = "Process Explorer"
Modes = 0,1,2,3
fixed
[Optional Components]
procexp

[DefaultInstall]
OptionDesc = "Process Explorer"
Tip = "Process Explorer"
Modes = 0,1,2,3
AddReg = REGEntries.AddReg

[procexp]
OptionDesc = "Process Explorer"
Tip = "Process Explorer"
Modes = 0,1,2,3
AddReg = REGEntries.AddReg
also change
HKLM,"%Settings1%","Debugger",0,"""C:\WINDOWS\SYSTEM32\PROCEXP.EXE"""
to
HKLM,"%Settings1%","Debugger",0,"""%11%\PROCEXP.EXE"""
Becuz not all ppl use the C for windows
Last edited by ricktendo64 on Sat Sep 30, 2006 9:57 am, edited 1 time in total.

User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Post by n7Epsilon » Sat Sep 30, 2006 9:51 am

HKLM,"%Settings1%","Debugger",0,"""%windir%\system32\PROCEXP.EXE"""
Why not just use %11%\Procexp.exe directly, since %WinDir% will only work if the type is REG_EXPAND_SZ and here it is just REG_SZ.

%11% is internally translated by Windows to the SYSTEM32 folder.

User avatar
ricktendo64
Posts: 3214
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Sat Sep 30, 2006 9:56 am

EDITED... thanks for that n7Epilson, I thought about putting 11 at first but went with windir, so thank you for your help 8)

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Sat Sep 30, 2006 10:09 am

oh, thanks
its fixed now :)

But this should be enough too or not?, works with no problem with rightclick - install
OptionDesc and Tip is just for info for us what this .inf is for or ?
and Modes...no idea whats that for :)
[DefaultInstall]
AddReg = REGEntries.AddReg

[procexp]
OptionDesc = "Process Explorer"
Tip = "Process Explorer"
Modes = 0,1,2,3
AddReg = REGEntries.AddReg

User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Post by n7Epsilon » Sat Sep 30, 2006 10:18 am

No, you still need [OptionalComponents], when OCGEN.dll reads the ini file (as per the instructions added in sysoc.inf as added by the [sysoc] section in the entries.ini file), it looks for it instead of DefaultInstall.

But when you right-click > "Install...", Windows reads the [DefaultInstall] section instead, see ricktendo64's post above in which he shows you the [OptionalComponents] section.
Last edited by n7Epsilon on Sat Sep 30, 2006 10:32 am, edited 1 time in total.

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Sat Sep 30, 2006 10:26 am

this [OptionalComponents] was already there, ricktendo just havent copy+pasted this
but thanks now i know what this section is for :)

OptionDesc, Tip and Modes is enough if its only in [procexp] and not in [DefaultInstall] or viceversa or?

User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Post by n7Epsilon » Sat Sep 30, 2006 10:31 am

Personally, I'm not sure but I know they have to be in [procexp] as this is the info Windows shows in Add/Remove Windows Components if the sysoc entry is not hidden. As for [DefaultInstall], I think they're not very necessary but adding them does not seem to cause any problems at all.

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Sat Sep 30, 2006 10:45 am

ah understand, thanks now iam much wiser ! :)

User avatar
ricktendo64
Posts: 3214
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Sat Sep 30, 2006 11:15 am

[DefaultInstall] and [procexp] need to have the same stuff under them
OptionDesc = "Process Explorer"
Tip = "Process Explorer"
Modes = 0,1,2,3
AddReg = REGEntries.AddReg
EDIT: Here I made you an uninstallable version
Image
Plz note that I added the .chm help file and dont forget to modifyPE your procexp.exe so it can copy without errors during txt setup. Link

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Sun Oct 01, 2006 6:59 am

good idea, thanks its updated now :)
but i have removed the help file, i dont think its needed for such a simple app :)
also i dont get any errors w/o usin modifype ?

User avatar
ricktendo64
Posts: 3214
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Sun Oct 01, 2006 1:28 pm

Weed wrote:have removed the help file, i dont think its needed for such a simple app
I think its better to include it... Its better to have your addon work 100% instead of just 90%, IMHO this does not look professional
Image

Weed
Posts: 23
Joined: Sat Jan 22, 2005 8:10 am

Post by Weed » Mon Oct 02, 2006 6:23 am

Ok u may right :) updated

i just want have my addons as some as possible, like vmware :)

Post Reply