MSFN Forum: Inf-File misbehaving - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Inf-File misbehaving Rate Topic: -----

#1 User is offline   amigaman 

  • Group: Members
  • Posts: 9
  • Joined: 02-October 04

Posted 07 October 2004 - 08:35 AM

Hello, People,
I am getting more and more familiar with Wihu, but now i encountered a problem i cannot explain.

Please review the following:
Wihu is called from Winnt.sif/guirunonce.
Install.ini has some lines
description.3=Codecs
command.3=cmd /c %systemdrive%\install\codecs.cmd
selected.3 = 1

Codecs.cmd looks like:
set dir=%systemdrive%\install
rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %dir%\mp3\fhg.inf

Fhg.inf is looking like this:
[Version] 
Signature   = "$Chicago$" 
AdvancedINF = 2.5, "Your setup subsystem is outdated.  Please install IE 3.01 or greater." 

[DefaultInstall]
RequiredEngine=Setupapi
CopyFiles  = CopyFiles.DLL, CopyINF
RegisterOCXs     = OCX.Register
AddReg = AddReg

[DestinationDirs] 
CopyFiles.DLL        = 11  
CopyINF    = 17 

[AddReg] 
HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc", "l3codecp.acm",, "Fraunhofer IIS MPEG Layer-3 Codec (Professional)"
HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers32", "msacm.l3codec",, "l3codecp.acm"

[OCX.Register] 
"%11%\l3codecp.acm"  

[CopyFiles.DLL] 
l3codecp.acm,,,97 
  
[CopyINF] 
fhg.inf


Now there's a significant difference in the behaviour of the Inf-File:
In manual installation (right click -> install) it all works well.
Wenn called from wihu, everything in the '%systemdrive%\install'-Directory gets deleted.
What is happening here ?


#2 User is offline   XPect 

  • Junior
  • Pip
  • Group: Members
  • Posts: 80
  • Joined: 18-June 04

Posted 10 October 2004 - 10:19 AM

Why don't you code the install directly in wihu rather than using inf file ?

For me or you use wihu or you use xplode, but I don't see the interest of having a mix of the 2, but maybe I'm missing something.

What is your purpose ?

#3 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 October 2004 - 02:07 PM

@XPect
No, his reason for using INF is valid.
His purpose is to have those codecs installed.


@amigaman
No, I doubt that wihu has anything to do with this problem. Its more about how you call the files, I think - and then maybe the INF file calls a DLL that empties the folder it runs... gotta check deeper to know. And for that, need more details.

Until then, I have this suggestion for you:
The below series of commands is unnecessarily complicated. It'd make your task easier to change it a bit.
1. Forget about codecs.cmd - not needed.
2. Change those "some lines" that you posted - modified code of that 3 lines below:
description.3=Codecs
command.3=rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %systemdrive%\install\mp3\fhg.inf
selected.3 = 1
The structure of the INF tells me that _maybe_ the files copying might not work.... but after using the above code, the directory deletion should not happen. Just try it, and tell us how it goes. :thumbup

#4 User is offline   amigaman 

  • Group: Members
  • Posts: 9
  • Joined: 02-October 04

Posted 11 October 2004 - 01:31 AM

@prathapml:
I use the cmd, because the lines i have posted are not the only ones for this item.
But i reduced the cmd-file to this line without getting rid of the problem.

It does not happen, when i doubleclick the cmd-file in Explorer, nor when right-clicking the inf file.
Only wihu does the unexpected deletion. so i think it is a problem of wihu calling the function.

BTW, the inf does what is expected, even with the deletion...

I now have a solution, which is a workaround, but it does what is intended:
I copy the files manually, then add the 2 keys in registry, then call regsvr32 to register the dll, all in my cmd. No need for the inf-file.

#5 User is offline   BenjaminKalytta 

  • Developer
  • PipPipPipPip
  • Group: Members
  • Posts: 609
  • Joined: 08-June 04

Posted 12 October 2004 - 12:18 AM

Why should WIHU delete %systemdrive%\install Directory?
No there is no such operation. Just take a deeper look at your install.ini, there must be the problem. May be you added a command which deletes install directory after WIHU finished.

Benjamin

#6 User is offline   amigaman 

  • Group: Members
  • Posts: 9
  • Joined: 02-October 04

Posted 12 October 2004 - 02:03 AM

Hello, again,
i tried to install Nero Multimounter this way.

Same procedure, same result.

When i double click on the CMD, which simply calls the rundll32.exe... all works ok,
only when started from Wihu, all content of the %systemdrive%\install-directory except the wihu-exe gets deleted.

The Procedure needs an Service to be installed. Anybody knows how to do this without using the inf-file?

I have tested it on several machines, with nlited and original XP-Pro-SP2-CDs, it even works (not), when i call wihu from an already installed WinXP.

#7 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 12 October 2004 - 02:09 AM

We have already said this once - WIHU is not deleting that directory by itself!

Most probably, this is a case of cleanup.cmd or some command that is part of it, being run too early on in the unattended. Please post your install.ini and any .CMDs that you use - so that someone can find out what's wrong. (if its too big, post it as an attached text file)

#8 User is offline   amigaman 

  • Group: Members
  • Posts: 9
  • Joined: 02-October 04

Posted 12 October 2004 - 02:12 AM

:blushing: Shame on me...

One of my friends found a (the ?!) solution:

I call a cmd to start wihu, which also sets some HKLM\RunOnce-Keys to delete the installation-Directories on c:

This script calls some 'reg add', then CDs to wihu's Dir, then starts Wihu.exe. I am normally using this script to test under real conditions.

When the call for wihu is first, then the 'reg add's, all seems to work ok.

Whats this? :blink:

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy