So I wrote a drive letter changer app (for flash drives) after this final last straw I was forced to deal with, every time I insert the same flash drive (FD) into my laptop. Sometimes it would stay the same drive letter and sometimes not. I guess the confusion occurs when I insert a flash drive or mem stick, similar or otherwise, it was hit or miss. The point is, I have certain project files and scripts on one fd where in the script I made several hard-coded drive/folder locations. And when the drive letter changes on the actual fd, nothing works properly or at all. I've been wanting to write something up myself so that I would not have to remember that app, you know, computer management, navigate to where I have to perform the task and wait for drives to be read and presented to me for change. The app I wrote eliminates all that and I can swap/change/fix the fd instantly.
So, running w/out first calling "run as administrator" rights, seem to work for Computer Management.
Is there a way to call or invoke admin rights so that the app can run without my having to run the app via right-click/select 'run as admin' ?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 7 of 7
Thread
-
-
I only know about one method that runs programs with administrator privileges every time.
1. Log in with an administrator account.
2. Right-click on the Start menu icon or the executable file.
3. Click on "Properties" in the context menu.
4. Click on the "Compatibility" tab in the Properties window.
5. Check the box beside "Run this program as an administrator" (near the bottom of the window)
6. Click "Change settings for all users" if you want to make it possible for all users to run the program with administrator privileges.
7. Click the "OK" button at the bottom of the window.
I'm not sure this will work with a portable program. I have only tried it with programs that I installed.Last edited by usually_quiet; 28th Dec 2016 at 00:48.
Ignore list: hello_hello, tried, TechLord, Snoopy329 -
The proper way is to build your program with requestedExecutionLevel = requireAdministrator.
Don't know what you're building with so can't help you there. In Visual Studio you probably find it in Property Pages\Configuration Properties\Linker\Manifest File. Change "UAC Execution Level" to requireAdministrator.
You can change after the fact if you must, with a manifest-editor, but you might not be able to certify the executable then. If so usually_quiets solution is better although it doesn't follow the file if copied. It's then stored in the registry at either
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
depending on if you applied to current or all users. -
There was a way to run a program in administrator mode without even being prompted for elevation. It had to do with windows tasks or jobs or something. I got it working at one point so it was possible, but I think I was using Windows 7 at the time.
...
Um, if you give a flash drive a letter like "Q" or something it should reacquire that drive letter every time you plug it in. It should only be given another letter if another drive has claimed the letter in it's absence, so stick to the later letters in the alphabet and you should be fine, without needing that program or administrator privileges at all. -
system specs: Delphi XE7 platform development
Thanks everyone for your advice and suggestions so far. Much appreciated.
I follow a usual pattern to minimize driver letter confusion. I keep one fd in one port and almost never remove it. same with another two fd's. but on rare occasions, i have to remove any one of them or all of them and that's when drive letters get rearranged, or when I throw in a 3-port or 4-port hub the drive letters get rearranged. sometimes it doesn't change the drive letter, but then sometimes it does. I can't explain why or how it does this nonsense, only that it does and when it does it drives me mad. Anyway. I have this tool and it works perfectly.
Eventually I may share it with others if they find it useful. For that situation I would need to find the best method for making the app w/out admin rights requirements.
I found this resource interesting but its difficult to follow. The steps are not easy for me to get it working. And I have no windows administration experience what-so ever.
http://stackoverflow.com/questions/6226976/how-to-add-manifest-requestedprivileges-inf...delphi-project -
Yes, that seems quite convoluted.
You can also set run as admin on shortcuts, in the advanced options rather than the compability page. That will stay with the shortcut but requires the program to reside somewhere predictable of course.
I would try to learn how to include a custom manifest with Delphi though.
To look at, and in some circumstances edit, the manifest in a program you can use for instance Resource Hacker. -
You can also set run as admin on shortcuts,
Similar Threads
-
One sided letter boxing
By Daniel_BMS in forum EditingReplies: 6Last Post: 13th Nov 2012, 23:29 -
SUP to srt with out having to type every letter/number?
By kkiller23 in forum SubtitleReplies: 8Last Post: 6th Sep 2012, 16:11 -
When was the last time you mailed a real letter?
By johns0 in forum PollsReplies: 18Last Post: 22nd Jun 2012, 10:00 -
Aspect ratio changer for mpegs?
By vato76 in forum Authoring (DVD)Replies: 13Last Post: 9th Jan 2012, 17:19 -
Letter being covered up by the letter next to it
By Cyan in forum SubtitleReplies: 4Last Post: 2nd Jan 2012, 07:05