• 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

ellow guys..

im nooby hear

can anyone post a step by step guide how to use this tools?

tnx

really a big help

0

Share this post


Link to post
Share on other sites

For anyone trying to find updated version of this, I used the following link:

http://www.msfn.org/board/index.php?act=at...&tid=28393#

You need to be logged in to download it, but there's a version 1.2c! (actually says 1.1c when you run it). Some nice little niggles removed. Excellent tool, even in 2009. :thumbup

Oh, should say that the link is for the source code. 1 slight error is there's no space between & and the _ on line 1003. Compiled fine in Auto-it apart from that.

Sin

Edited by Sin_of_Nature
0

Share this post


Link to post
Share on other sites

Exactly what I was looking for. I'll test tonight nice and simple.

Edited by testtrytest
0

Share this post


Link to post
Share on other sites

I am a bit confused, if I compile the lastest source I have an error (Something saying -1 not existing), I am not a big user of Autoit but apparently by removing the line 65:

Opt("RunErrorsFatal"  , 0)

I don't have anymore the problem, does anyone have the same problem? Is this line important?

0

Share this post


Link to post
Share on other sites
I am a bit confused, if I compile the lastest source I have an error (Something saying -1 not existing), I am not a big user of Autoit but apparently by removing the line 65:

Opt("RunErrorsFatal"  , 0)

I don't have anymore the problem, does anyone have the same problem? Is this line important?

I had the same problem and looked it up. The "RunErrorsFatal"-command was removed from AutoIt v32120. This means you must remove this line running AutoIt v32120 and later

0

Share this post


Link to post
Share on other sites

One thing I find strange with latest version. It fire off the software in the order of the INI file NOT the order you specify in the Profiles list

For example, I put my software in Alphabetic order in the INI file (for ease of finding it).

[.Net Framework 2.0 SP1]
context = .Net Framework 2.0 SP1
description = Installing .Net 2.0
runwait = "%wpipath%\\Install\\Net Framework 2.0\\SP1\\NetFx20SP1_x86.exe" /norestart /qb

[Disable Shutdown Script]
context = Disable Shutdown Script
description = Disable Shutdown Script on PCs
runwait = "%wpipath%\\Install\\WKIX32.EXE" -i "%wpipath%\\Install\\Tweaks\\Shutdown_Disable.kix"

[Display Settings]
context = Display Settings
description = Sets Display Settings for Lab PCs
runwait = "%wpipath%\\Install\\WKIX32.EXE" -i "%wpipath%\\Install\\Tweaks\\DisplaySettings.kix"

However, In my profiles I have:

[Profiles]
Default=
Computer=|Display Settings|Disable Shutdown Script|.Net Framework 2.0 SP1

Even though .Net Framework 2.0 SP1 is listed last, it actually installs first as its 1st in the INI file. That definitely needs a bit of a code change. :blink:

Just looking at the code now, as I need the software to install in a certain order.

[update]

I've updated the code so it installs in the order specified in the Profiles list. Anyone wanting the code/binary, just PM me.

Sin

Edited by Sin_of_Nature
0

Share this post


Link to post
Share on other sites

Hi anyone knows how ktool can be recognized by windows seven?

P.S.: Hi Sin, can you send me the last code you have? I can't PM you.

I Think I found the part of the code to include Windows Seven but I'm not sure:

line 175:

;done

Func ReturnOSVersion () ;Get OS version to readable format

Select

Case $VER = "WIN_XP"

$OS = "Windows XP"

Case $VER = "WIN_2000"

$OS = "Windows 2000"

Case $VER = "WIN_98"

$OS = "Windows 98"

Case $VER = "WIN_ME"

$OS = "Windows ME"

Case $VER = "WIN_95"

$OS = "Windows 95"

Case $VER = "WIN_NT4"

$OS = "Windows NT4"

EndSelect

EndFunc ;ReturnOSVersion

line 584:

;win other

Func AutoLogon () ;Write autologon information to registry

If $Ver = "WIN_XP" Or $Ver = "WIN_2000" Or $Ver = "WIN_NT4" Then

RegWrite("HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\", "DefaultUserName", "REG_SZ", @UserName)

$Password = InputBox("Password", "Enter password for autologon" & @CR & $RebootCount & " restart(s) required", "", "*")

RegWrite("HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\", "DefaultPassword", "REG_SZ", $Password)

RegWrite("HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\", "AutoAdminLogon", "REG_SZ", "1")

RegWrite("HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\", "AutoLogonCount", "REG_DWORD", $RebootCount)

RegWrite("HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\", "DefaultDomainName", "REG_SZ", @LogonDomain)

EndIf

If $Ver = "WIN_98" Or $Ver = "WIN_95" Or $Ver = "WIN_ME" Then

MsgBox (0,"", "Autologon currently not avialable for " & $OS )

EndIf

EndFunc ;AutoLogon

Anyone can help please??? :unsure:

Edited by andee_damon
0

Share this post


Link to post
Share on other sites

The ReturnOSVersion function should contain:

Case $VER = "WIN_7"
$OS = "Windows 7"
Case $VER = "WIN_VISTA"
$OS = "Windows Vista"
Case $VER = "WIN_XP"
$OS = "Windows XP"
Case $VER = "WIN_2000"
$OS = "Windows 2000"
Case $VER = "WIN_98"
$OS = "Windows 98"
Case $VER = "WIN_ME"
$OS = "Windows ME"
Case $VER = "WIN_95"
$OS = "Windows 95"
Case $VER = "WIN_NT4"
$OS = "Windows NT4"

What you do with the new responses in that source is your own design. Note you can get the version simply by returning the @OSVersion macro:

MsgBox (0, "OS Version", @OSVersion)

For example:

OSVersion_Autoit.png

0

Share this post


Link to post
Share on other sites

Hi andee,

You still want the code? I havent added the win 7 bit mentioned above but other than thatm it works ok.

Sin

0

Share this post


Link to post
Share on other sites

Hi Sin! yes, I still want that code, can you post it here? or you can send me an email?

I added the Win7 line to the 1.2c version, but I haven't test it yet.

Andee

0

Share this post


Link to post
Share on other sites

Heres the code. Certainly not optimised (slower reading in file than 1.2c). Wont let me upload exe as its larger than 200k

Ignore the line "; THIS IS WHERE IT GOES ALL WRONG!", it was were I added the 'install in order listed' code. :)

kToolv1.2d_unoffical.zip

Edited by Sin_of_Nature
0

Share this post


Link to post
Share on other sites

I'm working on KTool 1.2d to handle ZIP or 7z files.

My software database is on a external hard drive, and I may use it on untrusted maybe infected computers. Therefore, I'm storing each driver or software in a zip file to protect my files against viruses.

I'm about to test some new instructions in INI file to use 7Za.exe to unzip a software in a temp folder, and then run an EXE or MSI file.

Do you feel theses changes useful ?

Edited by Necros
0

Share this post


Link to post
Share on other sites

Hi,

Not sure if you still use this, but the IsAdmin() function call does not work correctly under Vista and Windows 7.


Func CheckAdmin() ;Check if user has administrator rights
If IsAdministrator()=0 Then
If MsgBox (4,"","Administrator rights required. Continue?") = 7 then Exit
EndIf
EndFunc ;CheckAdmin

; Replacement function for IsAdmin
Func IsAdministrator($sUser = @UserName, $sCompName = ".")
Local $aCall = DllCall("netapi32.dll", "long", "NetUserGetInfo", "wstr", $sCompName, "wstr", $sUser, "dword", 1, "ptr*", 0)
If @error Or $aCall[0] Then Return SetError(1, 0, False)
Local $fPrivAdmin = DllStructGetData(DllStructCreate("ptr;ptr;dword;dword;ptr;ptr;dword;ptr", $aCall[4]), 4) = 2
DllCall("netapi32.dll", "long", "NetApiBufferFree", "ptr", $aCall[4])
Return $fPrivAdmin
EndFunc

The IsAdministrator was not written by me, some smart person on the AutoIt forum did. Works a treat though.

Zip function would be usefull. My next step to be able to adjust the install order (+ and - buttons) window so you can move applications up and down the install list.

Sin

I'm working on KTool 1.2d to handle ZIP or 7z files.

My software database is on a external hard drive, and I may use it on untrusted maybe infected computers. Therefore, I'm storing each driver or software in a zip file to protect my files against viruses.

I'm about to test some new instructions in INI file to use 7Za.exe to unzip a software in a temp folder, and then run an EXE or MSI file.

Do you feel theses changes useful ?

Edited by Sin_of_Nature
0

Share this post


Link to post
Share on other sites

The ReturnOSVersion function should contain:

Case $VER = "WIN_7"
$OS = "Windows 7"
Case $VER = "WIN_VISTA"
$OS = "Windows Vista"
Case $VER = "WIN_XP"
$OS = "Windows XP"
Case $VER = "WIN_2000"
$OS = "Windows 2000"
Case $VER = "WIN_98"
$OS = "Windows 98"
Case $VER = "WIN_ME"
$OS = "Windows ME"
Case $VER = "WIN_95"
$OS = "Windows 95"
Case $VER = "WIN_NT4"
$OS = "Windows NT4"

What you do with the new responses in that source is your own design. Note you can get the version simply by returning the @OSVersion macro:

MsgBox (0, "OS Version", @OSVersion)

For example:

OSVersion_Autoit.png

'UNKNOWN" on windows 8

0

Share this post


Link to post
Share on other sites

As you can CLEARLY see the code does not exist for win 8...

Case $VER = "WIN_7"

$OS = "Windows 7"

Case $VER = "WIN_VISTA"

$OS = "Windows Vista"

Case $VER = "WIN_XP"

$OS = "Windows XP"

Case $VER = "WIN_2000"

$OS = "Windows 2000"

Case $VER = "WIN_98"

$OS = "Windows 98"

Case $VER = "WIN_ME"

$OS = "Windows ME"

Case $VER = "WIN_95"

$OS = "Windows 95"

Case $VER = "WIN_NT4"

$OS = "Windows NT4"

0

Share this post


Link to post
Share on other sites

As you can CLEARLY see the code does not exist for win 8...

Case $VER = "WIN_7"

$OS = "Windows 7"

Case $VER = "WIN_VISTA"

$OS = "Windows Vista"

Case $VER = "WIN_XP"

$OS = "Windows XP"

Case $VER = "WIN_2000"

$OS = "Windows 2000"

Case $VER = "WIN_98"

$OS = "Windows 98"

Case $VER = "WIN_ME"

$OS = "Windows ME"

Case $VER = "WIN_95"

$OS = "Windows 95"

Case $VER = "WIN_NT4"

$OS = "Windows NT4"

i hope this ktool can work on windows 8,,i was add on code WIN_8 and not working, so i try the @OSVersion macro: MsgBox (0, "OS Version", @OSVersion),,and "UNKNOWN" Message Appear,,

0

Share this post


Link to post
Share on other sites

Add this to the ReturnOSVersion function:

Case $VER = "8"

$OS = "Windows 8"

0

Share this post


Link to post
Share on other sites

thanks,,solved,,i was update autolt version to 3.3.8.1 :

solved.png

solved2.png

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.