elevation

How to elevate an already running session within its own code

无人久伴 提交于 2019-12-06 08:41:13
I'm writting a PowerShell script that configures some things in Active Directory. I need to run it as a specific user in order to get the right permissions for the process, currently i'm running the .ps1 file through a .bat file, so I can choose "run as a different user" or "run as administrator". What I'm tryng to achieve is that inside the script I will ask the user for the right credentials, and then elevate the session to run with the inputed user creds. I've tried using this within my code: Start-Process powershell.exe -Credential "TestDomain\Me" But it just opens an empty PS Session

Elevation service UNKNOWN_ERROR

笑着哭i 提交于 2019-12-06 00:26:17
I'm having difficulty with the Google maps V3 JavaScript elevation service. According a google groups posting ( https://groups.google.com/forum/#!msg/google-maps-js-api-v3/Z6uh9HwZD_k/G1ur1SJN7fkJ ), it appears that if you use getElevationAlongPath() it compresses and sends the entire path to the Google server as an Ajax GET request and subsamples it on their server. This means that if you have a large number of path segments the encoded URL exceeds the maximum URL length and the request fails with UNKNOWN_ERROR. Can anyone confirm that this is a URL length issue? I've tried doing my own

WTSQueryUserToken always throws “An attempt was made to reference a token that does not exist” on Windows 7 in C#

最后都变了- 提交于 2019-12-05 16:20:00
I'm trying to launch a process from a Windows Service on Windows 7. This is my code to obtain the user token. uint sessionId = Kernel32.WTSGetActiveConsoleSessionId(); var userTokenPtr = new IntPtr(); if (!WtsApi32.WTSQueryUserToken(sessionId, out userTokenPtr)) { int lastError = Marshal.GetLastWin32Error(); throw new Win32Exception(lastError); } These are the DllImport statements : public class Kernel32 { [DllImport("kernel32.dll", EntryPoint = "WTSGetActiveConsoleSessionId")] public static extern uint WTSGetActiveConsoleSessionId(); } public class WtsApi32 { [DllImport("Wtsapi32.dll",

Solr: How to dynamically elevate limited number of documents? Has QueryElevationComponent to be modified?

半腔热情 提交于 2019-12-04 12:41:55
my requirement is to elevate a limited number of (e.g. five) documents for a user request. What I've got is a single document field which stores a numerical value similar to a boosting value which represents an elevator ranking value . So a user query would return 5 documents with the highest elevator ranking value and the remaining documents to fill a page in regular order. How to do that? The QueryElevationComponent does only allow static query definitions. Boosting does not allow to boost a limited number of documents for the special elevator ranking field. Do I have to write a modified

How to read HGT files in C++

情到浓时终转凉″ 提交于 2019-12-03 21:52:14
I'm trying to read the elevation data stored in HGT files. As far as I know they can be read as binary files. I found this thread: How do I access .HGT SRTM files in C++? Based on that post, my sample code is: #include <iostream> #include <fstream> int main(int argc, const char * argv[]) { std::ifstream::pos_type size; char * memblock; std::ifstream file ("N45W066.hgt", std::ios::in|std::ios::binary|std::ios::ate); if (file.is_open()) { size = 2; memblock = new char [size]; file.seekg(0, std::ios::beg); file.read(memblock, size); int srtm_ver = 1201; int height[1201][1021]; for (int i = 0; i

using Android Accelerometer to calculate distance , eleveation?

有些话、适合烂在心里 提交于 2019-12-03 17:07:02
can it be determined that where a person is i.e is he walking ? is he in elevator ? or is he climbing up the stairs ? using android's accelerometer or is there any other way to calculate such in android ? Pentium10 You can use a combination of the accelerometer and the digital compass, in phones that have them, to determine a speed and direction as mentioned in this post . If all you need to do is determine if the person is walking, all you need is the accelerometer. Just process its output for foot steps. There are plenty of tutorials on the web for detecting foot steps with an accelerometer.

Start process as limited user from elevated script

末鹿安然 提交于 2019-12-03 16:07:20
I have an elevated console running some bat files. Having this console running in elevated mode is mandatory for it to be able to perform some tasks like managing network shares, etc without asking for permissions. But sometimes the scripts also have to launch some applications which are not desired to run elevated. So we want our elevated bats to start come application in non-elevated mode. Is there any built-in way to do this on Windows? Processes were started with DOS command START up to the date. By the way, the machine is a Windows 7 Ultimate Edition x64. I know this isue is already

Set xlObj = CreateObject(“excel.application”) Requires Elevation (vbscript)

冷暖自知 提交于 2019-12-02 16:28:08
问题 Every time I try to run a script that includes the line Set xlObj = CreateObject("excel.application") in vbscript, I get an error saying "Line Requires Elevation". I assume this is a permissions issue, but I'm an admin on the machine where I'm trying to run this script, so I'm not sure what I need to do about this. 回答1: There is no mystery about it. We told you and you said "No that can't be it". If set to admin then a non admin can't access it. 来源: https://stackoverflow.com/questions

Set xlObj = CreateObject(“excel.application”) Requires Elevation (vbscript)

泄露秘密 提交于 2019-12-02 13:27:23
Every time I try to run a script that includes the line Set xlObj = CreateObject("excel.application") in vbscript, I get an error saying "Line Requires Elevation". I assume this is a permissions issue, but I'm an admin on the machine where I'm trying to run this script, so I'm not sure what I need to do about this. There is no mystery about it. We told you and you said "No that can't be it". If set to admin then a non admin can't access it. 来源: https://stackoverflow.com/questions/25982347/set-xlobj-createobjectexcel-application-requires-elevation-vbscript

ImageButton elevation issue

落花浮王杯 提交于 2019-12-02 00:04:02
问题 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