Jump to content











Photo
- - - - -

[hint] Source Safe


  • Please log in to reply
No replies to this topic

#1 pscEx

pscEx

    Platinum Member

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

Posted 02 August 2006 - 09:11 AM

Do not worry, this is not an article about Bill's code tracking (He spells this in one word).

I want to give a hint to write scripts running with XP SP2 source as well as with W2003 R2 as source.

Both sources are not longer the primary version but have service packs. As explained in one of my Mouse Posts:

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.

If you develop with XP as souce and use sp2.cab, at a different PC using W2003 as source the script will not run.

ToDo: Whenever you want to write
ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\SP1.CAB#$q -F&#58;MyFile #$q%TargetDir%\i386\system32#$q&#34;
write instead:
IniRead,&#34;%ProjectInfo%&#34;,&#34;Cabs&#34;,&#34;SP_CAB&#34;,&#34;%spFile%&#34;

IniRead,&#34;%ProjectInfo%&#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\MyFile#$q,ShellExecute,&#34;hide&#34;,&#34;expand.exe&#34;,&#34;#$q%SourceDir%\I386\%drFile%#$q -F&#58;MyFile #$q%TargetDir%\i386\system32\drivers#$q&#34;



&#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;MyFile #$q%TargetDir%\i386\system32\drivers#$q&#34;

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users