• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
kenedy

kTool (just another software selector)

146 posts in this topic

Hey Kennedy I am wondering how do you get progress bars into runonce?? I want to try to implement this into WPI. Will you PM me please?

0

Share this post


Link to post
Share on other sites

Hi this really is a great bit of software

Ive been playiing with it and it dose what it says on the tin

the only thing i dont understand is how can i get my cleanup.cmd to run after running ktools

any ideas would be great

Thanks

0

Share this post


Link to post
Share on other sites

Just thought id let you know i sorted it I used a start cmd file to run some stuff then ran wait/ ktool

then ran cleanup

hope this might help somebody

0

Share this post


Link to post
Share on other sites

A little question about *.ini files and ktool

I see in the documentation file something like this

[MSI Test]
MSI = file.msi" /qb REBOOT=Suppress
MSI = Microsoft Virtual PC 2004.msi" /qb

Can someone explain why there is only ONE double quote ? Where is the second one ?

P.S.: Thanks ! this tool is exactly what I need !!!

0

Share this post


Link to post
Share on other sites

because you only need one quote for it to work, double quote's not neccesary

0

Share this post


Link to post
Share on other sites

@kennedy I am the developer of WPI and if you are still around to read this there has been developed a way for WPI to use kTools I want to include kTools in WPI but I feel that I should ask you first.

0

Share this post


Link to post
Share on other sites
@kennedy I am the developer of WPI and if you are still around to read this there has been developed a way for WPI to use kTools I want to include kTools in WPI but I feel that I should ask you first.

Ha. That's funny. I was just about to modify my WPI to make it use the KTools progress bar.

edit: Nevermind. I just checked the WPI forum. It seems as though someone has already done it. Sweet. That makes it easier for me.

Edited by Dumpy Dooby
0

Share this post


Link to post
Share on other sites

Hi,

Attached should be a modified (from v1.1a) version of ktool script, to compile with AutoIt. Also included in the archive is a sample ini file (only the [config] section of it is relevant to these modifications).

Improvement that I felt necessary in my case:

1- A 'Replace' option in the [Config] section of the .ini file

It's a bit like the 'Append' option but the provided value ('CD' works as well as with Append) will replace all instances of the '%KTREP%' substring INSIDE a Run/RunWait/DOS/MSI/REG/WaitProcess/WinWaitClose command string (although I can't see any use for the 2 last ones).

This allow for more flexibility (see .ini example provided) than just the 'Append' option. It could even replace it (but both can be used right now).

Also, using this, WPI would be able to make a better use of ktool, not just using the RunWait command.

2- A 'ListTitle' option in the [Config] section of the .ini file

If provided, it will replace the titles of the GUI and progress windows. Useful to identify successive runs of ktool.

3- in Func GUI (), I replaced all (5) 'GUIRead' function calls by 'GUICtrlRead' calls to have compatibility with latest AutiIt compiler versions (3 something and beta).

If ktool developpers find it useful, please feel free to integrate those little extras. My 0.3 cents.

Also, but not adressed in this file, I found somewhat inconsistent the way ktool deals with " (dble quotes) in commands: it add BOTH of it arround file names in REG command, only ONE at the beginning of file names in MSI command (so you have to put the last one after your file name), and none in other commands.

I feel that it should leave it to the user to add it or not. And also state this in the manual so you don't have to look to the source/log-file-in-temp to see how ktool deals with those quotes.

That's All, Folks!

[Edit] I've posted an even more improved version of kTool further in the thread.

kTool_modified.zip

Edited by Djé
0

Share this post


Link to post
Share on other sites

I've downloaded the ktools source code.

But how to edit this and how to make a EXE file of it?

Thanks

0

Share this post


Link to post
Share on other sites

arjanv,

The .au3 file can be modified with notepad but there are better editors...you must compile the .au3 with AutoIt. Free download here:

AutoIt Website

Once installed, you should be able to right-click on .au3 and click Compile.

There are editors included with AutoIt and I highly recommend getting the SciTe Editor (available in downloads section, don't forget patch). SciTe installs a small utility (ScriptWriter) to Record Windows, Keystrokes, Mouse Clicks for those uncooporative silent installs or build some complex script easily. It also has a built in tool to Build/Modify GUIs and a whole host of other functions.

Hope this helps.

Edited by lawrenca
0

Share this post


Link to post
Share on other sites

hi thanks for your explaination.

after compile it I'm getting this error

Line 0 (File"C:\ktool\v1.1a.exe"):

$tItem = GUIRead ( $ListAvailable )

$tItem = ^ ERROR

Error: Unknown function name.

Any ideas?

Thanks

0

Share this post


Link to post
Share on other sites

@arjanv

read my post a bit earlier in the thread about geting around this. Item #3.

0

Share this post


Link to post
Share on other sites
@arjanv

read my post a bit earlier in the thread about geting around this. Item #3.

hi,

sorry! my fault.

now it works.

is it possible to make the ktool window bigger of can it run in full screen?

0

Share this post


Link to post
Share on other sites

@arjanv

read my post a bit earlier in the thread about geting around this. Item #3.

hi,

sorry! my fault.

now it works.

is it possible to make the ktool window bigger of can it run in full screen?

everything works fine now

Thank you all

0

Share this post


Link to post
Share on other sites

Hi,

I'm still struggling with autoit.

I want to place some buttons somewhere else in the window.

It there some graphical tool that can drag & drop the button somewhere else?

Or How does this coordinates works?

like $ComboProfiles = GUICtrlCreateCombo ( "", 390, 30, 110, 30, 0x00200142 )

0

Share this post


Link to post
Share on other sites
Hi,

Attached should be a modified (from v1.1a) version of ktool script, to compile with AutoIt. Also included in the archive is a sample ini file (only the [config] section of it is relevant to these modifications).

Improvement that I felt necessary in my case:

1- A 'Replace' option in the [Config] section of the .ini file

It's a bit like the 'Append' option but the provided value ('CD' works as well as with Append) will replace all instances of the '%KTREP%' substring INSIDE a Run/RunWait/DOS/MSI/REG/WaitProcess/WinWaitClose command string (although I can't see any use for the 2 last ones).

This allow for more flexibility (see .ini example provided) than just the 'Append' option. It could even replace it (but both can be used right now).

Also, using this, WPI would be able to make a better use of ktool, not just using the RunWait command.

2- A 'ListTitle' option in the [Config] section of the .ini file

If provided, it will replace the titles of the GUI and progress windows. Useful to identify successive runs of ktool.

3- in Func GUI (), I replaced all (5) 'GUIRead' function calls by 'GUICtrlRead' calls to have compatibility with latest AutiIt compiler versions (3 something and beta).

If ktool developpers find it useful, please feel free to integrate those little extras. My 0.3 cents.

Also, but not adressed in this file, I found somewhat inconsistent the way ktool deals with " (dble quotes) in commands: it add BOTH of it arround file names in REG command, only ONE at the beginning of file names in MSI command (so you have to put the last one after your file name), and none in other commands.

I feel that it should leave it to the user to add it or not. And also state this in the manual so you don't have to look to the source/log-file-in-temp to see how ktool deals with those quotes.

That's All, Folks!

Thank you very much...

0

Share this post


Link to post
Share on other sites

Hi,

I've downloaded kTool_modified.zip

and the programm won't install anything.

Do I need to make some changes in win_xp.ini?

A peace of my win_xp.ini:

[Config]

Append = \\server\D\pre_install\software

Profiles=|Default|Graphic programs|Updates

DefaultProfile = Default

[Profiles]

Default=|Microsoft Office 2003|EV LV keyboard layout|WinRAR 3.30|Total Commander 6.03|FileZilla (Free FTP client)|Acrobat Reader 6|K-Lite Codec Pack|MyIE2|Fantom CD|VirtualPC 2004|.NET Framework|Media Player 9

Graphic programs=|Acrobat Reader 6|Adobe Acrobat 6.0 Standard|Adobe Photoshop 7.0.1

Updates=|DirectX 9.0b|.NET Framework|Media Player 9|Service Pack 2

[-Antispyware-]

[Windows Defender]

Context = Installing Windows Defender

MSI = Antispyware\Windows_Defender\WindowsDefender.msi

The full path of windowsdefender.msi is \\server\D\pre_install\software\Antispyware\Windows_Defender\WindowsDefender.msi

The path of ktool.exe is: \\server\D\pre_install\installer\ktool.exe

I'm getting this error it's in dutch

Anyone ideas?

post-17072-1141398413_thumb.jpg

0

Share this post


Link to post
Share on other sites

Try encasing the path with quotes like this:

[Windows Defender]
Context = Installing Windows Defender
MSI = "Antispyware\Windows_Defender\WindowsDefender.msi" /qn

As far as i know you need double quotes with this modified version the older version only required a single quote at the end of the file name

Edited by ironside
0

Share this post


Link to post
Share on other sites

Hi ironside,

As far as i know you need double quotes with this modified version the older version only required a single quote at the end of the file name
:no:, I did NOT adress the quotes problem in the previous modified file (you read too fast: I only talked about !). So you still need a single double quote at the end of the file name but NONE at the begining (msi files only).

As I said, I find this quote quantity question quite inquonsistent B) but did not change it since my purpose was only to improve functionality. I did not wanted to take over a development issue without consent from ktool developer (Kennedy).

Since for now (s)he seems busy somewhere else, and provided people are interested, I may adress this issue in a second modification. If I do, it will be in the following way: ktool won't add anymore any quote anywhere. It will leave it to the user to do it in its .ini file.

Do NOT expect me to take over or fork ktool development in any way, though. If I'd do, I would transform it into something like WPI or WIHU!!! Who would need that? ;) Btw, I take the opportunity to thank you back, kelsenellenelvian, you did far more usefull things (and if i may, where does this name comes from? I'm so currious...).

As for Arjanv error:

Most probably you're just lacking the double quote at the end (ONLY) of your file name:

MSI = Antispyware\Windows_Defender\WindowsDefender.msi"

add /qn as shown by ironside to install silently.

Also, I don't see anywhere Windows Defender in your profiles.

How are you using ktool ? with or without GUI ? (Give us the command line you use to run ktool).

And Please, if you still have the problem, translate the error message.

Note: .ini files (such as yours) made for standard version of ktool work as well with the modified version.

Opposite is not true.

If we modify again ktool to adress the quote inconsistency, compatibility will be completely broken !

0

Share this post


Link to post
Share on other sites

hi guys

i recently started look for an app just like this. its a really great app.

have been adding a "AppDesc" command to the ini file so that a user could get back some info about an app in the main dialog. sorry if this dubbles up on the context/desc function

have modifyed action on $listAvaible

Case $msg = $ListAvailable

$tItem = GUICtrlRead ( $ListAvailable )

GUICtrlSetData ($AppDesc ,"") ;remove any text as something else has happened

If $tItem <> "" And StringLeft ($tItem, 1) <> $NonSelectable Then

If CheckList($Selected, $tItem) = 0 Then

$Selected = $Selected & "|" & $tItem

GUICtrlSetData($ListSelected, $Selected)

Else

;MSGBOX("","", "Item already in list") ; might be a good place to tell the user that there already go this app in the list?

EndIf

$tNumber = UBound ( $AvailableArray )

For $i = 0 To $tNumber - 1

If $AvailableArray [$i][1] = "Section" Then ; works on all except the last section because of findnext returning -1?

If $tItem = $AvailableArray [$I][0] Then

For $x = $i To FindNextSection($AvailableArray,$i+1) ; add one so that it does not return the section number that i passed it.

if $AvailableArray [$x][1] = "AppDesc" then GUICtrlSetData ($AppDesc, StringReplace($AvailableArray [$x][0], "\n", @CRLF)) ; allow mutiline comments through the use of \n

Next

EndIf

EndIf

Next

EndIf

i also added the edit at the end of gui creation lines ->

$AppDesc = GUICtrlCreateEdit ("", 390,150,100,100,0x0804)

and added ~line 200 with the only ones to ensure that appdesc becomes part of the array

Case StringLeft ( $tLine, 7) = "AppDesc"

FillArray ($tArray, $tLine, "AppDesc" , $i)

i can post my full code but i am not sure of how many other small changes i made to the app.

0

Share this post


Link to post
Share on other sites

Could you post a screenshot? I know we could easily just add your code, but I'm just curious to see what it looks like before actually trying to implement it. :)

0

Share this post


Link to post
Share on other sites

it could possible do with some more work the code,

but i have added a screen shot hope you can see it ok.

main reason i added this to the code was, for informing people that i can't talk to what an app does.

post-93941-1145344851_thumb.jpg

Edited by cvd_army_com
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.