Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 

kenedy

kTool (just another software selector)

Recommended Posts

Necros    0

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

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

Share this post


Link to post
Share on other sites
zuardin    0

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

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"

Share this post


Link to post
Share on other sites
zuardin    0

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,,

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.

×