Do Windows Programs have any Restrictions?

greyfire

Reputable
Oct 18, 2014
37
0
4,540
Hi, i'm just wondering if there are any restrictions on things windows programs can/can't do.

For Example
-Could one program add or delete files of another program?
-Do all programs have to make themselves a folder in the "Program Files" or "Program Files (x86)" folders to be allowed to run? What are program folders for?
-Can programs create files outside of their "Program Files" folder without help from the user? (for example add a text document called "Hi" to the desktop without the user having to do "Save As Hi")
-Do all programs need to use an installer?
-Can programs ever edit system files?

I would think/hope there are some restrictions to prevent viruses from having full control of a computer but i'm also thinking about trying to build a program that would benefit from some of the examples being allowed so i'm curious to just what program limits are on windows.
Thanks!
 
Solution
This is a very broad question and I'm not exactly sure what you are looking for or your intentions but I will answer (a bit simply) the questions you posted. It gets complicated with user rights and certain folders/files having other security as well. You can change user account control and security options so it's going to be different for different people and/or devices along with the exact file being run and what file it is affecting.

For the most part, creating/deleting/modifying files is unrestricted out of the windows folder and other system locations. How does the computer know it's an input from the user or software? It doesn't. Files/folders are not "owned" by a software and it's like a free for all with the specific program...
This is a very broad question and I'm not exactly sure what you are looking for or your intentions but I will answer (a bit simply) the questions you posted. It gets complicated with user rights and certain folders/files having other security as well. You can change user account control and security options so it's going to be different for different people and/or devices along with the exact file being run and what file it is affecting.

For the most part, creating/deleting/modifying files is unrestricted out of the windows folder and other system locations. How does the computer know it's an input from the user or software? It doesn't. Files/folders are not "owned" by a software and it's like a free for all with the specific program just looking in a specific spot for what it needs. So all folders are pretty much for organizational purposes.

Program files folders is just the default install location and you can change this option. You can run software from any location but there are some software (as well as security) that won't let them run on removable drives or over a network. Although in that case you can also run into registry issues. That kind of goes into needing an installer; some software don't need registries so you can just run it whenever, where ever, others throw up errors.
 
Solution