Jump to content











Photo
- - - - -

Mouclass Issue


  • Please log in to reply
8 replies to this topic

#1 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 18 July 2006 - 02:23 PM

Since a long time this issue consists, mainly with TheHive.
Because it is neither a question of an individual project nor of an OpenBuilder version, I made a new topic.

The issue really consists out of two separate issues which are independent from each other.

1st Part: The Driver Issue:

In the first version MS operating systems like XP and W2003 contain a file "Driver.cab" which contains a lot of drivers in compressed form.
When adding a service pack, an additional cab is added, usually called sp<N>.cab, where <N> is the number of the service pack.
Then some of the files inside driver.cab are obsolete and to be replaced by the sp<N>.cab files.

How to decide whether my source CD contains a service pack? This has to be done by the script itself and not by editing the script!

The installation CD contains a file DRVINDEX.INF with a section like

[Version]
signature="$Windows NT$"
CabFiles=sp1,driver

Maybe there is CabFiles=driver or CabFile=sp2,driver

The CabFile values are symbolic links and points to a section like

[Cabs]
driver=driver.cab
sp1=sp1.cab

where the real cab files can be found.

When looking for a driver, the script has to look into the first entry first. If the driver is not there then it has to look into the second entry.

2nd Part: The Mouclass Issue
When and only when mouclass.sys is expanded from driver.cab it needs an additional driver MOUHID.SYS.
It is not longer a mouclass issue but generally a driver issue.

Solution for #1 and #2:

In a projectinfo script some code like:

If,ExistFile,%allFiles%,FileDelete,%allFiles%

If,ExistFile,%sglFiles%,FileDelete,%sglFiles%

IniRead,&#34;%SourceDir%\I386\%driverIndex%&#34;,&#34;Version&#34;,&#34;CabFiles&#34;,&#34;%myTemp%&#34;

FileCreateBlank,%allFiles%

TXTAddLine,%allFiles%,&#34;%myTemp%&#34;,&#34;Append&#34;

FileCreateBlank,%sglFiles%

TXTAddLine,%sglFiles%,&#34;&#91;CabLinks&#93;&#34;,&#34;Append&#34;

Set,&#34;%cmd%&#34;,&#34;/c for /f #$qtokens=1-2 delims=#$c#$q %a in &#40;%allFiles%&#41; do echo link1=%a >> %sglFiles%&echo link2=%b >> %sglFiles%&#34;

ShellExecute,Hide,&#34;cmd.exe&#34;, &#34;%cmd%&#34;

IniRead,&#34;%sglFiles%&#34;,&#34;CabLinks&#34;,&#34;link1&#34;,&#34;%spCab%&#34;

IniRead,&#34;%sglFiles%&#34;,&#34;CabLinks&#34;,&#34;link2&#34;,&#34;%drCab%&#34;

If,%drCab%,NotEqual,&#34;&#34;,If,%spCab%,NotEqual,&#34;&#34;,IniRead,&#34;%SourceDir%\I386\%driverIndex%&#34;,&#34;Cabs&#34;,&#34;%spCab%&#34;,&#34;%spCabFile%&#34;

If,%drCab%,Equal,&#34;&#34;,If,%spCab%,NotEqual,&#34;&#34;,IniRead,&#34;%SourceDir%\I386\%driverIndex%&#34;,&#34;Cabs&#34;,&#34;%spCab%&#34;,&#34;%drCabFile%&#34;

If,%drCab%,NotEqual,&#34;&#34;,IniRead,&#34;%SourceDir%\I386\%driverIndex%&#34;,&#34;Cabs&#34;,&#34;%drCab%&#34;,&#34;%drCabFile%&#34;



IniWrite,&#34;%iniFile%&#34;,&#34;Cabs&#34;,&#34;SP_CAB&#34;,&#34;%spCabFile%&#34;

IniWrite,&#34;%iniFile%&#34;,&#34;Cabs&#34;,&#34;DR_CAB&#34;,&#34;%drCabFile%&#34;
and in the copy&expand script
IniRead,&#34;%iniFile%&#34;,&#34;Cabs&#34;,&#34;SP_CAB&#34;,&#34;%spFile%&#34;

IniRead,&#34;%iniFile%&#34;,&#34;Cabs&#34;,&#34;DR_CAB&#34;,&#34;%drFile%&#34;

If,&#34;%spFile%&#34;,NotEqual,&#34;&#34;,Run,%ScriptFile%,try-sp

If,NotExistFile,#$q%TargetDir%\i386\system32\drivers\mouhid.sys#$q,ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\%drFile%#$q -F&#58;mouhid.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;

If,NotExistFile,#$q%TargetDir%\i386\system32\drivers\mouclass.sys#$q,ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\%drFile%#$q -F&#58;mouclass.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;

Set,&#34;%cFile%&#34;,mouclass.sy

Run,%ScriptFile%,driver-compress

Set,&#34;%cFile%&#34;,mouhid.sy

Run,%ScriptFile%,driver-compress



&#91;try-sp&#93;

If,ExistFile,&#34;%SourceDir%\I386\%spFile%&#34;,ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\%spFile%#$q -F&#58;mouclass.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;

If,ExistFile,&#34;%SourceDir%\I386\%spFile%&#34;,ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\%spFile%#$q -F&#58;mouhid.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;



&#91;driver-compress&#93;

Echo,&#34;Cab Compressing file %cFile%s&#34;

If,ExistFile,&#34;%TargetDir%\i386\system32\drivers\%cFile%s&#34;,ShellExecute,&#34;hide&#34;,&#34;makecab.exe&#34;,&#34;%TargetDir%\i386\system32\drivers\%cFile%s %TargetDir%\i386\system32\drivers\%cFile%_&#34;

If,ExistFile,&#34;%TargetDir%\i386\system32\drivers\%cFile%_&#34;,FileDelete,&#34;%TargetDir%\i386\system32\drivers\%cFile%s&#34;

Soon I'll post a NanoXP experimental project which will contain these and some more suggestions.

Peter

Edited by psc, 03 August 2006 - 02:45 PM.


#2 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 18 July 2006 - 02:36 PM

Excellent explanation! :P

This mouse has proven to elude and confuse me, but I'm glad you're really close to catch it for good.. :P

#3 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4199 posts

Posted 18 July 2006 - 02:52 PM

:P :P

#4 foggw

foggw
  • Advanced user
  • 6 posts
  • Location:Radcliff, KY USA

Posted 27 July 2006 - 03:11 AM

Attached File  Build_5_CopyAndExpand.zip   6.38KB   446 downloadsPlease forgive me if I missed this elsewhere :P
For a United States English XP with SP2 GOLD CD (from Microsoft/Not Slipstreamed):
- The Mouclass.sys file is located in the SP2.Cab file.
- The Mouhid.sys is in the Driver.cab file.
- There is no SP1.Cab file

The following modification to the CopyandExpand.script works for me:
If,ExistFile,&#34;%SourceDir%\I386\DRIVER.CAB&#34;,Run,%ScriptFile%,process-driver-cab

If,NotExistFile,&#34;%TargetDir%\i386\system32\drivers\mouclass.sys&#34;,Run,%ScriptFile%,process-sp2-cab

If,NotExistFile,&#34;%TargetDir%\i386\system32\drivers\MOUHID.SYS&#34;,Run,%ScriptFile%,process-mouhid



&#91;process-driver-cab&#93;

ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\DRIVER.CAB#$q -F&#58;mouclass.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;

ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\DRIVER.CAB#$q -F&#58;mouhid.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;



&#91;process-sp2-cab&#93;

ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\SP2.CAB#$q -F&#58;mouclass.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;



&#91;process-mouhid&#93;

Expand,&#34;%SourceDir%\I386\MOUHID.SY_&#34;,&#34;%TargetDir%\i386\system32\drivers&#34;
The modifications are between lines 207 and 221 of the (hopefully) attached file.

Bill

Perpetually :P

OOPS... fixed typeo (cut and paste error)

#5 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 27 July 2006 - 01:51 PM

Thanks! :P

#6 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 July 2006 - 03:36 PM

Attached File  Build_5_CopyAndExpand.zip   6.38KB   446 downloadsPlease forgive me if I missed this elsewhere :P
For a United States English XP with SP2 GOLD CD (from Microsoft/Not Slipstreamed):
- The Mouclass.sys file is located in the SP2.Cab file.
- The Mouhid.sys is in the Driver.cab file.
- There is no SP1.Cab file

The following modification to the CopyandExpand.script works for me:

If,ExistFile,&#34;%SourceDir%\I386\DRIVER.CAB&#34;,Run,%ScriptFile%,process-driver-cab

If,NotExistFile,&#34;%TargetDir%\i386\system32\drivers\mouclass.sys&#34;,Run,%ScriptFile%,process-sp2-cab

If,NotExistFile,&#34;%TargetDir%\i386\system32\drivers\MOUHID.SYS&#34;,Run,%ScriptFile%,process-mouhid



&#91;process-driver-cab&#93;

ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\DRIVER.CAB#$q -F&#58;mouclass.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;

ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\DRIVER.CAB#$q -F&#58;mouhid.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;



&#91;process-sp2-cab&#93;

ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\SP2.CAB#$q -F&#58;mouclass.sys #$q%TargetDir%\i386\system32\drivers#$q&#34;



&#91;process-mouhid&#93;

Expand,&#34;%SourceDir%\I386\MOUHID.SY_&#34;,&#34;%TargetDir%\i386\system32\drivers&#34;
The modifications are between lines 207 and 221 of the (hopefully) attached file.

Bill

Perpetually :P

OOPS... fixed typeo (cut and paste error)



This script snippet will copy mouclass.sys and mouhid.sys dated 18-AUG-2001
while you only need mouclass.sys from sp2.cab, dated 04-AUG-2004. If you have that, you do not need mouhid.sys.


Peter :P

@All

Even well meant posts can sometimes confuse more than they help everybody
Please send further replies only if you want to explain, what in my theory or my code is wrong or if it does not run on a particular system. :P

#7 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 03 August 2006 - 02:44 PM

When working on a different project (localize the target system) I saw that my explanation and the Copy&Expands scripts are only partly correct. If one of our members would have an USB mouse we already would have his complains. :P

I corrected this in the initial post.

Here are the corrected Copy&Expand scripts for Standard
and PicoXP

@foggw
If I would have read your post a little bit more careful, I perhaps would have gotten this opinion earlier.
Sorry!

Peter :P

#8 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 03 August 2006 - 03:51 PM

I've downloaded your modified scripts and will test them.. :P

#9 Yorn

Yorn

    Frequent Member

  • Advanced user
  • 178 posts
  • Location:United States

Posted 03 August 2006 - 08:42 PM

If you guys need me to test I had the problem too. I think that was around 046 or 047 though. Lately the problem went away with the Standard Build, but I don't know if that's because it uses Explorer now or not. I have to say that the new Standard build is pretty sweet. The only thing that might make it better at this point is removing the "Help & Support" from the start menu and removing some of the options like "Manage" and "Properties" from the My Computer right-click menu. Then, later on, if someone makes scripts to activate those, they could be added back in or something.

Definitely let me know if you want me to test something with my laptop.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users