MSFN Forum: Autoit script which will show the install order - MSFN Forum

Jump to content



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

Autoit script which will show the install order If you want to know the install order of your applications Rate Topic: -----

#1 User is offline   sadicq 

  • noob
  • PipPip
  • Group: Members
  • Posts: 273
  • Joined: 17-August 05

Posted 17 November 2005 - 08:25 AM

Hi. I thought I should share my proggie. It is not much, but it does what I want it to do, so it is fine for me.
If you did not get it from the title, this script will read your config.js and will export in config.txt 2 things: install order number and the name of each item in WPI
Example:
5		Microsoft .Net Framework 2.0
6		Mozilla Firefox 1.5 RC 1
10		Winamp 5.1 Lite
.....

I wrote this because I found it hard to monitor the moment when each program is installed. Now dependencies are easier to track .... and I also discovered I had some entries with the same install order, and that was screwing up my install.

So, feel free to modify it to satisfy your needs and post here any opinions you have.

EDIT: Added command line parameters support.
For now, it supports 3 parameters: /i "input file" /o "output file" /f.
You can use only the name of the input/output file or you can specify the whole path.
Example
config.exe  /i C:\wpi\cooooonfig.js /o bau.js

The default input/output folder is the script's directory. The default input file is config.js.
/f forces the script to rewrite the output file if it already exists.

Attached File(s)


This post has been edited by sadicq: 17 November 2005 - 01:12 PM



#2 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,652
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 17 November 2005 - 11:40 AM

Thanx!

Mind if I compile this and add it into the next version??

#3 User is offline   sadicq 

  • noob
  • PipPip
  • Group: Members
  • Posts: 273
  • Joined: 17-August 05

Posted 17 November 2005 - 11:55 AM

Of course not ... you can modify it if you want.
Oh, and any suggestion is appreciated. I started this because of my needs, but it can easily be improved.

This post has been edited by sadicq: 17 November 2005 - 12:04 PM


#4 User is offline   sadicq 

  • noob
  • PipPip
  • Group: Members
  • Posts: 273
  • Joined: 17-August 05

Posted 17 November 2005 - 01:13 PM

Updated my first post. Also updated the script with some needed adjustements and command-line support.

#5 User is offline   Solid as a rock 

  • So solid as a rock is
  • PipPipPipPipPip
  • Group: Members
  • Posts: 718
  • Joined: 30-May 04

Posted 17 November 2005 - 07:25 PM

View Postkelsenellenelvian, on Nov 17 2005, 06:40 PM, said:

Thanx!

Mind if I compile this and add it into the next version??

change the "direct copy" to the "direct install from disk" too... also add the skinned windows to the next version please :yes:

#6 User is offline   codeblue 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 305
  • Joined: 14-July 03

Posted 18 November 2005 - 02:26 AM

@ kelsenellenelvian
Next version, cool. wasnt sure you would be releasing another as 4.3.5 is pretty stable :thumbup . When can we expect the next installment?

#7 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,652
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 18 November 2005 - 02:50 AM

I am working on making the tooltips optional and being able to decide whether or not you want category checkboxes plus a couple of more improvements. Also of course more languages., but don't expect it too soon .

#8 User is offline   oneless 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 374
  • Joined: 07-January 05

Posted 23 November 2005 - 05:42 PM

te salut @sadicq

very usefull for me too this script . thank you very much . . .
but i have so many programs without install order and also with same install order .
so , i modified your script for my needs .
1. now show all entries , including here those who havent (yet) install order number
(this was possible because the original script show the doubled entries)
i modified only the Read() function, with red are the changes

Quote

Func Read()
Local $nametemp_bak = ""
$file = FileOpen($folderin & "\" & $input, 0)
; Check if file opened for reading OK
While $file = -1
MsgBox(0, "Error", "Unable to open " & $input & ".")
If MsgBox(4,"Cannot open " & $input & ".","Do you want to open it from another location?")==6 Then
$aux=FileOpenDialog("Please select the import file:","","All (*.*)",1+2,"config.js")
If StringInStr($aux,"\",1,-1) Then
$input=StringTrimLeft($aux,StringInStr($aux,"\",1,-1))
$folderin=StringTrimRight($aux,StringLen($aux)-StringInStr($aux,"\",1,-1)+1)
Else
$input=$aux
EndIf
$file = FileOpen($folderin & "\" & $input, 0)
Else
Exit
EndIf
WEnd
; Read in lines of text until the EOF is reached
While 1
$a=FileReadLine($file)
If @error = -1 Then
Insert("-" ,$nametemp_bak)
ExitLoop
EndIf
;Line read, need to analize it now
If StringInStr($a,"ordr[pn]=[",1,1) And StringInStr($a,"//",1,1)<>1 Then
$temp=StringStripCR($a)
$temp=StringTrimLeft($temp,10)
$temp=StringTrimRight($temp,1)
If Not StringIsAlNum($temp) Then
MsgBox(0, "Error", "Possibly corrupted " & $input & ". Cannot continue.")
Exit
Else
Insert( Int($temp) ,$nametemp)
$nametemp_bak = ""
EndIf
ElseIf StringInStr($a,"prog[pn]=[",1,1) And StringInStr($a,"//",1,1)<>1 Then
$nametemp=StringStripCR($a)
$nametemp=StringTrimLeft($nametemp,11)
$nametemp=StringTrimRight($nametemp,2)
$nametemp = MyTrim ( $nametemp ) ; <<--- you can delete this line if you dont want to trim the colours codes
if $nametemp_bak <> "" then Insert("-" ,$nametemp_bak)
$nametemp_bak = $nametemp

EndIf
Wend
FileClose($file)
EndFunc

2. and i added a new function MyTrim() ,
because i use a lots of colours , i trim this part from the name of program writed in config.txt
; ----------------------------------------------------------------------------
Func MyTrim($sir)
Local $kk , $sirulet , $tampon = "" , $logic = 0
   For $kk = 1 To StringLen($sir) Step 1
	  $sirulet = StringMid ( $sir , $kk , 1 )
	  if $sirulet = "<" then $logic = 1
	  if $logic = 0 then $tampon = $tampon & $sirulet
	  if $sirulet = ">" then $logic = 0
   Next
   Return $tampon
EndFunc
; ----------------------------------------------------------------------------


#9 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,652
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 23 November 2005 - 11:21 PM

Cool I would like the version in the official package to be as feature complete as is possble...

#10 User is offline   oneless 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 374
  • Joined: 07-January 05

Posted 24 November 2005 - 03:56 AM

@sadicq gave already his ok , i only add few lines just for my needs .
WPI help us , of couse its ok by me .
who knows , till will appear the new version , like @sadicq said , maybe this script can grow !
anyway is a great ideea and a very helpfull script for bigs config.js .

@sadicq , what is the reason for this lines :
;If $CmdLine[0]<>0 Then
;	For $k=1 To $CmdLine[0] Step 1
;		If $CmdLine[$k]=="/o" And $k<$CmdLine[0] Then
;			If StringInStr($CmdLine[$k+1],"\",1,-1) Then
;				$output=StringTrimLeft($CmdLine[$k+1],StringInStr($CmdLine[$k+1],"\",1,-1))
;				$folderout=StringTrimRight($CmdLine[$k+1],StringLen($CmdLine[$k+1])-StringInStr($CmdLine[$k+1],"\",1,-1)+1)
;			Else
;				$output=$CmdLine[$k+1]
;			EndIf
;		ElseIf $CmdLine[$k]=="/i" And $k<$CmdLine[0] Then
;			If StringInStr($CmdLine[$k+1],"\",1,-1) Then
;				$input=StringTrimLeft($CmdLine[$k+1],StringInStr($CmdLine[$k+1],"\",1,-1))
;				$folderin=StringTrimRight($CmdLine[$k+1],StringLen($CmdLine[$k+1])-StringInStr($CmdLine[$k+1],"\",1,-1)+1)
;			Else
;				$input=$CmdLine[$k+1]
;			EndIf
;		ElseIf $CmdLine[$k]=="/f" Then
;			$overwrite=1
;		EndIf
;	Next
;EndIf

used in construction and redundant code now ? here work your script without them .

#11 User is offline   sadicq 

  • noob
  • PipPip
  • Group: Members
  • Posts: 273
  • Joined: 17-August 05

Posted 24 November 2005 - 04:19 AM

That is the support for command line use... as I said in my first post, you can use config.exe /i "your custom named config.js" /o "you custom named output file" /f. /f tells to be silent and overwrite any already existent output file that is named like "your named config.js". /i, /o I think it's obvious what they are doing.
i don't find it necessary but it can be useful when you have more than one config.js and you can use this script in a batch loop.

This post has been edited by sadicq: 24 November 2005 - 04:21 AM


#12 User is offline   oneless 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 374
  • Joined: 07-January 05

Posted 24 November 2005 - 04:44 AM

thanks man .
i miss this lesson with command parameters in autoit .
and of course it was more simple to ask you today
instead of search last night .

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