[Release Source] RVM_PackInstaller.exe

Questions about Update Pack making? Ask here.
Post Reply
User avatar
Siginet
Site Admin
Posts: 2894
Joined: Fri May 27, 2005 1:07 pm
Location: Planet Earth
Contact:

[Release Source] RVM_PackInstaller.exe

Post by Siginet » Sun Jun 12, 2005 6:03 am

OK... I am thinking about releaseing my source code to the tool I made to help install RyanVM's Update packs.
I don't have much time to work on it right now and I think it can be useful if someone will carry on coding it. If there seems to be enough people who post here that they are interested in carrying on coding it I will post the source code.

The source is made with autoit.
Image
--Siginet--

Techware
Your Virtual Technician
Computer Management Software

Sereby
Posts: 253
Joined: Fri Mar 11, 2005 5:15 am
Location: Germany

Post by Sereby » Sun Jun 12, 2005 7:23 am

i only have one Question! hope you can answer it me!
How to add the special lines to the dosnet.inf and txtsetup.sif without overwrite all?

thx

User avatar
buletov
Posts: 380
Joined: Tue Feb 15, 2005 11:30 am

Post by buletov » Sun Jun 12, 2005 8:11 am

you might consider asking bâshrat the sneaky down at the msfn.org forums...
Never know what life is gonna throw at you.

User avatar
Siginet
Site Admin
Posts: 2894
Joined: Fri May 27, 2005 1:07 pm
Location: Planet Earth
Contact:

Post by Siginet » Sun Jun 12, 2005 11:52 am

I know Bashrat is buisy latley too. He's studying for finals.

@Sereby

Code: Select all

;Start Editing Dosnet.inf 
$WINROOT = ("Path to directory containing the i386 directory") 
;=========================================================================
$filein = FileOpen($WINROOT&"\i386\dosnet.inf",0)
$fileout = FileOpen($WINROOT&"\i386\dosnet.tmp",2)

While 1
$line = FileReadLine($filein)
	If @error = -1 Then ExitLoop
	If StringInStr($line,"d1,RVMUpPck.cab") Then
		$svcpack = ("svcpack")
		ExitLoop
	Else
		$svcpack = ("")
	EndIf
WenD	
FileClose($filein)
FileClose($fileout)
		
	If $svcpack = ("") Then
	$filein = FileOpen($WINROOT&"\i386\dosnet.inf",0)
	$fileout = FileOpen($WINROOT&"\i386\dosnet.tmp",2)
While 1
	$line = FileReadLine($filein)
	If @error = -1 Then ExitLoop
	If StringInStr($line,"[Files]", 0, 1) Then
		$line1 = StringReplace($line,$line, '[OptionalSrcDirs]'&@CRLF&'svcpack'&@CRLF&@CRLF&'[Files]'&@CRLF&'d1,hdaprop.dll'&@CRLF&'d1,hdashcut.exe'&@CRLF&'d1,hdaudbus.inf'&@CRLF&'d1,hdaudbus.sys'&@CRLF&'d1,hdaudio.inf'&@CRLF&'d1,hdaudio.sys'&@CRLF&'d1,hdaudres.dll'&@CRLF&'d1,RVMUpPck.cab'&@CRLF&'d1,RVMUpPck.inf'&@CRLF&'d1,xpsp3res.dll'&@CRLF&@CRLF, 1, 0)
		FileWriteLine($fileout,$line1)
		While 1
			$line = FileReadLine($filein)
			If @error = -1 Then ExitLoop
			FileWriteLine($fileout,$line)
		WEnd
		
		FileMove($WINROOT&"\i386\dosnet.inf", $WINROOT&"\i386\dosnet.old",1)
		FileMove($WINROOT&"\i386\dosnet.tmp", $WINROOT&"\i386\dosnet.inf",1)
	Else
	FileWriteLine($fileout,$line)
	Endif 
WEnd
			FileClose($filein)
			FileClose($fileout)
		
		FileMove($WINROOT&"\i386\dosnet.inf", $WINROOT&"\i386\dosnet.old",1)
		FileMove($WINROOT&"\i386\dosnet.tmp", $WINROOT&"\i386\dosnet.inf",1)

If $svcpack = ("svcpack") Then
			FileClose($filein)
			FileClose($fileout)
EndIf

EndIf
FileDelete($WINROOT&"\i386\dosnet.tmp")
;End Editing Dosnet.inf =========================================================================
Just change this line:

Code: Select all

$WINROOT = ("Path to directory containing the i386 directory") 
With the path to the directory containing the i386.
That code will edit dosnet.inf perfectly. But I wanted the code to be written better then this. So that it would check the "entries.txt file for the needed entries, delete old entries and place in new ones. I know I could make it do it... but my time is slim at the moment. ;) I was hoping that someone here might be able to make that modification. Actually I think that is the only major modification that is needed to the code.
Image
--Siginet--

Techware
Your Virtual Technician
Computer Management Software

Rudi1
Posts: 232
Joined: Sun Mar 06, 2005 2:49 am

Post by Rudi1 » Sun Jun 12, 2005 1:47 pm

Hi Siginet!

I hope you have such time to finnish this really nice tool :oops:


Cheers!

Xable
Posts: 981
Joined: Tue May 03, 2005 6:38 pm
Contact:

Post by Xable » Sun Jun 12, 2005 4:34 pm

Come on signet, your nearly there. I challenge you to cary on. :P :lol:

User avatar
Siginet
Site Admin
Posts: 2894
Joined: Fri May 27, 2005 1:07 pm
Location: Planet Earth
Contact:

Post by Siginet » Sun Jun 12, 2005 9:04 pm

I will carry on with it... but I don't know when I will get time. I am wanting to find some autoit junkies to help me finish it. ;) I haven't been getting much sleep latley because I have been so buisy... and it isn't easy to write code when you're tired. LOL!

The tool works exactly how I planned it... but it may not work with a new release of Ryans Update packs. That is why the code should be changed to read the entries.txt file. I mean... I will easily be able to modify this tool to work with a new release... but I would rather have it capable of working with any release.
Image
--Siginet--

Techware
Your Virtual Technician
Computer Management Software

Xable
Posts: 981
Joined: Tue May 03, 2005 6:38 pm
Contact:

Post by Xable » Sun Jun 12, 2005 9:29 pm

I see...well i keep telling myself one day i will start to learn autoit, so i`ll look into it and see if i can`t help out a bit. :wink:

User avatar
RyanVM
Site Admin
Posts: 5190
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Mon Jun 13, 2005 7:43 am

Siginet wrote:The tool works exactly how I planned it... but it may not work with a new release of Ryans Update packs.
Well, it won't be necessary for the next release, anyway :P

User avatar
Siginet
Site Admin
Posts: 2894
Joined: Fri May 27, 2005 1:07 pm
Location: Planet Earth
Contact:

Post by Siginet » Tue Jun 14, 2005 3:26 am

Well... it was fun while it lasted then ;) hehe!

Ryan... you can release small fixes in .cab files for the most recent release untill your next release is available. My tool allready has support for that. ;)
Image
--Siginet--

Techware
Your Virtual Technician
Computer Management Software

User avatar
RyanVM
Site Admin
Posts: 5190
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Tue Jun 14, 2005 8:09 am

Yeah, that should be doable. Thankfully I should have an intarweb connection at home again tomorrow evening :D

a06
Posts: 139
Joined: Thu Dec 23, 2004 2:11 pm

Post by a06 » Tue Jun 14, 2005 11:31 pm

RyanVM wrote:Well, it won't be necessary for the next release, anyway :P
I know you have limited access, Ryan, but allow me to suggest:

Since it sounds like you are doing some kind of 'auto' integration, PLEASE don't do an auto-overwrite. I think a IF(lines not in file), THEN (add them) would work better, since some of us have other changes to files (ex: removing MS Messenger from sysoc.in_)

Thanks!

User avatar
Siginet
Site Admin
Posts: 2894
Joined: Fri May 27, 2005 1:07 pm
Location: Planet Earth
Contact:

Post by Siginet » Tue Jun 14, 2005 11:44 pm

I am sure the auto integration would not overwrite anything. ;) I don't see why anyone would right the auto integrate in that way. It would have to check the files to see if it allready exists then add the needed entries (without overwriting anything.) Why would you think it would overwrite something? Basically what the script would do would re-write your dosnet.inf and txtsetup.sif files into temp files with the added entries... then rename the temp files to take over as the real files. Which means every addition that you have made to your files would still be written to the new files.

At least... that is what my tool does. ;) Hope that clears up your worries.

Edit: Sorry I think I misunderstood your post. Actually you raise a good point. The overwriting would cause a problem in a case like that. But it could be easily worked around. But... if you are editing files in that way... you could always edit ryans cab files with your own files. ;)
Image
--Siginet--

Techware
Your Virtual Technician
Computer Management Software

User avatar
RyanVM
Site Admin
Posts: 5190
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Wed Jun 15, 2005 7:42 am

a06 wrote:
RyanVM wrote:Well, it won't be necessary for the next release, anyway :P
I know you have limited access, Ryan, but allow me to suggest:

Since it sounds like you are doing some kind of 'auto' integration, PLEASE don't do an auto-overwrite. I think a IF(lines not in file), THEN (add them) would work better, since some of us have other changes to files (ex: removing MS Messenger from sysoc.in_)

Thanks!
...that was the idea

Acheron
Posts: 389
Joined: Thu Nov 25, 2004 4:05 pm
Location: The Netherlands
Contact:

Post by Acheron » Wed Jun 15, 2005 5:36 pm

I'm pleased to see you looking into releasing the sourcecode. Nice string replacer function you use btw. I'm looking forward to it. I really want to help investigate it and help to make it the best.

User avatar
Siginet
Site Admin
Posts: 2894
Joined: Fri May 27, 2005 1:07 pm
Location: Planet Earth
Contact:

Post by Siginet » Sun Jun 19, 2005 6:05 pm

I am actually thinking of making a TextEdit.exe tool that will help people edit text files in the same way. With a gui and with parameters so that the tool can be used unattended and/or within other programs. ;) As for the source... I allready posted the text replacment code in a post a little further back. It has the code I used to edit the dosnet.inf file. Just edit the code to suit your needs. ;) I will post the source to the RVM tool I made soon.
Image
--Siginet--

Techware
Your Virtual Technician
Computer Management Software

Post Reply