Conversation
Notices
-
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 09:34:51 JST aliss @tost hey how goes? - Hélène likes this.
-
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:42:45 JST aliss @tost i hope it goes well sending u much strength ✨
im writing powershell atmHélène likes this. -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Wednesday, 31-Aug-2022 11:42:46 JST Tosti ? @aliss@outerheaven.club hawwoo
nervous about uh
tomorrow ;-;
I'm getting a tube stuck down my throat :akko_hug: -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Wednesday, 31-Aug-2022 11:42:46 JST Tosti ? @aliss@outerheaven.club I wrote powershell recently for starlight !!
https://github.com/CosmicToast/starlight/blob/main/colors/cmd.ps1Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:42:53 JST aliss @tost it's my first day ever with powershell im trying to automate something so i can just plug USB in, doubleclick, move to another computer with USB and gather some info instead of manually
im baby compared to with unix shells
me looking at ur code:In conversation permalink Attachments
Hélène likes this. -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Wednesday, 31-Aug-2022 11:42:54 JST Tosti ? @aliss@outerheaven.club it's ok I have no idea what I'm doing either I'm not a windows person
In conversation permalink Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:43:00 JST aliss @tost if im able to finish the script with my baby steps would u like me to show it to u? In conversation permalink Hélène likes this. -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Wednesday, 31-Aug-2022 11:43:04 JST Tosti ? @aliss@outerheaven.club yeah sure why not :0
I don't think I'll get it though ^^;;In conversation permalink Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:43:12 JST aliss @tost so i resorted to powershell because i was unable to store the output of a command inside a variable (i was trying to get wmic csproduct get UUID originally)
but powershell scripts aren't executed on double-click by default + u need to configure the exec policy therefore batch that invokes the ps1:
https://pastebin.com/TAf9USpF
and the ps1:
https://pastebin.com/urNDW9zN
there's some code there for future expansion of other things: tsince i have arrays in a language (for once, internal POSIX sh pseudoarrays cries of angst) i tried to both create all dirs for future functions and the exec functions inside arrays/loops, instead of duplicating each path check code everytime
my idea is to get licenses output by double clicking and have a name like <UUID>-lic.txt so no files are overwritten when i move it around several computers and each file identifies each computer
i tried with MAC addresses but i didn't find a powershell equivalent command (wmic is so handy but it's going deprecated)
even after replacing ! with -Not it's still not working so im sad
advice greatly welcome! :celgoldcrystalheart:In conversation permalink Attachments
Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:43:39 JST aliss @tost aaa i discovered the error of my ways: variables in powershell are properly local to each function so the uuid function needs to be declared under main() In conversation permalink Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:43:53 JST aliss @tost it works!
https://pastebin.com/T3ZyQdLa
im still without a good way to
1. get the MAC address
2. fail if the platform isn't windows
3. redirect the output to $PSScriptRoot\winlic\txtfile.txt
4. have the linter stop yelling at me (PSScriptAnalyzer)In conversation permalink Attachments
Hélène likes this. -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Wednesday, 31-Aug-2022 11:43:56 JST Tosti ? @aliss@outerheaven.club let's GOOOOOO
In conversation permalink Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:43:57 JST aliss @tost demn powershell is reallyyyyy quirky In conversation permalink Hélène likes this. -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Wednesday, 31-Aug-2022 11:43:58 JST Tosti ? @aliss@outerheaven.club yeah it's weird af
In conversation permalink Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:44:02 JST aliss @tost ahhhh many things work now!
https://pastebin.com/aHtkBGvGIn conversation permalink Attachments
Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:44:04 JST aliss @tost im still missing the trying to get MAC address in a single line with just the address itself but i don't know enough filtering to do it In conversation permalink Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:44:09 JST aliss @tost it works! it's short! it's beautiful! it's aliveeeee!
https://pastebin.com/zXJhHGFNIn conversation permalink Attachments
Hélène likes this. -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Wednesday, 31-Aug-2022 11:44:23 JST Tosti ? @aliss@outerheaven.club yo that looks kinda nice actually
In conversation permalink Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:44:25 JST aliss @tost praise that comes from the shell master :hifumiblush: In conversation permalink Hélène likes this. -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 31-Aug-2022 11:44:28 JST aliss @coyote @yetAnotherRoko
i got it working more or less to my liking already, im only not sure why $IsWindows is not definedIn conversation permalink Hélène likes this.