Programs that run without windows

How to Run Program without Admin Privileges and to Bypass UAC Prompt?

When started, many programs require permission elevation (shield on the app icon), but actually they don’t need the administrator privileges for their normal operation. For example, you can manually grant permissions for your users on the app folder in the ProgramFiles and/or registry keys used by the program. So when starting such a program under non-admin user account, a UAC prompt will appear and the user will be required to enter an administrator password (if User Account Control is enabled on the computer). To bypass this mechanism, many users simple disable UAC or grant admin privileges to a user by adding a user account to the local group “Administrators”. Of course, both methods are not safe.

Why some Windows apps not run under standard users and require administrator permissions?

An app may need the administrator privileges to modify some files (logs, configs, etc.) in its own folder in the C:\Program Files (x86)\SomeApp. By default, users don’t have edit (write and modify) permissions on this directory. In order this program to work normally, the administrator permissions are required. To solve this problem, you have to manually grant the modify and/or write permission for a user (or the built-in Users group) on the app folder at the NTFS file system level.

How to run a program that requires admin privileges under standard user?

Earlier we described how to disable a UAC prompt for the certain app using RunAsInvoker parameter. However, this method is not flexible enough.

You can also use RunAs with the saved administrator password (in the Windows Credentials Manager) using the /SAVECRED option. It is also insecure because the user can use the saved administrator credentials password to run any program on this computer.

Let’s consider an easier way to force any program to run without administrator privileges (without entering the admin password) and with UAC enabled (Level 4, 3 or 2 of the UAC slider).

Let’s take the Registry Editor as an example — regedit.exe (it is located in the C:\Windows\ folder). Notice the UAC shield next to the app icon. This icon means that elevation of privileges via UAC will be requested to run this program.

If you run regedit.exe , you will see a User Account Control window asking for the administrator credentials ( Do you want to allow this app to make changes to your device? ). If you do not provide a password and do not confirm elevation, the app won’t start.

Let’s try to bypass the UAC request for this program. Create the text file run-as-non-admin.bat containing the following code on your Desktop:

cmd /min /C «set __COMPAT_LAYER=RUNASINVOKER && start «» %1″

To force the regedit.exe to run without the administrator privileges and to suppress the UAC prompt, simple drag the EXE file you want to start to this BAT file on the desktop.

Читайте также:  Полное зависание компьютера windows 10

Then the Registry Editor should start without a UAC prompt and without entering an administrator password. If you open the Task Manager and add the Elevated column, you will see that there is the regedit.exe process without the elevated status (run with non-admin user permissions).

Try to edit any parameter in the HKEY_LOCAL_MACHINE registry hive. As you can see, a user cannot edit the item in this registry key (the user doesn’t have write permissions to the system registry keys). But you can add or edit registry keys and parameters in your user hive — HKEY_CURRENT_USER.

In the same way you can run any app using the BAT file. Just specify the path to the executable file.

run-app-as-non-admin.bat
Set ApplicationPath=»C:\Program Files\SomeApp\testapp.exe»
cmd /min /C «set __COMPAT_LAYER=RUNASINVOKER && start «» %ApplicationPath%»

You can also add a context menu that allows to run all apps without elevation. To do it, create the RunAsUser.REG file, copy the following code into it, save and import it into the Windows registry by double clicking on the reg file (you will need administrator permissions to apply this change).

After that, to run any application without the administrator privileges, just select “Run as user without UAC privilege elevation” in the context menu of File Explorer.

How to Bypass UAC with RunAsInvoker in __COMPAT_LAYER?

The environment variable __COMPAT_LAYER allows you to set different compatibility levels for the applications (the Compatibility tab in the properties of an EXE file). Using this variable, you can specify the compatibility settings to be used when starting a program. For example, to start an app in Windows 8 compatibility mode and 640×480 resolution, set the following:

set __COMPAT_LAYER=Win8RTM 640×480

The __COMPAT_LAYER variable has some options we are interested in. There are the following parameters:

  • RunAsInvoker – run an app with the privileges of a parent process without the UAC prompt;
  • RunAsHighest – run a program with the highest-level permission available to the user (the UAC prompt will appear if a user has the administrator privileges);
  • RunAsAdmin – run an app as administrator (the UAC prompt appears each time).

The following CMD code enables the RunAsInvoker mode for the current process and runs the specified program without elevation:

set __COMPAT_LAYER=RUNASINVOKER
start «» «C:\Program Files\MyApp\testapp.exe»

Enable RunAsInvoker Mode in the EXE File Manifest

As we said above, Windows 10 displays a UAC shield icon for programs that require elevation to run. Developers set this requirement when compiling the application in the program manifest .

You can edit the manifest of any exe file and disable the requirement to run the program in elevated mode.

To edit the program manifest, you can use the free Resource Hacker tool. Open the executable file of the app in Resource Hacker.

In the tree on the left, go to the Manifest section and open the program manifest. Pay attention to the following xml section:

It is thanks to the requireAdministrator option that Windows always tries to run this program as an administrator.

Change requireAdministrator to asInvoker and the save changes in exe file.

Note that now the UAC shield has disappeared from the program icon, and you can run it without asking for administrator password with the current user permissions.

In this case, you can force the program to use an external manifest file. Create a plain text file appname.exe.manifest (for example, Autologon.exe.manifest ) in the directory with the exe file and copy the manifest code from Resource Hacker into it. Change requireAdministrator to asInvoker. Save the manifest file.

Читайте также:  Сжать жесткий диск windows 10

To have Windows always try to use the external manifest file when launching exe files, enable a special registry parameter:

REG ADD «HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide» /v PreferExternalManifest /t REG_DWORD /d 1 /f

Restart Windows and make sure the program is using an external manifest file that says to run without administrator privileges.

How to Run Any Windows Programs Without Installing Them

Learn How to Run Any Windows Programs Without Installing Them: To Reduce memory loads and boost up computer speed we have a way that is How to Run Windows Programs without Installing Them. This is going to be a wonderful article for all those who have limited storage capacity for installing any app.

In windows, while we install any program it gets installed directly in the memory and there are numbers of programs that we need in our daily life to run on our computer which can burden our RAM that is Random access memory, which used to run tasks.

Running Windows programs without even installing them are somehow achievable you can do this in your windows operating system with a simple method that we have discussed underneath.

How to Run Any Windows Programs Without Installing Them

The method is quite simple but little longer as we will be configuring one third party software that will work as the emulator to run these program virtually without putting any load on main memory. So just proceed with some simple steps below.

Steps To Run Windows Programs without Installing Them:

Step 1. First of all, you need a program that helps you to run these program without really installing them on your foremost memory and for this, we have Zero install.

Step 2. Download and install Zero Install software in your Pc from the above link and launch the program and you will comprehend the screen like below.

Step 3. Now click on catalog section there and then refresh the server from the refresh button below. Now you will see the list of apps available to run on Zero Install, select any from the list.

Step 4. Here we are choosing Firefox browser which will start downloading in zero installers. After downloading run the software in the Zero Install. The software will run on it without getting physically installed on your computer.

That’s it! You are done, now you can run any of your favourite apps on any Windows PC without getting it physically installed on your computer.

So above is all about Run Windows Programs without Installing Them. With this, you can conserve your computer memory being trapped by this program and this will increase your computer processing speed. And you can accomplish complicated tasks on your Pc. Hope you like our work, share it with others too and leave a comment below if you need any suggestion at any steps.

How do I launch a program from command line without opening a new cmd window?

I’m trying to programmatically execute an external file from cmd using this command:

Where «filepath» is the path of my file. It opens fine but it also open a new command prompt window.

So, which is the right command for opening an external program without opening a new window?

9 Answers 9

In Windows 7+ the first quotations will be the title to the cmd window to open the program:

Читайте также:  Установка windows центр ремонта компьютеров

Formatting your command like the above will temporarily open a cmd window that goes away as fast as it comes up so you really never see it. It also allows you to open more than one program without waiting for the first one to close first.

Add /B, as documented in the command-line help for start:

Just remove the double quote, this works in Windows 7:

If you want to maximize the window, try this:

Your command START «filepath» will start a command prompt and change the command prompt title to filepath .

Try to run start /? in windows command prompt and you will get more info.

I think if you closed a program

end, so if you want to start a program that you can use

(/norma,/max/min are that process value cpu)

start «filepath»

if you want command line without openning an new window you write that

start /b «filepath»

/B is Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application.

If you’re doing it via CMD as you say, then you can just enter the command like so:

which will open it within the same window. For example in C++:

will open your.exe in the current CMD window. Likewise to start with a new window, just go for:

If you go for the first option, you would have to clear your screen unless you wanted to have the command to open your.exe on the screen still.

You can use the call command.

Usage: call [drive:][path]filename [batch-parameters]

For example call «Example File/Input File/My Program.bat» [This is also capable with calling files that have a .exe, .cmd, .txt, etc.

NOTE: THIS COMMAND DOES NOT ALWAYS WORK.

Not all computers are capable to run this command, but if it does work than it is very useful, and you won’t have to open a brand new window.

Create an Application without a Window

How would you program a C/C++ application that could run without opening a window or console?

7 Answers 7

When you write a WinMain program, you automatically get the /SUBSYSTEM option to be windows in the compiler. (Assuming you use Visual Studio). For any other compiler a similar option might be present but the flag name might be different.

This causes the compiler to create an entry in the executable file format (PE format) that marks the executable as a windows executable.

Once this information is present in the executable, the system loader that starts the program will treat your binary as a windows executable and not a console program and therefore it does not cause console windows to automatically open when it runs.

But a windows program need not create any windows if it need not want to, much like all those programs and services that you see running in the taskbar, but do not see any corresponding windows for them. This can also happen if you create a window but opt not to show it.

All you need to do, to achieve all this is,

The reason you require a WinMain itself is that once you mark the subsystem as Windows, the linker assumes that your entry point function (which is called after the program loads and the C Run TIme library initializes) will be WinMain and not main. If you do not provide a WinMain in such a program you will get an un-resolved symbol error during the linking process.

Оцените статью