Hey kids! Here's a great new feature in Windows 10
-
Many programs have supported drag and drop for a long time. Open a file in Photoshop? Drag and drop. Upload a file to Imgur or YouTube? Drag and drop. Cool, eh?
So now, go to any program that you might use to drag and drop stuff. Your web browser, your favorite picture or video editor, etc. Right click on the shortcut or executable file, go to the
compatibility
tab and selectRun as Administrator
.Now try to drag and drop something onto that program. Doesn't work. Yes, that's right,
Run as Administrator
disables drag and drop for that program. And as as far as I can tell, this is a documented feature, not a bug.
-
@El_Heffe said in Hey kids! Here's a great new feature in Windows 10:
this is a documented feature, not a bug.
Yes, this is 100% intentional, as elevated processes can't be messed with by un-elevated processes, especially things that can manipulate other programs (like those that can send keyboard input).
-
@El_Heffe yes it is, due to the way the admin-level program interacts with the desktop (to prevent arbitrary commands from being sent by unprivileged processes). I believe there is a Raymond Chen article about that....
-
@El_Heffe said in Hey kids! Here's a great new feature in Windows 10:
Hey kids! Here's a great new feature in Windows 10
Additionally, it's been this way since Vista. Welcome to the Future! Where have you been?
-
@Tsaukpaetra said in Hey kids! Here's a great new feature in Windows 10:
Where have you been?
On XP?
-
@Luhmann said in Hey kids! Here's a great new feature in Windows 10:
@Tsaukpaetra said in Hey kids! Here's a great new feature in Windows 10:
Where have you been?
On XP?
IMPOSSIBRU, You wouldn't have been forced into Windows 10 from XP!
-
NT4 then ?
-
@Luhmann said in Hey kids! Here's a great new feature in Windows 10:
NT4 then ?
Dunno, been a while since I tried. Do the needful and report back, please.
-
@Tsaukpaetra said in Hey kids! Here's a great new feature in Windows 10:
Do the needful and report back, please.
I'm not on your test team! Do your own dirty work!
-
@Tsaukpaetra said in Hey kids! Here's a great new feature in Windows 10:
Do the needful and report back, please.
3/5 should have used "revert" instead
-
@Yamikuronue said in Hey kids! Here's a great new feature in Windows 10:
3/5 should have used "revert" instead
Even "better":
Please to be doing the needful and revert back
-
@El_Heffe That's always been true. You can't drag & drop from one security context into another.
Not sure why this is surprising.
-
@Luhmann said in Hey kids! Here's a great new feature in Windows 10:
On XP?
Any OS with "Run As..." has this same "problem". That includes XP and Windows 2000.
-
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
@El_Heffe That's always been true. You can't drag & drop from one security context into another.
Not sure why this is surprising.Because you SHOULD be able?
I mean, what's wrong with showing a UAC prompt once you're done dragging?
-
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
Not sure why this is surprising.
I'd guess that the need to run anything other than installers in elevated mode is not something people do a lot so once they run into the problem they don't connect the dots immediately.
Personally, I don't remember doing something like that on Windows ever, just never had the need. And only instance when I actually ran into that was fixing someone's broken install of something or other using a live CD and trying to copy stuff from a regular file manager window into an elevated one (because the machine's actual drive was mounted as read-only for the live user). So yeah, not an everyday use situation.
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
I mean, what's wrong with showing a UAC prompt once you're done dragging?
Because contexts likely have separated clipboards to prevent escalation vulnerabilities?
-
I've run into this issue many times after updating Notepad++. The updater launches it as administrator and I almost exclusively open files by dragging them into the editor. So now I have to not launch it via the updater and instead relaunch it manually. I'd be perfectly fine with a UAC prompt rather than a cursor that says "screw you, restart the application".
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
Because you SHOULD be able?
Why?
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
I mean, what's wrong with showing a UAC prompt once you're done dragging?
Wow, that's be some horrible usability you're proposing.
I'm not even sure how the UAC prompt would work. I guess the theory is you drag & drop to elevated Foo, then the OS somehow detects this is happening and starts a new application elevated Bar (UAC prompt), and somehow passes the drag&drop data to Bar (I guess as a startup param? Or in a temp file?), then Bar hands off to Foo?
But drag&drop content isn't necessarily owned by the OS; so the process breaks down after Bar starts. If the drag&drop content is owned by the OS, then I suppose Bar would have access to it, but if it's only a reference "talk to application Stu to get this content" then you've just shifted the problem from Stu->Foo to Stu->Bar and haven't solved anything... you're just added more complexity to the original problem.
Since you're not supposed to run anything elevated, this would be a shitload of development to make this very rare case work properly without exposing security holes. Certainly not worth the time it'd take.
-
@LB_ said in Hey kids! Here's a great new feature in Windows 10:
I've run into this issue many times after updating Notepad++. The updater launches it as administrator and I almost exclusively open files by dragging them into the editor. So now I have to not launch it via the updater and instead relaunch it manually. I'd be perfectly fine with a UAC prompt rather than a cursor that says "screw you, restart the application".
Wouldn't it be better for Notepad++ to fix their damned bug?
-
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
Wow, that's be some horrible usability you're proposing.
More horrible than just nothing happening and the program appearing broken?
I'm not even sure how the UAC prompt would work. I guess the theory is you drag & drop to elevated Foo, then the OS somehow detects this is happening and starts a new application elevated Bar (UAC prompt), and somehow passes the drag&drop data to Bar (I guess as a startup param? Or in a temp file?), then Bar hands off to Foo?
But drag&drop content isn't necessarily owned by the OS; so the process breaks down after Bar starts. If the drag&drop content is owned by the OS, then I suppose Bar would have access to it, but if it's only a reference "talk to application Stu to get this content" then you've just shifted the problem from Stu->Foo to Stu->Bar and haven't solved anything... you're just added more complexity to the original problem.
How about the system detects I'm trying to drag shit from unelevated Foo to elevated Bar, and once I drop the item, it shows an alert box: "Hey, you're trying to drag stuff from Foo into an elevated program Bar. Are you sure?" And if you click yes, Bar receives the data as usual.
Maybe I'm insane, but that seems more user-friendly than just quietly and mysteriously not working.
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
More horrible than just nothing happening and the program appearing broken?
If the program has to be elevated to run, it's already broken.
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
How about the system detects I'm trying to drag shit from unelevated Foo to elevated Bar, and once I drop the item, it shows an alert box: "Hey, you're trying to drag stuff from Foo into an elevated program Bar. Are you sure?" And if you click yes, Bar receives the data as usual.
It's such a terrible idea to show an alert box during a drag&drop operation.
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
Maybe I'm insane, but that seems more user-friendly than just quietly and mysteriously not working.
If the drop target isn't showing a "drag cancelled" icon, then it's already broken.
Look, I agree it's a bit odd, but you're talking about "bugs" that are only visible if you're already using broken applications.
-
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
If the program has to be elevated to run, it's already broken.
Two use cases for apps running in elevated mode
- edit protected text file, like
hosts
(eg. Notepad or similar) - run self-hosted web server during development or actual usage (eg. Visual Studio)
You have a better solution?
On Mac, to edit a system file, you have to copy it into your user folder, edit it there, and then copy it back over the original. This is NOT a better solution.
- edit protected text file, like
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
On Mac, to edit a system file, you have to copy it into your user folder, edit it there, and then copy it back over the original. This is NOT a better solution.
No, it's essentially the same solution. Only worse, because apparently anyone can do it.
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
run self-hosted web server during development or actual usage (eg. Visual Studio)
A web server doesn't need to run elevated. Visual Studio includes IIS Express.
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
You have a better solution?
Editing the Hosts file is something maybe a developer has to do maybe once a month. So just suck it up.
Run doing web development, just don't run your self-hosted web server as an admin. Use the tools Microsoft has provided for decades that don't require you to do that.
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
On Mac, to edit a system file, you have to copy it into your user folder, edit it there, and then copy it back over the original. This is NOT a better solution.
You can do that with Hosts in Windows if you wanted. You'd get your nice shiny UAC prompt, too. Since you love seeing those so much.
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
- run self-hosted web server during development or actual usage (eg. Visual Studio)
Why on Earth would you ever run a web server under the equivalent of
root
?
-
@Rhywden said in Hey kids! Here's a great new feature in Windows 10:
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
- run self-hosted web server during development or actual usage (eg. Visual Studio)
Why on Earth would you ever run a web server under the equivalent of
root
?To get at that sweet sweet port 80 who knows?
-
@Rhywden said in Hey kids! Here's a great new feature in Windows 10:
Why on Earth would you ever run a web server under the equivalent of root?
You wouldn't on Windows; you'd run it under "Network Service" or, in newer IIS versions, every app pool gets its own account.
-
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
@Rhywden said in Hey kids! Here's a great new feature in Windows 10:
Why on Earth would you ever run a web server under the equivalent of root?
You wouldn't on Windows; you'd run it under "Network Service" or, in newer IIS versions, every app pool gets its own account.
'twas a rhetorical question :)
-
@Rhywden said in Hey kids! Here's a great new feature in Windows 10:
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
@Rhywden said in Hey kids! Here's a great new feature in Windows 10:
Why on Earth would you ever run a web server under the equivalent of root?
You wouldn't on Windows; you'd run it under "Network Service" or, in newer IIS versions, every app pool gets its own account.
'twas a rhetorical question :)
Mind reading etc etc
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
run self-hosted web server during development or actual usage (eg. Visual Studio)
This is not a case where elevated mode is required
edit: I definitely should have read the other replies before posting that
-
@fbmac said in Hey kids! Here's a great new feature in Windows 10:
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
run self-hosted web server during development or actual usage (eg. Visual Studio)
This is not a case where elevated mode is required
edit: I definitely should have read the other replies before posting that
Then you can safely delete your post now.
-
Why NodeBB keep doing stuff like this
-
@fbmac said in Hey kids! Here's a great new feature in Windows 10:
Why NodeBB keep doing stuff like this
Incompletely loaded CSS. In case you wanted to know…
-
@Rhywden said in Hey kids! Here's a great new feature in Windows 10:
Why on Earth would you ever run a web server under the equivalent of root?
Exercise for the uninformed:
- Start a new Windows Console Application in VS 2015
- Add Owin Self Hosted support
3) Write a basic hello world appusing System; using Microsoft.Owin.Hosting; using Owin; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var app = WebApp.Start<Startup>("http://*:8000"); Console.WriteLine("Serving at 8000"); Console.ReadLine(); } } public class Startup { public void Configuration(IAppBuilder appBuilder) { appBuilder.Run(ctx => { ctx.Response.ContentType = "text/plain"; return ctx.Response.WriteAsync("Hello!"); }); } } }
Note I'm serving on a non-reserved port (8000).
- Try to run the app without elevating it
- Try to debug the app without elevating Visual Studio
See what happens.
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
See what happens.
You.. get... a Firewall prompt?
And because programming is hard, the DLL provided by OwinSelfHost can't run without admin privledges?Don't leave us in suspense!
-
@cartman82 So don't do that? Host it on IIS Express.
-
@Tsaukpaetra said in Hey kids! Here's a great new feature in Windows 10:
You.. get... a Firewall prompt?
And because programming is hard, the DLL provided by OwinSelfHost can't run without admin privledges?
Don't leave us in suspense!
-
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
@cartman82 So don't do that? Host it on IIS Express.
If you are making a desktop app or a windows service (and you're temporarily hosting it in console app), IIS Express can't help you there.
Also, IIS Express can only serve on localhost. Localhost is not the problem, self hosted can target that unelevated too. The trick is to get it to serve on an external host, so I can do interesting shit with it, such as have other services talk with it or test website on my phone or whatever.
This used to work. But whatever restriction they added in Win 8 (I think) is a HUGE pain in the ass, and has basically forced a bunch of developers to run VS in elevated mode.
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
If you are making a desktop app or a windows service (and you're temporarily hosting it in console app), IIS Express can't help you there.
So don't do that? Separate the UI from the library. You can test the code of a Service without testing it as a Service.
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
Also, IIS Express can only serve on localhost.
I'm not even sure what you mean here. Of course? IIS Express is an application on localhost. It doesn't magically teleport itself to another machine when you hit the play button in VS.
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
@Tsaukpaetra said in Hey kids! Here's a great new feature in Windows 10:
You.. get... a Firewall prompt?
And because programming is hard, the DLL provided by OwinSelfHost can't run without admin privledges?
Don't leave us in suspense!So... Again, programming is hard and the DLL is ?
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
The trick is to get it to serve on an external host, so I can do interesting shit with it, such as have other services talk with it or test website on my phone or whatever.
I think you borked your words. I think you mean "Listen on interfaces other than localhost", and that typically generates that Firewall Exception dialog mentioned before, and if the app can't do this properly (i.e. whines like a baby because access denied and throws a tantrum), it's not the fault of the OS.
-
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
If you are making a desktop app or a windows service (and you're temporarily hosting it in console app), IIS Express can't help you there.
So don't do that? Separate the UI from the library. You can test the code of a Service without testing it as a Service.
Err... that's what I'm doing. Instead of making a service that I can't test easily, I put all the code in a little wrapper CLI app, that I can put through debugger. Except OOPS, you can't host a visible service off it without elevation.
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
I'm not even sure what you mean here. Of course? IIS Express is an application on localhost. It doesn't magically teleport itself to another machine when you hit the play button in VS.
"Localhost" means the "loopback" interface 127.0.0.1. You can only reach this interface from your local machine.
What I want is to serve stuff on my ethernet interface (eg. 192.168.1.XXX), so I can expose the service to the rest of the network.
-
-
@Tsaukpaetra said in Hey kids! Here's a great new feature in Windows 10:
I think you borked your words. I think you mean "Listen on interfaces other than localhost", and that typically generates that Firewall Exception dialog mentioned before, and if the app can't do this properly (i.e. whines like a baby because access denied and throws a tantrum), it's not the fault of the OS.
This has nothing to do with the firewall. The system is preventing me from binding to the port way before firewall can get involved.
You have a way to get past this through the code? Put up of shut up.
-
@cartman82 From the article I just linked, Owinselfhost is meant to be run as a service.
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
Err... that's what I'm doing. Instead of making a service that I can't test easily, I put all the code in a little wrapper CLI app, that I can put through debugger. Except OOPS, you can't host a visible service off it without elevation.
So... if I understand this correctly, you have a web service, but instead of hosting it on a web server you host it inside a Windows Service because...??????????
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
"Localhost" means the "loopback" interface 127.0.0.1.
Thank you. I am a total retard.
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
What I want is to serve stuff on my ethernet interface (eg. 192.168.1.XXX), so I can expose the service to the rest of the network.
-
@Rhywden said in Hey kids! Here's a great new feature in Windows 10:
@cartman82 https://msdn.microsoft.com/en-us/magazine/dn745865.aspx
In other words,
"I have no idea what I'm talking about, so I'll just google a random article using some of the words I've seen grownups throw around, and drop the link without comment. Let Cartman82 waste time trying to actually read the article and determine it contains absolutely nothing relevant to the conversation. As always, my primary concern is to appear wise, without ever saying anything actually smart."
-
If you are running a localized version of Windows the parameter users=everyone for netsh (second step) may cause error 1789. Solution is to translate everyone to the corresponding group name in your language
Someone tell MS that this type of localization is not appreciated. Nobody will guess commands like this, we take instructions from documentation or somewhere like stackoverflow. We don't need to be hunting for the correct version of a command to our locality.
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
You have a way to get past this through the code? Put up of shut up.
I dunno, I don't try to reinvent the wheel and make my own HTTP server, but here's something I found in the first few results of a quick Google Search:
Seems to me that during the initialization of your app (based on the screenshot) your prefixes may be misconfigured or missing, or obviously your app hasn't been given the permission to listen on those interfaces (i.e. Firewall? Who knows, once again, I don't reinvent the wheel).
-
@cartman82 said in Hey kids! Here's a great new feature in Windows 10:
@Rhywden said in Hey kids! Here's a great new feature in Windows 10:
@cartman82 https://msdn.microsoft.com/en-us/magazine/dn745865.aspx
In other words,
"I have no idea what I'm talking about, so I'll just google a random article using some of the words I've seen grownups throw around, and drop the link without comment. Let Cartman82 waste time trying to actually read the article and determine it contains absolutely nothing relevant to the conversation. As always, my primary concern is to appear wise, without ever saying anything actually smart."
Well, in contrast to you, at least I start out appearing wise and then go downhill. Whereas you start out at the bottom and then try to actively go below that.
-
@blakeyrat said in Hey kids! Here's a great new feature in Windows 10:
So... if I understand this correctly, you have a web service, but instead of hosting it on a web server you host it inside a Windows Service because...??????????
If you have an app that is doing some batch processing or something service-y and want to add a simple web api for control, this seems like a good setup.
The "correct" thing would probably be to create a separate web app that speaks with the service. But since MS has already offered this OWIN self-hosted thing, which seems to be aimed squarely at this use case, who am I to say no?
Thank you. I am a total retard.
No problem. Never be afraid to ask if you don't know something. That's how you learn.
IIS Express enable external request
I remember fiddling with these instructions for like half an hour and failing to get it working.
BTW, you can do the same thing for self-hosted app to allow it to serve on external interfaces. It also didn't work.
Run As Administrator is way easier.