Jump to content

Need to keep program running


Recommended Posts

   I have written a program that needs to be running on the users computers 100% of the time. The program is not very popular with the users because it limits what they can do with the computer hence they are always trying to find a way to defeat the program and terminate it.

   The program is started by putting an entry in the registry (HKLMSoftwareMicrosoftWindowsCurrent VersionRun). On Windows 7 they are defeating it by

opening Wordpad and with Wordpad open shutting down the computer. When the computer starts to shutdown Wordpad asks if they want to save the current document. If they just let it sit at that point Windows pops up with the screen saying "These programs are open" and gives them two options. Eithe Folrce the programs to close or Cancel the shutdown. If they cancel the shutdown my program has already been close and they can continue their Windows session without my program running. Not good.

   I do use the WM_CLOSE() function to politely exit my progam and am wondering if that is where I leave myself open to this issue. If I take out the WM_CLOSE() function with this avert the above mentioned problem? Any ideas on how to keep them from doing this would be greatly appreciated. Thanks!
 

Link to comment
Share on other sites

why do you want to run your program to other computers?? are you spying on them?? smells like keylogger.. this is where malware/spyware goes, HKLMSoftwareMicrosoftWindowsCurrent VersionRun + NoFolderOption. :think:

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Link to comment
Share on other sites

  • Moderators

Trax,

Welcome to the AutoIt forums. :)

I would like a lot more information before you get any help. Why does this program need to run on these computers? What is it intended to stop the users from doing? Why can you not impose other sanctions to dissuade them from closing it? :huh:

Over to you. ;)

All,

Just to make things absolutely clear - DO NOT POST in this thread until the all clear is given. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thanks for the welcome Melba23. In short it limits what the users can do and the programs they are allowed to use. The boss thinks too much time is wasted on non-business related activities. What do you mean "Why can you not impose other sanctions to dissuade them from closing it?"? Threat of termination doesn't seem to work. Trying to make it "tamper proof".
 

Link to comment
Share on other sites

  • Moderators

Trax,

 

Threat of termination doesn't seem to work

Interesting working environment.... :whistle:

Are the machines networked? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

   I don't know. I think it is the same old story of a few wrecking it for so many. I think of it like Parental Controls. There are only one or two people abusing things and they wreck it for everyone else. It really isn't any worse than web filters or not allowing them to put there own software on.

   I am not collecting any data of logging anything. Just restricting what they can do and where they can go. The computers are networked. So... any ideas?

Edited by Trax
Link to comment
Share on other sites

I dont see anyone jumping in on this and you last asked for ideas ...

Perhaps you can set a host program on the server and have your program ping the program on the server ,  let the server program check for time between pings, if greater than your preferred inactivity time, alert or take some action.

Every one should have unique non dynamic IPs (I assume this is a office intranet) so it should be easy to see which user's program is no longer running. Should work also if they block the program in firewall, 

Not sure if this is a good idea or bad idea but its what I would try with my limited programming finesse 

Link to comment
Share on other sites

I assume that you are an ITAdmin coz you want to limit user on something, well I dont have much experience on windows server but I guess windows server can restrict user on doing such non-related activities. you also don't know if the machines are networked, Let the admin make the decision... :muttley: :muttley: :muttley:

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Link to comment
Share on other sites

  • Moderators

Trax,

if the machines are networked then I believe you should be able to limit activities by setting permissions - I will ask someone who know more about networks to look in. :)


Shane0000 & 232showtime,

Which bit of:

All,

Just to make things absolutely clear - DO NOT POST in this thread until the all clear is given. :)

M23

did you not understand? :huh:

As it happens, you both suggested the same thing as myself, which is the only reason I am taking no further action. But think yourselves extremely lucky. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

You should create a service out of your AutoIt script. Services are shut down after the normal applications and have a whole set of recovery options, for example to restart the service whenever it is killed. Normal users also do not have permissions to disable or stop services (by default, though this can be changed). Make sure to "Allow service to interact with the desktop".

Gr,

Mana

Link to comment
Share on other sites

   Thanks Mana. The suggestion of turning it in to a service seems like the only real alternative but I can't seem to find out how to do that. I have asked if current scripts (V3.3.12.0) could be installed natively with the SC command or whether they need to be wrapped with something like Svrany or _Services_UDF V4 and I haven't been able to get any responses. It is like talking about services is taboo for some reason. Hopefully this weekend maybe someone will respond. Only time will tell.....

Link to comment
Share on other sites

  • Moderators

I would ask (again) what exactly are you trying to restrict, and what sort of network you have in place? With 2008 and above A.D., you can restrict a vast array of activities, without the need for a registry-based script that runs as a service. Can you please give some examples of what I, as WorkerA, might be doing that you want to stop me from accomplishing?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

   Thanks for the reply JLogan3o13. I am aware of what you can do with GPOs in a AD environment. That is actually what I do for a living. I really don't want to have to rely on the computers being networked in a AD environment. There are a lot of standalone computers in this environment too. I need  to make it as generic as possible it will work on a standalone or networked computers.

   I don't think what I am trying to do is really relavant. Let's say instead of restricting what the users do I simply want to write a program that logs how much time a user spends on the computer. It is the exact same senario. They can do the above mentioned "Word Pad Work Around" to kill my program and it will no longer be tracking how much time they spend on the computer.

   What I really need to focus on is getting an AutoIT script to function well as a service.

Link to comment
Share on other sites

  • Moderators

And you have to understand, too, when you offer only vague responses to questions regarding your intent on inserting a Service-level script into a bunch of machines, that there is going to be a lot of skepticism. I do this for a living too, and was gently pointing out that there are GPOs and security measures in place for a reason. What you have posted thus far still begs the question why you feel the need to circumvent these measures. We'll let the Mods weigh in, but I find the "what I'm trying to do is not relavant (sic), just tell me what I want to know" is not an acceptable answer.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Trax,

I agree with JLogan3o13. I allowed the thread to continue because I assumed that network policy would provide sufficient control for you. But the vagueness of your replies is reigniting my initial concerns - please provide some specifics or I will be forced to do what I have been trying very hard to avoid. :(

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

MBALZESHARI,

No need - if you are happy then so am I. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

To explain it simply for everyone:

  The environment Trax supports is a mix of stand alone PCs as well as network PCs. He needs ALL the PCs to have the same controls as afar as restrictions. Currently he has running an AutoIt solution on each PC that for the most part works fine. The problem is he has several users who have figured out ways to defeat the AutoIt solution by 'cancelling a "in progress" shutdown'. With a "cancelled in progress shutdown" all the programs that were not running as a service get cut off and this kills the AutoIt solution, thus allowing users to have access to things and websites that the company does not desire.

   His company is very happy with the AutoIt solution so buying a specific product to do what the AutoIt solution does is simply not in the cards here. Saying that, the helpful suggestions to go this route will not be used. With the other suggestion that he use AD, seeing how some of the PCs are standalone using AD is not the best way to go.

Having to deal with this problem myself in years past; Trax and I agree running the AutoIt solution as a service is the best solution. This will prevent the users from using the "cancelling a in progress shutdown" method of defeating the AutoIt solution.

I found on the Wiki this information on how do run an AutoIt script as a service.

http://www.autoitscript.com/wiki/FAQ#How_can_I_create.2Fstart.2Fstop_or_otherwise_control_a_service.3F

Edited by MBALZESHARI
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...