c# launch program when user wants to access a folder/file [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am working on folder/file lock program. Lets say my program knows which folders/files were locked, I want my program to launch (wpf window opens and asks for password) when user wants to access locked folder/file ( I want this possibility only on locked folders). Is there a way to do this?

Well. There is several ways. You could write a service that starts a program when locked folders are clicked. You could probably also write a program, that runs in the processline and are hidden normally. But pops up when a locked folder is clicked.
The big question is, why would you want to do that? Sounds like you're trying to write malware.

Related

detecting file changes in folder when program is not running [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I checked that the folder that's watched by FileSystemWatcher actually does not check or tells the changes in the folder while the program is not running. How can I check the changes in the folder when the program is off? I mean, how can the program tell 'the changes in the folder when the program is off'?
If you want to know that the changes have happened when they happen, you'll need to use a service (see here: https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications).

Start app when user logs in first time [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
How can i start an app when user logs on first time on a machine? I need to write an app which assists the user for example configuring other software, printer etc. What i need to ensure is, that this app starts when a user first logs into this machine.
How can I achieve this?
(If it helps, I only need to support Windows 10.)
Make an auxiliar process that starts your app when the computer starts. You can refer this one...
How to run a C# application at Windows startup?
then make a value at your db, for example firstLogin and changed to 0 for this user when your app is running.

C# code to make my program login in another one [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have one little windows form program with 2 buttons , the objective is to open executables , i did it already , yet i want the program to login with my credencials in those executables , accessing to a file where my user id and password is and then writing it in the login box .
Thanks
If the other program doesn't accept login credentials on their command line then consider using SendKeys to send the keystrokes directly. Check out this answer: C# using Sendkey function to send a key to another application

Winform app with loaded DB connection [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a question regarding problem i am solving. I am editing an old Winform app; currently the only part I need does not take input from the user(automated program). However the form contains database connection settings that program uses. Currently the program needs the user to press a button to start the process (code is associated with the button). Do i need to convert whole app to Console App or is there an easier way to automate this process without messing with the database connection settings.
Right now, you have a WinForm that runs code on a button press. You need to turn this into a "headless" or automatic process. Here is what I think based on your description would be the best things to do:
Remove the button, and have the code that was being ran by the button be called by a more "automatic" process, such as "Form_Load" or a timer.
Take the code and move it into a console app. As long as you don't ask for user input within the logic, it will run and close itself when it's done.
However, this is just some broad and generic suggestions. You need to look at your code and decide for yourself what to do.

Changing user process on a system process [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a little problem.The Device Manager is a list of processes. The process my application is active on my user (FoX0X). How to change the process to belong to the system (Replace "FoX0X" to "SYSTEM")? Besides that if you can not close it in the device manager?
I tried to use the code:
File.SetAttributes("AppName", FileAttributes.System);
But this dont work.
You can not change users a process is running under, you may be able to do impersonation to run a section of code as another user, but you can not modify the process itself to be running as another user.
To make your process run as SYSTEM it must be started under that user.

Categories