Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
mystes
May 31, 2006

infernal machines posted:

if you want to do this powershell exists and can configure everything that has ever been exposed in any of the windows settings panels and more

why yes bill, i believe i did just tell you to go gently caress yourself
OK, I'll bite. How do you make chrome the default browser from powershell?

Adbot
ADBOT LOVES YOU

Khorne
May 1, 2002

infernal machines posted:

if you want to do this powershell exists and can configure everything that has ever been exposed in any of the windows settings panels and more

why yes bill, i believe i did just tell you to go gently caress yourself
can you explain how I can figure this out from within powershell or some unified documentation source

powershell is "good" in that what you said is true and straightforward once you have the commands, powershell is "bad" in that every time I try to do something with powershell I end up searching and get instructed to paste this 2048 character long command that descended from the heavens above

Ideally I'm pitching you an easy homerun here, because my interactions with powershell are few and far between due to using linux for work stuff and windows mostly for non-work stuff.

Khorne fucked around with this message at 17:38 on Sep 1, 2021

Cybernetic Vermin
Apr 18, 2005

mystes posted:

OK, I'll bite. How do you make chrome the default browser from powershell?

set group policies accordingly. i have no idea which, but you absolutely can poke them from powershell, with a cmdlet that exists for that purpose.

Khorne posted:

powershell is "bad" in that every time I try to do something with powershell I end up searching and get instructed to paste this 2048 character long command that descended from the heavens above

go echo some random numbers into /proc about it ;)

Sapozhnik
Jan 2, 2005

Nap Ghost

Cybernetic Vermin posted:

go echo some random numbers into /proc about it ;)

ok.

SO DEMANDING
Dec 27, 2003

Cybernetic Vermin posted:

the new task bar smells

this was a good post but honestly sounds like it could just be shortened to this

seriously lol @ the drag and drop fuckup

pseudorandom name
May 6, 2007

r u ready to WALK posted:

I hate how windows pops up a dialog box yelling at you for trying to do the sensible thing by dropping something directly on the taskbar button
"no no no you have to wait for the window to pop up and then drag it to that"

the dialog box is, unfortunately, the sensible thing

drang and drop is an IPC conversation between the source window and the target window, and where you drop the icon in the target window can result in different behaviors chosen by the target application(e.g. dropping an icon in the empty space of an Explorer window versus dropping it on top of one of the many folder icons)

now of course you could extend out the drag and drop protocol to support a generic full window drop target, except this didn't exist when drag and drop was first created so you'd still have to handle the edge case of the target window not supporting the full window drop target, which means Explorer would still have to chastise you for dropping stuff on some (but not all) window icons. then you also have the problem where the window is a drop target but it is currently display a modal dialog box and can't accept any drops at all.

Khorne
May 1, 2002

Cybernetic Vermin posted:

go echo some random numbers into /proc about it ;)
much like all windows users, who don't even have the option, I never need to do that

Khorne fucked around with this message at 18:54 on Sep 1, 2021

Last Chance
Dec 31, 2004

pseudorandom name posted:

the dialog box is, unfortunately, the sensible thing

drang and drop is an IPC conversation between the source window and the target window, and where you drop the icon in the target window can result in different behaviors chosen by the target application(e.g. dropping an icon in the empty space of an Explorer window versus dropping it on top of one of the many folder icons)

now of course you could extend out the drag and drop protocol to support a generic full window drop target, except this didn't exist when drag and drop was first created so you'd still have to handle the edge case of the target window not supporting the full window drop target, which means Explorer would still have to chastise you for dropping stuff on some (but not all) window icons. then you also have the problem where the window is a drop target but it is currently display a modal dialog box and can't accept any drops at all.

yeah sometimes it takes a bit of work to do something right

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.

mystes posted:

OK, I'll bite. How do you make chrome the default browser from powershell?

quote:

Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice' -Name ProgID -Value "ChromeHTML"

Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice' -Name ProgID -Value "ChromeHTML"

you can also import your app defaults from an xml file using dism from powershell.

i'm not suggesting you should, but if you want to hit your balls with a hammer, powershell is there.

Khorne posted:

can you explain how I can figure this out from within powershell or some unified documentation source

the unified documentation source is the entirety of technet, but if you're willing to accept that definition, all of the commands and commandlet references are there. spread across tens of thousands of different pages, some of which are depreciated or heavily version dependant for syntax or capabilities, and some may only be discoverable under the errata posted by microsoft engineers in the comments at the end of the actual article for the command.

if you can't parse the command you've googled, don't just paste it into the shell and hope for the best, go find someone who knows what they're doing.

infernal machines fucked around with this message at 21:46 on Sep 1, 2021

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.

Cybernetic Vermin posted:

set group policies accordingly. i have no idea which, but you absolutely can poke them from powershell, with a cmdlet that exists for that purpose.

you actually can't set app associations by GPO directly, except by applying the registry entries or running a script that imports a pre-created xml file with the preferences in it. because gently caress you. also doing it via the xml file will just fail a lot of the time because windows will decide the entries are "corrupted" and it should reset everything to system defaults. because gently caress you.

infernal machines fucked around with this message at 21:51 on Sep 1, 2021

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

Cybernetic Vermin posted:

pretty sure im at least partially on windows for the foreseeable future. doubt mac will cover my needs (or rather my dumb wants) with a continued iosification, and my attempt to do 100% linux at work has already ended with me needing to bring in my private laptop tomorrow as screen sharing in zoom is not really in the realm of things doable even on modern hardware under linux in 2021 (no doubt zooms fault, but clearly a fully software pipeline where both zoom and xorg pegs cpu trying to memcpy pixels around and choking).

i do zoom screen share several times per week on linux, kubuntu 20.04 with nvidia gpu and 21.04 with intel gpu, and have never had a single issue except for the one time i tried to use wayland recently

Khorne
May 1, 2002

infernal machines posted:

the unified documentation source is the entirety of technet, but if you're willing to accept that definition, all of the commands and commandlet references are there. spread across tens of thousands of different pages, some of which are depreciated or heavily version dependant for syntax or capabilities, and some may only be discoverable under the errata posted by microsoft engineers in the comments at the end of the actual article for the command.
thanks this is helpful. sounds no different from any other MS documentation project

quote:

if you can't parse the command you've googled, don't just paste it into the shell and hope for the best, go find someone who knows what they're doing.
I've only encountered easy to parse commands. The main issue I've had is I have no idea how the windows wizard who posted the command knew it existed. Powershell seems so oddly detached from windows despite being pretty powerful.

Khorne fucked around with this message at 00:37 on Sep 2, 2021

Kazinsal
Dec 13, 2011

Khorne posted:

thanks this is helpful. sounds no different from any other MS documentation project

I've only encountered easy to parse commands. The main issue I've had is I have no idea how the windows wizard who posted the command knew it existed. Powershell seems so oddly detached from windows despite being pretty powerful.

yeah basically whereas unixes have to assume that your documentation needs to exist solely on the system and in a format that can be printed through a teletypewriter from 1971, Windows and PowerShell understand that you most likely have a browser window open already, so everything's on MSDN/technet/docs.microsoft.com. you can download the equivalent of manpages in PowerShell once with Update-Help, then run Get-Help <cmdlet-name> for the "manpage" or Get-Help <cmdlet-name> -Online to open the full documentation in a browser (which I think you can do without running Update-Help)

Nomnom Cookie
Aug 30, 2009



you know what was actually good? windows help. just a searchable reference manual in a compact file format

pseudorandom name
May 6, 2007

what if we replaced windows help with hyperlinks to microsoft.com that were clearly designed to be permanent even in the face of site redesigns but we somehow managed to break them anyway?

Sapozhnik
Jan 2, 2005

Nap Ghost

pseudorandom name posted:

what if we replaced windows help with hyperlinks to microsoft.com that were clearly designed to be permanent even in the face of site redesigns but we somehow managed to break them anyway?

Taking care not to break some other rear end in a top hat's links doesn't get me a bonus

Driving an initiative to drastically redesign the site backed by sweet, juicy analytics does get me a bonus

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Khorne posted:

I've only encountered easy to parse commands. The main issue I've had is I have no idea how the windows wizard who posted the command knew it existed. Powershell seems so oddly detached from windows despite being pretty powerful.

yeah I mean it’s just one of those things where based on experience you can say
- well all windows poo poo probably lives in the registry somewhere, so I can google where
- well powershell is supposed to be the combination of language and library that lets you control windows things therefore it probably has a way to edit the registry because see above, so I can google what it is

but that means you need to know those facts which is not exactly spread far and wide.

Shaggar
Apr 26, 2006
powershell is one of 100 interfaces to the same win32 apis so its more useful to know how the underlying stuff works rather than knowing powershell. this is in contrast to linuxes where knowing the shell commands and their individual syntaxes is 99% of interacting with the os.

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:
Powershell is really good, you just need to inline some c# to pinvoke to get what you want!

Cybernetic Vermin
Apr 18, 2005

Antigravitas posted:

Powershell is really good, you just need to inline some c# to pinvoke to get what you want!

i mean, you joke, but the fact that you can start with some "normal" powershell and segue into proper structured and typed programming is absolutely its best feature, where any amount of unix shellscripting in a larger project tends to be a wart and source of bugs. you can absolutely build on unix shell stuff, but tons of ad-hoc parsing of under-structured text rapidly creeps in

mystes
May 31, 2006

The idea of piping structured data around is very good and powershell does that part pretty well, but if anything it imitates unix shells too closely and has too many warts that make it extremely annoying to use for anything that's more than a few lines of code. Just requiring strings to be quoted and making it slightly more like a normal programming language would have made it 1000 times better.

Also, it kind of sucks to take the CLR and throw out all the type information to turn it into a big dynamically typed footgun. I have to wonder if they could have used row polymorphism and given it actual typechecking without making anything significantly more complicated for normal use.

That said it's better than bash and I do end up using it just because it's installed by default on windows (although this is starting to become problematic because the framework version is so old now). It also is easy to do extremely ugly stuff which is probably a bad idea but gets the job done by using c# code using add-type. (Also, because of powershell not matching up with normal .net languages perfectly it unfortunately quickly ends up being easier to do anything complicated in c# rather than directly in powershell but it's also a pain in the rear end to translate code between powershell and c#.)

mystes fucked around with this message at 14:35 on Sep 3, 2021

Shaggar
Apr 26, 2006
powershell should have just been c# script instead of quasi-bash.

AnimeIsTrash
Jun 30, 2018

mystes posted:

It's the last straw in the war on configurability. I'm going back to gnome 3.

Gross, at least go back to the good gnome. Gnome 2.0

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.

mystes posted:

That said it's better than bash

glowing praise

mystes
May 31, 2006

Shaggar posted:

powershell should have just been c# script instead of quasi-bash.
This too

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice
lomarf

Earlier today, Microsoft pushed a promotional message to early adopters of Windows 11. The promo intended to promote the upcoming operating system’s integration with Microsoft Teams. Instead, it caused Explorer (the Windows desktop shell) to stop responding and left users without a working Start menu and taskbar.

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.
dear microsoft, please stop blasting me with ads in the product i paid for

mediaphage
Mar 22, 2007

Excuse me, pardon me, sheer perfection coming through

infernal machines posted:

dear microsoft, please stop blasting me with ads in the product i paid for

the xboxification of windows

Clark Nova
Jul 18, 2004

infernal machines posted:

dear microsoft, please stop blasting me with ads in the product i paid for

when they started giving windows 10 away for free they very conveniently forgot that anyone had ever paid for windows and didn’t deserve to be subjected to their bonzi buddy rear end poo poo

Jenny Agutter
Mar 18, 2009

there is no amount you can pay for a software or consumer electronics product to make it not have advertisements anymore

Sniep
Mar 28, 2004

All I needed was that fatty blunt...



King of Breakfast

Jenny Agutter posted:

there is no amount you can pay for a software or consumer electronics product to make it not have advertisements anymore

nobody cancelled their cable TV over it despite being for-pay due to being ad-free, once the ads crept in, people still happily paid increasing rates

so why would this be any different, the precedent is set, its just riding consumer temperature until you can get it in there

Progressive JPEG
Feb 19, 2003

Hed
Mar 31, 2004

Fun Shoe
makes u think

r u ready to WALK
Sep 29, 2001

kinda shameful to let that many unread posts pile up

Chris Knight
Jun 5, 2002

me @ ur posts


Fun Shoe
lol
https://twitter.com/wdormann/status/1437530613536501765

git apologist
Jun 4, 2003

looks like windows is not the best linux anymore

pseudorandom name
May 6, 2007

lol they stuck URL protocols associations in the same namespace as file associations 25 years ago and nobody noticed it was exploitable until now

Nomnom Cookie
Aug 30, 2009



it’s quite possible, maybe even likely, that nobody currently at Microsoft knew about that behavior

pseudorandom name
May 6, 2007

quote:

To register an application to handle a particular URI scheme, add a new key, along with the appropriate subkeys and values, to HKEY_CLASSES_ROOT. The root key must match the URI scheme that is being added. For instance, to add an "alert:" scheme, add an alert key to HKEY_CLASSES_ROOT, as follows:

HKEY_CLASSES_ROOT
alert
URL Protocol = ""

Under this new key, the URL Protocol string value indicates that this key declares a custom pluggable protocol handler. Without this key, the handler application will not launch. The value should be an empty string.

lmao

Adbot
ADBOT LOVES YOU

Hed
Mar 31, 2004

Fun Shoe

pseudorandom name posted:

lol they stuck URL protocols associations in the same namespace as file associations 25 years ago and nobody noticed it was exploitable until now

I’m off to exploit NT 4 SP3 with Active Desktop updates!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply