Feb 10, 2015 08:57 AM
(This post was last modified: Feb 10, 2015 08:59 AM by annikk.exe.)
Can you clarify exactly what you're seeking to do? A handful of extra words or a screenshot goes a long way. Don't be afraid to describe the problem twice, in slightly different ways. :>
The wording as is implies that when you try to right-click your desktop and point to "New", "Text Document", and edit in notepad, add code and click save, you get a UAC prompt.
Is that what is happening? If so, it might be because you're trying to create/save a batch file in a protected folder like C:\Windows or C:\
Try again in a folder like C:\scripts\
Another thing you might mean:
Perhaps you mean that you want a batch file to launch some software and automatically accept the UAC prompt.
Is that it? If that's the case, you're out of luck; the UAC prompt is designed to not be accessible programatically, because it's designed to differientiate between human-initiated actions and computer-initiated actions such as, for example, a malicious script. Your best option would be to disable UAC.
Another thing you might mean:
Perhaps you mean that you want to trigger a UAC prompt, relaunching the batch file with elevated permissions.
Is that it? If so, then you can't do it directly from batch, but it's possible via vbscript, which you can store within the batch file and "echo out" when it's needed.
I can't remember the vbscript off the top of my head so let me know if this is it, and I'll write about it.