elevation

How to elevate Perl process using UAC

♀尐吖头ヾ 提交于 2019-12-01 22:29:50
Suppose I have a script that needs to read information from places that normal user is not permitted to read (e.g. other users' folders). Currently all I can do is complain about not being run as a "superuser" and quit, but I would rather like the script to ask for elevation itself. jm666 According to MSDN and PerlMonks , you can try: Win32::FileOp::ShellExecute( runas => 'yourprogram.exe' ) or Win32::FileOp::ShellExecute( runasuser => 'yourprogram.exe' ) These should (not tested) ask you for elevation when it is needed. (Works on Windows 7 only). Related: Requesting Administrator privileges

ImageButton elevation issue

空扰寡人 提交于 2019-12-01 21:32:06
Good afternoon, I am trying to create en ImageButton with a shadow. To do that : <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:padding="5sp"> <ImageButton android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/circle_shape_little" android:src="@drawable/ic_keyboard_arrow_right_black_24dp" android:elevation="3sp"/> </LinearLayout> But here is the result : As you can see, the borders are "cut", and I do not know why. Does anyone can help me ? Thank you. Add a

Win32 - Launching a highestAvailable child process as a normal user process

不羁岁月 提交于 2019-12-01 14:29:00
Suppose your Windows user account is in the Admin group, UAC is enabled, and you're running some program A with normal user privileges. A never asks for elevation and never receives it. Now suppose A wants to launch program B, which has highestAvailable in its manifest. If A calls CreateProcess(B), this will fail with error 740 ("elevation required") If A calls ShellExecuteEx(B), Windows will display a UAC box asking to run B elevated. The user can say Yes, in which case B will run elevated, or No, in which case the launch will fail. My question is: is there any way to achieve a third option,

Win32 - Launching a highestAvailable child process as a normal user process

霸气de小男生 提交于 2019-12-01 13:20:01
问题 Suppose your Windows user account is in the Admin group, UAC is enabled, and you're running some program A with normal user privileges. A never asks for elevation and never receives it. Now suppose A wants to launch program B, which has highestAvailable in its manifest. If A calls CreateProcess(B), this will fail with error 740 ("elevation required") If A calls ShellExecuteEx(B), Windows will display a UAC box asking to run B elevated. The user can say Yes, in which case B will run elevated,

Displaying an Elevation grid in ParaView

北战南征 提交于 2019-12-01 10:50:24
I'm new to ParaView and completely lost with all the different data formats. All I want to do is display an elevation grid which is produced by a program. I store the elevation grid in a two dimensional array of floats which is indexed by x and y coordinates and stores the z coordinate. In other words elevationGrid[x][y] stores the height above the point (x, y). Which file format should I use for this and how is it defined? It would be ideal if someone could give an example file for, say, a 3x3 grid. A first approach with a 5x5 grid and equation z = x^2+y^2, using a very simple input format.

Displaying an Elevation grid in ParaView

邮差的信 提交于 2019-12-01 08:45:22
问题 I'm new to ParaView and completely lost with all the different data formats. All I want to do is display an elevation grid which is produced by a program. I store the elevation grid in a two dimensional array of floats which is indexed by x and y coordinates and stores the z coordinate. In other words elevationGrid[x][y] stores the height above the point (x, y). Which file format should I use for this and how is it defined? It would be ideal if someone could give an example file for, say, a

Developing Apps with Administrator Rights in Delphi

混江龙づ霸主 提交于 2019-11-30 20:35:19
I'm using D2010 under Windows 7 to write an app that seems to require admin rights (I think because it uses COM to communicate with a third party .exe, which also requires admin rights). I've added the manifest resource as required, but when I try to debug the app from the IDE, it reports "Unable to create process. The requested operation requires elevation" ...and it won't run. If I run Delphi as administrator, then my app runs correctly, but this feels like a dangerous brute force approach, especially as most of the apps I develop don't need admin privileges. Is there any way of getting

Restart program unelevated

北城以北 提交于 2019-11-30 20:23:21
For some reason, my C# program needs to restart with elevated privileges. I use the following code to achieve it: private static void RestartForPermissionsFix() { ProcessStartInfo processInfo = new ProcessStartInfo(); processInfo.Verb = "runas"; processInfo.FileName = Assembly.GetExecutingAssembly().Location; Process.Start(processInfo); } This works great. After I "fix my privileges", I want to restart the program unelevated . I tried the same as above without the "runas", but it does not work. I assume the process being started from an elevated process automatically gets elevated. Any idea?

Looking for Delphi 7 code to detect if a program is started with administrator rights?

一笑奈何 提交于 2019-11-30 07:21:38
I am looking for working ( obviously ) Delphi 7 code so I can check whether my program is started with administrator rights . Thanks in advance [--- IMPORTANT UPDATE ---] Having reviewed the code in the answers so far, I realise that my question maybe is not so clear, or at least is not complete: I want to know whether my Delphi 7 program is started with the 'Run as admin' check box set . In other words: I want to know whether it is possible for my Delphi 7 program to create/update files in the c:\Program Files... folders . Just checking if you have administrator rights is not enough for this.

Restart program unelevated

社会主义新天地 提交于 2019-11-30 04:49:42
问题 For some reason, my C# program needs to restart with elevated privileges. I use the following code to achieve it: private static void RestartForPermissionsFix() { ProcessStartInfo processInfo = new ProcessStartInfo(); processInfo.Verb = "runas"; processInfo.FileName = Assembly.GetExecutingAssembly().Location; Process.Start(processInfo); } This works great. After I "fix my privileges", I want to restart the program unelevated . I tried the same as above without the "runas", but it does not