Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

_runonlyonthispc() Udf


  • Please log in to reply
31 replies to this topic

#1 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,859 posts

Posted 24 April 2006 - 08:56 PM

HI,

I tried to make a func which allows you to activate your script.exe on a PC and nobody could use it on other PCs.

This UDF writes a pseudo unique key to the registry during activation. After activation you put one line of code at top of your script and then it will exit if the keys don't match.

Tell me what you think about it...

AutoIt         
#include <String.au3> ; Added the option to specify whether it runs only on this windows, or this harddrive. If _runOnlyOnThis("", "", -1, "test", 1) <> 1 Then Exit (0) ; Put your script code below here MsgBox(64, "Secured Program", "Yeah, the secured main-program started!" & _         @CRLF & @CRLF & "Thanks & and have fun!" & @CRLF & @CRLF & "Mega") ;=============================================================================== ; ; Function Name:    _runOnlyOnThis ... ; Description:    Activation by parameter sets a unique registry key ;                   After a successful activation, checks for the regkey ;                   If correct go on, else Exit(0) ; ; Parameter(s):  (Script) First time, the activation key ;                   (Func) $s_KeyName = RegKeyName ;                          $s_EncryptPassword = Encryption passphrase ;                          $i_EncryptLevel = Level (quantity) ;                          $s_ActivationKey = key which starts the func ;                          $i_Option (default =1) ; ;                          _runOnlyOnThis ... $i_Option ;                          1 = Windows installtion (Date) ;                          2 = HardDrive ; ; Return Value(s):  On Success - Returns  1 ;                   On Failure - Returns -1 RegWrite Problem, ;                                Returns -2 Not activated, ;                                Returns -3 Wrong registry key ;                                Returns -4 Couldn't DriveGetSerial ; ; Note(s):          Basically useful to prevent user starting the script on ;                   non activated PCs ;                   String.au3 has to be included ; ; Author(s):        Thorsten Meger ; ;=============================================================================== Func _runOnlyOnThis($s_KeyName, $s_EncryptPassword, $i_EncryptLevel, $s_ActivationKey, $i_option = 1)         If $s_KeyName = "" Then $s_KeyName = "Version"     If $s_EncryptPassword = "" Then $s_EncryptPassword = "thisPc"     If $i_EncryptLevel = -1 Then $i_EncryptLevel = 2     If $s_ActivationKey = "" Then $s_ActivationKey = "activate"     If $i_option <> 1 Or $i_option <> 2 Then $i_option = 1         If $i_option = 1 Then         Local $stringToCrypt = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "InstallDate")     ElseIf $i_option = 2 Then         Local $stringToCrypt = DriveGetSerial(StringLeft(@SystemDir, 3))         If @error = 1 Then Return -4     EndIf         Local $crypted = _StringEncrypt(1, $stringToCrypt, $s_EncryptPassword, $i_EncryptLevel)     If $cmdLine[0] > 0 And $cmdLine[1] = $s_ActivationKey Then         RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\" & StringLeft(@ScriptName, StringLen(@ScriptName) - 4), $s_KeyName, "REG_SZ", _                 StringTrimLeft($crypted, 4))         Return -1             ElseIf RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\" & StringLeft(@ScriptName, StringLen(@ScriptName) - 4), $s_KeyName) = "" Then         MsgBox(64, "Error", "You are not allowed to run this program!", 5)         Return -2             ElseIf RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\" & StringLeft(@ScriptName, StringLen(@ScriptName) - 4), $s_KeyName) <> _             (StringTrimLeft($crypted, 4)) Then         MsgBox(64, "Error", "You are not allowed to run this program on this computer!", 5)         Return -3     EndIf     Return 1 EndFunc ;==>_runOnlyOnThis ƒo݊÷ Ù:rدjײ¢êìr¸©·br§r[zËay@Åj–«jg­z¸¬ºÇb‹œj{)yȟÊØb²–«jg­z¶òʋ«£    Ó¢›­Ê‹«¦º-^^¢z-…êÏ Â–Ê&i×­†+%ŠÛez¥¥êð†'!ʋš–Ê¢œ­¢Ø^


Hope someone will test it and give some feedback!

P.S.: I don't know whether someone did that anyway, before but ... :think:

Edit: Updated version
- Added option runOnlyOnThis Windows( InstallDate) or runOnlyOnThis HardDrive (Serial)
Edit2: 09.06.2006 Changed from code to autoit tags

Thanks!

So long,

Mega

Attached File  ActivateScript.au3   1.14KB   1055 downloads
Attached File  _runOnlyOnThis.au3   2.98KB   1020 downloads

Edited by th.meger, 09 June 2006 - 08:58 AM.

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times








#2 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,859 posts

Posted 25 April 2006 - 09:07 AM

HI,

> 50 views and no comments :(

I know that the func should be renamed into _runOnlyOnThisWindows because it uses the InstallDate and not something PC specific like e.g. prozessor -ID for creating the unique key. :think:

Hope someone will comment even when its severe criticism.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times


#3 taurus905

taurus905

    "Lead, follow, or get out of the way."

  • Active Members
  • PipPipPipPipPipPip
  • 447 posts

Posted 25 April 2006 - 09:46 AM

HI,

> 50 views and no comments :(

I know that the func should be renamed into _runOnlyOnThisWindows because it uses the InstallDate and not something PC specific like e.g. prozessor -ID for creating the unique key. :think:

Hope someone will comment even when its severe criticism.

So long,

Mega


th.meger,
Thanks for sharing your script with AutoIt community. Run Only On This PC is something I have been interesting in. I used the "DriveGetSerial" feature to ensure that my applications will only run on hard drives that have been registed with me. It is one feature that I have not been able to figure out how to do with Visual Basic 2005 Express Edition.

Look into "DriveGetSerial" and you might find it more pratical for your purpose.
taurus905
"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

#4 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,859 posts

Posted 25 April 2006 - 10:04 AM

th.meger,
Thanks for sharing your script with AutoIt community. Run Only On This PC is something I have been interesting in. I used the "DriveGetSerial" feature to ensure that my applications will only run on hard drives that have been registed with me. It is one feature that I have not been able to figure out how to do with Visual Basic 2005 Express Edition.

Look into "DriveGetSerial" and you might find it more pratical for your purpose.
taurus905


Hi,

thanks for the response. Maybe I'll use it to combine the keys or make it possible to choose whether you want the installDate which means (only this Windows) or DriveGetSerial which means (only this hard drive).

I looked at MsgBox(0,"", DriveGetSerial(StringLeft(@SystemDir,3)))

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times


#5 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,859 posts

Posted 25 April 2006 - 08:14 PM

Hi,

I added your suggestion to the function. Now there is another parameter for the option to choose whether the program should only run on this windows (checked by InstallDate) or only on the harddrive windows is installed on (checked by Serial of hardDirve).

It is poosible to add more options like CPU or whatever...

So long,

Mega

Edit: Removed the code, cause it is changed already in first post.

Edited by th.meger, 29 August 2006 - 06:46 PM.

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times


#6 taurus905

taurus905

    "Lead, follow, or get out of the way."

  • Active Members
  • PipPipPipPipPipPip
  • 447 posts

Posted 26 April 2006 - 03:37 AM

Hi,

I added your suggestion to the function. Now there is another parameter for the option to choose whether the program should only run on this windows (checked by InstallDate) or only on the harddrive windows is installed on (checked by Serial of hardDirve).

It is poosible to add more options like CPU or whatever...

So long,

Mega


th.meger,
Thanks for sharing your script. I'm sure it will be found useful to some users who want to restrict access to their programs to registered users.
I will look at it closer in the future.
I do not know about using other options, such as CPU ID.
The hard drive serial number is the best one I could find that is hardware specific.
taurus905
"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

#7 PerryRaptor

PerryRaptor

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 383 posts

Posted 26 April 2006 - 04:38 AM

I wonder if AutoIT is up to the task of securing USB ports to prevent pocket media, such as thumb drives from working on PCs and workstations.

We would need a method to allow only particular pocket media by serial number; and/or UserName; and/or WorkstationName.

Pocket media poses a substantial threat to protecting Intellectual Property and security.

#8 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,859 posts

Posted 26 April 2006 - 08:02 AM

I wonder if AutoIT is up to the task of securing USB ports to prevent pocket media, such as thumb drives from working on PCs and workstations.

We would need a method to allow only particular pocket media by serial number; and/or UserName; and/or WorkstationName.

Pocket media poses a substantial threat to protecting Intellectual Property and security.


Hi,

although this belongs not to the topic, I try to answer it as good as I can. :(

It is very difficult to read the VendorID of an USB-Stick, because the vendors/producers don't follow the rule to save unique IDs on the sticks every time. Especially the noName ones.

But you can try to use USBView from http://www.ftdichip.com/Resources/Utilities.htm

Wrap it by an Autoit-Script (you can try my wrapper :think: ) And then read the infomartion from the stick.
If the information don't match the ones you expect, then block ...

So long,

Mega

Maybe you can make on own thread about this topic.

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times


#9 ptrex

ptrex

    Universalist

  • MVPs
  • 2,420 posts

Posted 26 April 2006 - 09:08 AM

Here are some unique ID' s you can use to add on.

Plain Text         
#Include <Constants.au3> Dim $strComputer, $objWMIService Const $wbemFlagReturnImmediately = 0x10 Const $wbemFlagForwardOnly = 0x20 $strComputer = inputbox( "Please enter the name of the computer you want", "Input","localhost") $objWMIService = ObjGet("winmgmts:{(RemoteShutdown)}//" & $strComputer & "\root\CIMV2") _Read_BioS() _Read_CPU() _Read_OS() _Read_OS_Inst() _Read_DriveInfo() Func _Read_BioS() Local $colItems = ""   $colItems = $objWMIService.ExecQuery("Select * from Win32_BIOS")        For $objItem in $colItems      Local $item = $objItem.SerialNumber         MsgBox(0,'Output','Bios Serial #: ' & $Item)       Next EndFunc Func _Read_CPU() Local $colItems = ""   $colItems = $objWMIService.ExecQuery("Select * from Win32_Processor")        For $objItem in $colItems      Local $item = $objItem.Name         MsgBox(0,'Output','CPU Type: ' & $Item)    Next EndFunc Func _Read_OS() Local $colItems = ""   $colItems = $objWMIService.ExecQuery("Select * from Win32_OperatingSystem")        For $objItem in $colItems      Local $item = $objItem.SerialNumber         MsgBox(0,'Output','OS Serial #: ' & $Item)     Next EndFunc Func _Read_OS_Inst() Local $colItems = ""   $colItems = $objWMIService.ExecQuery("Select * from Win32_OperatingSystem")        For $objItem in $colItems      Local $date = $objItem.InstallDate                 $CDate = (StringMid($Date, 5, 2) & "/" & _         StringMid($Date, 7, 2) & "/" & StringLeft($Date, 4) _             & " " & StringMid ($Date, 9, 2) & ":" & _                 StringMid($Date, 11, 2) & ":" & StringMid($Date, _                     13, 2))     MsgBox(0,'Output','Install Date/Time #: ' & $CDate)     Next EndFunc Func _Read_DriveInfo()     Local $colItems = ""     $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_DiskDrive", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)     For $objItem in $colItems      Local $item = $objItem.Model         MsgBox(0,'Output','Drive Model : ' & $Item)         Local $item = $objItem.Signature         MsgBox(0,'Output','Drive Signature : ' & $Item)      Next EndFunc


Enjoy !!

EDIT : Added Drive information on request of taurus905

Edited by ptrex, 26 April 2006 - 10:15 AM.


#10 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,859 posts

Posted 26 April 2006 - 05:56 PM

Hi,

thanks for the reply. I already knew that funcs and don't want to add those funcs as options because the possibility to decide whether a script should only run on this windows or only on this hardDrive is 99 % enough. :think:

Nevertheless, thanks for the post.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times


#11 powaking

powaking

    Wayfarer

  • Active Members
  • Pip
  • 79 posts

Posted 01 May 2006 - 03:35 PM

HI,

I tried to make a func which allows you to activate your script.exe on a PC and nobody could use it on other PCs.

This UDF writes a pseudo unique key to the registry during activation. After activation you put one line of code at top of your script and then it will exit if the keys don't match.

Tell me what you think about it...

Plain Text         
#include <String.au3> ; Added the option to specify whether it runs only on this windows, or this harddrive. If _runOnlyOnThis("", "", -1, "test", 1) <> 1 Then Exit (0) ; Put your script code below here MsgBox(64, "Secured Program", "Yeah, the secured main-program started!" & _         @CRLF & @CRLF & "Thanks & and have fun!" & @CRLF & @CRLF & "Mega") ;=============================================================================== ; ; Function Name:    _runOnlyOnThis ... ; Description:    Activation by parameter sets a unique registry key ;                   After a successful activation, checks for the regkey ;                   If correct go on, else Exit(0) ; ; Parameter(s):  (Script) First time, the activation key ;                   (Func) $s_KeyName = RegKeyName ;                          $s_EncryptPassword = Encryption passphrase ;                          $i_EncryptLevel = Level (quantity) ;                          $s_ActivationKey = key which starts the func ;                          $i_Option (default =1) ; ;                          _runOnlyOnThis ... $i_Option ;                          1 = Windows installtion (Date) ;                          2 = HardDrive ; ; Return Value(s):  On Success - Returns  1 ;                   On Failure - Returns -1 RegWrite Problem, ;                                Returns -2 Not activated, ;                                Returns -3 Wrong registry key ;                                Returns -4 Couldn't DriveGetSerial ; ; Note(s):          Basically useful to prevent user starting the script on ;                   non activated PCs ;                   String.au3 has to be included ; ; Author(s):        Thorsten Meger ; ;=============================================================================== Func _runOnlyOnThis($s_KeyName, $s_EncryptPassword, $i_EncryptLevel, $s_ActivationKey, $i_option = 1)         If $s_KeyName = "" Then $s_KeyName = "Version"     If $s_EncryptPassword = "" Then $s_EncryptPassword = "thisPc"     If $i_EncryptLevel = -1 Then $i_EncryptLevel = 2     If $s_ActivationKey = "" Then $s_ActivationKey = "activate"     If $i_option <> 1 Or $i_option <> 2 Then $i_option = 1         If $i_option = 1 Then         Local $stringToCrypt = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "InstallDate")     ElseIf $i_option = 2 Then         Local $stringToCrypt = DriveGetSerial(StringLeft(@SystemDir, 3))         If @error = 1 Then Return -4     EndIf         Local $crypted = _StringEncrypt(1, $stringToCrypt, $s_EncryptPassword, $i_EncryptLevel)     If $cmdLine[0] > 0 And $cmdLine[1] = $s_ActivationKey Then         RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\" & StringLeft(@ScriptName, StringLen(@ScriptName) - 4), $s_KeyName, "REG_SZ", _                 StringTrimLeft($crypted, 4))         Return -1             ElseIf RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\" & StringLeft(@ScriptName, StringLen(@ScriptName) - 4), $s_KeyName) = "" Then         MsgBox(64, "Error", "You are not allowed to run this program!", 5)         Return -2             ElseIf RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\" & StringLeft(@ScriptName, StringLen(@ScriptName) - 4), $s_KeyName) <> _             (StringTrimLeft($crypted, 4)) Then         MsgBox(64, "Error", "You are not allowed to run this program on this computer!", 5)         Return -3     EndIf     Return 1 EndFunc;==>_runOnlyOnThis


To activate your script which includes the UDF a parameter is used. You can specify this parameter by your own.

To put your protected exe on other PCs, I also made this little helper, which you also copy to the PC and run iit ones. (It deletes itself after the activation of the mainScript)

Helper:

Plain Text         
_activateScript("RunOnlyOnThisPc.exe", "test") ;=============================================================================== ; ; Function Name:    _activateScript ; Description:      Activates the script which is protected by _runOnlyOnThisPC ; ; Parameter(s):  $s_programName = name (script.exe) ;                   $s_ActivationKey = key which starts the func ; ; Return Value(s):  Non ; ; Note(s):          Basically useful to start(activate) the _runOnlyOnThisPC ;                   protected script ;                   Should be on own script.exe in the same folder! ; ; Author(s):        Thorsten Meger ; ;=============================================================================== Func _activateScript($s_programName, $s_ActivationKey)     Run(@ScriptDir & "\" & $s_programName & " " & $s_ActivationKey)     Local $cmdfile     FileDelete(@TempDir & "\scratch.cmd")     $cmdfile = ':loop' & @CRLF _              & 'del "' & @ScriptFullPath & '"' & @CRLF _              & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _              & 'del ' & @TempDir & '\scratch.cmd'     FileWrite(@TempDir & "\scratch.cmd", $cmdfile)     Run(@TempDir & "\scratch.cmd", @TempDir, @SW_HIDE) EndFunc;==>_activateScript


Hope someone will test it and give some feedback!

P.S.: I don't know whether someone did that anyway, before but ... :think:

Edit: Updated version
- Added option runOnlyOnThis Windows( InstallDate) or runOnlyOnThis HardDrive (Serial)

Thanks!

So long,

Mega

Attached File  ActivateScript.au3   1.14KB   1055 downloads
Attached File  _runOnlyOnThis.au3   2.98KB   1020 downloads


Take a look at what I've done to my apps. It can be done instantaniously and doesn't matter which computer they run it from. Just relys on the currently logged on user.

http://www.autoitscript.com/forum/index.ph...topic=24019&hl=

#12 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,859 posts

Posted 02 May 2006 - 04:11 PM

Take a look at what I've done to my apps. It can be done instantaniously and doesn't matter which computer they run it from. Just relys on the currently logged on user.

http://www.autoitscript.com/forum/index.ph...topic=24019&hl=


HI,

I had a look at your solution. But, your idea will only work when the user is already in your list and has connection to the internet, the server is available and so on. + the user can use your script from every location on every pc. That is not what I wanted to achieve / avoid. :think:

I wanted to be able to add a small func to a script, so that only activated (e.g.: Windows, PC, ...) scripts can be started.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times


#13 Dizzy

Dizzy

    Polymath

  • Active Members
  • PipPipPipPip
  • 224 posts

Posted 09 June 2006 - 08:38 AM

Hi Maga,

i like your script. But - how can i get the "installdate" in a variable to validate a little bit more?

I've tried something like this:

Run(@ComSpec & " /c " & 'netsh diag show os /v | find "Install" > ' & $instdate, "", @SW_HIDE)


but i didn't get the date.
Can you help me?

Thanks
Jens

#14 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,859 posts

Posted 09 June 2006 - 08:51 AM

Hi,

thanks! :D
Have a look at my sig, there is another script

WindowsGetSerial +...

There you'll find what you need.

So long,

Mega

Or just:

$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") For $objOperatingSystem In $colSettings Next MsgBox(64, "InstallDate", WMIDateStringToDate($objOperatingSystem.InstallDate)) Func WMIDateStringToDate($dtmDate)     Return (StringMid($dtmDate, 7, 2) & "/" & _             StringMid($dtmDate, 5, 2) & "/" & StringLeft($dtmDate, 4) _              & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2)) EndFunc   ;==>WMIDateStringToDate

Edited by th.meger, 09 June 2006 - 08:56 AM.

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times


#15 Dizzy

Dizzy

    Polymath

  • Active Members
  • PipPipPipPip
  • 224 posts

Posted 11 June 2006 - 08:11 AM

Yes - great! :D

Thanks Mega!

#16 dandymcgee

dandymcgee

    Valik's #1 Fan

  • Active Members
  • PipPipPipPipPipPip
  • 812 posts

Posted 29 August 2006 - 03:14 PM

@th.meger Wow, this is one awesome script man, works great. I have found only one major flaw with this. If, for some unknown reason, the person who you have given permission to use this script decides to copy the HELPER file, they can install it on any computer they want. I know it is very unlikely someone would decide to copy this before they ran it, but if they did, they would have unlimited access on any computer they want by simply copying it for as many computer as they want to run it on. Maybe there is some way to protect that file from being copied by making it hidden or something? If we can somehow prevent copying of this file, then this program will be pretty much failproof. Keep up the good work man.
- Dan [Website]

#17 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,864 posts

Posted 29 August 2006 - 03:19 PM

@th.meger Wow, this is one awesome script man, works great. I have found only one major flaw with this. If, for some unknown reason, the person who you have given permission to use this script decides to copy the HELPER file, they can install it on any computer they want. I know it is very unlikely someone would decide to copy this before they ran it, but if they did, they would have unlimited access on any computer they want by simply copying it for as many computer as they want to run it on. Maybe there is some way to protect that file from being copied by making it hidden or something? If we can somehow prevent copying of this file, then this program will be pretty much failproof. Keep up the good work man.

FileInstall()
Run()
FileDelete()

Might help.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.


#18 dandymcgee

dandymcgee

    Valik's #1 Fan

  • Active Members
  • PipPipPipPipPipPip
  • 812 posts

Posted 29 August 2006 - 05:25 PM

Ummm... I used this program on my computer, and couldn't figure out how to reset it. How do I make it work again? Everytime I run it, it says it can't be used on this computer. Is there a way to delete the registry key, and make a new one? HEHE, I really messed that one up...
- Dan [Website]

#19 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,859 posts

Posted 29 August 2006 - 06:54 PM

Hi,

yes. Have a look here HKEY_LOCAL_MACHINE\SOFTWARE\ and then the scriptname.

I'll think about how to prevent users from starting it twice or even more.

Normally I go to the pcs I want to add my script and activate it myself. I only wrote the activate script cause I'm too lazy to call the script on every pc in a dos box with a parameter. This way doing it by script that deletes itself after having done its job is much easier. :P

So long,

Mega

@Ron : I don't understand your suggestion.

Scripts & functions Organize Includes Let Scite organize the include files *new

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times


#20 dandymcgee

dandymcgee

    Valik's #1 Fan

  • Active Members
  • PipPipPipPipPipPip
  • 812 posts

Posted 29 August 2006 - 09:10 PM

Thanks, lol, I overlooked it in regedit. I was in HKEY_LOCAL_MACHINE/System, but didn't notice it because of the stupid name i gave it (system stuff) lol.
- Dan [Website]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users