Jump to content

Iznogoud

Active Members
  • Posts

    276
  • Joined

  • Last visited

Profile Information

  • Location
    Netherlands

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Iznogoud's Achievements

Universalist

Universalist (6/7)

0

Reputation

  1. Hi, I am struggling to get a Windows application to have a red border around it or a red menu in the application itself by using a transparent PNG file. It is quite simple what i need, when a user opens a specific program it should draw a red border around it, telling the user to only use the application to view data and not to work in it. Anyone have a clue how to get this done? I have found this topic: https://www.autoitscript.com/forum/topic/97306-how-to-draw-a-line-around-a-window/ but for some reason i will not work properly with an example window like notepad. Someone who could help me to push me in to the right direction?
  2. What do you mean bij Snip?
  3. I tried contacting some people on the forum which offered their services before, but i still got no response. Could someone help me with the last step the put a GUI in front of it with buttons and when User Y is selected it will try to detect the hardware ID and will loop itself like it does now. When the hardware ID is disconnected it needs to close the application instead of logging off.
  4. Hi, i don't want to be bold, but can't you help me with this? I am even willing to pay for the services, because you probably can get this done alot quicker then i would. I don't mind to change the GUI with buttons time to time, so buttons are quicker for the employees.
  5. @Nine Sorry for my late reply, some issues i will not bother you with. But for some reason there is an error with this line $s_DeviceID [3] = ["VID_0781&PID_5530","Device #2","Device #3"] I can't get rid off it unless i use one DeviceID, but i was wondering, and trying now with one DeviceID, is it possible to secure a specific application with this script? What i would like to accomplish is an executable which a user can start and then it shows a GUI with a list of buttons with every single name of the employees, when clicked on User1 it then checks if the correct DeviceID is present, if so it should start the application, otherwise it should close / stop the entire script. When the DeviceID is unplugged from the system, it should close the application. This can be done with a simple processkill. Is this possible?
  6. Hi, Sorry for my late response, but i want to say your script works great and fast! Really good addition for my own security. But i do have one question, it now checks for 1 hardware ID, is it possible to add additional Hardware ID's ? For an example a back-up yubikey? I tried adding additional functions and renaming them, but i think i am creating a bigger mess then needed. Do you have suggestions?
  7. You are great!!! thank you for you time and effort!! None the less i have a problem, when i use the Hardware ID it says device not found, so i think your script is using an other kind of ID. How can i check if it uses the right ID of my yubikey?
  8. This looks really good, but way to difficult for my skill level.... I tried the USB Drive Monitor script, but that gives me an error also: ==> Variable must be of type "Object".: $colEvents = $objWMIService.ExecNotificationQuery ("Select * From __InstanceOperationEvent Within 5 Where " & "TargetInstance isa 'Win32_LogicalDisk'") $colEvents = $objWMIService^ ERROR >Exit code: 1 Time: 0.3105
  9. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Constants.au3> #include <WinAPISys.au3> Opt ("MustDeclareVars", 1) While 1 Local $data ="" Local $dvcn = Run(@comspec & ' /c devcon.exe hwids * | findstr "HID\VID_1050&PID_0114&REV_0340&MI_01"', _ @ScriptDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) sleep(1000) While True $data &= StdoutRead($dvcn) If @error Then ExitLoop Sleep(250) WEnd ;Msgbox (0,"",$data) if $data = "" then _WinAPI_LockWorkStation() WEnd I needed to add sleep(1000) after the Run command because sometimes when you stress out the CPU it will lock the computer even when the drive is still connected. EDIT While i am working it still locks the computer even when the drive is connected, so something is not going correct.
  10. Yes i would like to run it every sec. but then it randomly locks my screen and i think this is happening because the comspec part with the findstr is not ready yet in 1 sec. That is the reason i made it 3 sec. But i will change it back, but then it doesn't work correctly.
  11. This is the code i am working on now, and it seems to work. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Constants.au3> #include <WinAPISys.au3> Opt ("MustDeclareVars", 1) Local $data While 1 Local $dvcn = Run(@comspec & ' /c devcon.exe hwids * | findstr "HID\VID_1050&PID_0114&REV_0340&MI_01"', _ @ScriptDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) sleep(3000) $data &= StdoutRead($dvcn) if $data = "" then _WinAPI_LockWorkStation() Exit Else $data = "" EndIf ConsoleWrite("USB Drive connected" & @CRLF ) WEnd But i don't know if this is efficient or there is a better way. The sleep of 3000 is nessecary for running the compsec on a heavy load system. Sometimes it does a random lock from the OS... One problem i had now was the disconnecting from the Yubikey / USB Device and the ConsoleWrite stopped, but the screen wasn't locked I hope this was a one timer.
  12. I used your code and changed the Hardware ID like this: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Constants.au3> #include <WinAPISys.au3> Opt ("MustDeclareVars", 1) Local $data Local $dvcn = Run(@comspec & ' /c devcon.exe hwids * | findstr "HID\VID_1050&PID_0114&REV_0340&MI_01"', _ @ScriptDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) While True $data &= StdoutRead($dvcn) If @error Then ExitLoop Sleep(25) WEnd Msgbox (0,"",$data) ;if $data <> "" then _WinAPI_LockWorkStation() The messagebox is showing the Example.png image So if i am correct it should NOT lock my workstation, but it does.... Why is that? <> "" this means, if i am correct is nothing then lockworkstation?
  13. If you can use the hardware ID, then it doesn't matter if i am correct? To be using devcon.exe is not a problem. I could embed that with the fileinstall function.
  14. Regardless if it is a yubikey, you can even do it with a USB mouse or USB Storage device. Everything has its unique ID's.
  15. Sending it to a file every second and doing a filereadline is more resourcefull then it should be. If i search for more info on getting hardware ID's, i think there should be a better solution, but then again, i am not that good with it yet to tell how to get it to work.
×
×
  • Create New...