Jump to content

kTool (just another software selector)


kenedy

Recommended Posts


  • 1 month later...

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
Link to comment
Share on other sites

  • 3 months later...

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
Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

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

Link to comment
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"

Link to comment
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,,

Link to comment
Share on other sites

  • 1 month later...

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.
×
×
  • Create New...