Create normal and admin taskbar shortcuts for the same program (e.g. cmd.exe) in Windows 10

Published 2019-09-21, 20:27

On my new Windows machine I try to use the package manager Chocolatey to install all programs. As it requires an administrative cmd.exe or PowerShell, I had the problem of wanting two shortcuts in my taskbar – one for installing programs, and another one for then using the command line normally.

This unfortunately is not as easy as it sounds, as if you just try to create a second shortcut by searching for the program, then using right click to „pin to taskbar“ it will recognize a shortcut already exists and only allows you to remove it – no matter if you changed it to run as administrator or not.

Fortunately you can work around that: Create a new shortcut manually (for example on your desktop), point it to cmd.exe /k and name it „Command Prompt (Admin)“ and then pin that to the taskbar additionally to the existing one. The param is standard anyway (as far as I know – no negative side effects observed until now), but it will make the shortcut different enough for Windows letting you do that.

How to reload environment variables (including PATH) in Windows Command line / cmd.exe

Published 2019-01-23, 18:30

Do you know all those installation instructions that tell you to restart your Windows console after installing a tool that adds itself to your PATH so its binary can directly be called?

Well, today I learned there is a much easier way to achieve this:

refreshenv
>refreshenv
Refreshing environment variables from registry for cmd.exe. Please wait...Finished..

Thanks to meteor for telling me about this in its Chocolatey/choco output:

Environment Vars (like PATH) have changed. Close/reopen your shell to see the changes (or in powershell/cmd.exe just type `refreshenv`).

How to comment in cmd.exe / Windows command line

Published 2018-11-14, 15:02

REM this is a comment

or

:: another comment

(Second one only works sometimes, see comment)

Results of an Amazon.de „Datenauskunft“ / „Data Subject Access Request“

Published 2018-09-18, 17:14

On 2018-07-20 I requested a „Datenauskunft“/“Data Subject Access Request“ from Amazon.de where I had an account since 2001. I wanted to document both the process and the results, as I couldn’t find anything online back when I requested this myself


To request a Datenauskunft from Amazon yourself you have to go to amazon.de/kontakt, then select „Digitale Inhalte und Services“, choose „Datenauskunft beantragen“ („Request your data“) in the first dropdown, „Datenauskunft für eine spätere Zusendung beantragen“ („Request data file be sent at a later date“) in the second and „Daten aus allen Kategorien anfordern“ („Request All Your Data“) in the third and last one.

Clicking „E-Mail“ will populate the contact form with some default text that you can just submit after adding your full name to the body text.


Shortly after I submitted the form, I got an email that I had reply to to confirm that I, the owner of my account email address, had indeed requested this data.

(I had to jump through a few hoops here as I use catch all email adresses @janpiotrowski.de for login, but replied from my usual email address which of course their system didn’t like. But as this is for verification of my request, I was happy to comply.)


I got a first response with data ~20 days later on 2018-08-09, which included a download link to a file name `Piotrowski.zip` (which was 138 KB of size).

The email also included the following admission:

Da wir für Ihre Anfrage Daten aus mehreren Bereichen zusammenstellen, gibt es einige zusätzliche Daten, die wir derzeit noch sammeln. Sobald Sie auch diese Daten herunterladen können, werden wir Sie entsprechend informieren.

The data file’s content:

1. DSAR_-_Jan_Piotrowski_-_Kontakthistorie.docx
2. DSAR_Anfrage_-_Jan_Piotrowski_-_Kontoinformationen.docx
3. Mein_Profil.xlsx

The `.docx` Word files contained 1) a history of (some recent) written communication with Amazon (including my data request of course), 2) all my current and past shipping addresses, payment methods, failed payments (just one…), watch list(s) content, vouchers used (lots), warranty claims (none), wish list(s) content, subscriptions (prime trial) and some information about Amazon Drive (never used) – really everything I could probably have gotten from the Amazon website myself after logging into my account there.

The `Mein_Profil.xlsx` just contained a link to www.amazon.de/profile.


Roughly one month later on 2018-09-17 I received another email from Amazon, telling me that now all data had been collected and could be provided to me.

Again it contained a download link to a file, this time called Jan Piotrowski.zip, now grown to 1043 KB (10.9 MB unzipped!).

This is its folder and file structure:

|   
+---- Ihr Kundenkonto -
|       DSAR - Piotrowski, Jan - Kontakthistorie.docx
|       DSAR_Anfrage - Piotrowski, Jan  - Kontoinformationen.docx
|       
+---Alexa
|   \---Alexa_0032...ea17a
|       +---Communication - Messages
|       |   \---Conversations
|       |           Conversations.html
|       |           
|       +---Communication - Preferences
|       |       alexa_comms_preferences.html
|       |       
|       +---Lists
|       |       Lists.csv
|       |       
|       +---Preferences
|       |       Preferences.json
|       |       
|       \---Routines
|               Routines.json
|               
+---Appstore
|       PurchaseDownloadInstall_Appstore.csv
|       
+---CloudDrive
|       Piotrowski_Jan_Account_Info.csv
|       Piotrowski_Jan_Client_Events.csv
|       Piotrowski_Jan_Device_Info.csv
|       Piotrowski_Jan_Node_Metadata.csv
|       
+---Community Profile
|       Mein Profil.xlsx
|       
+---Fire TV
|   |   3poptout_000.csv
|   |   appusage_000.csv
|   |   deviceusage_000.csv
|   |   marketingoptout_000.csv
|   |   registration.csv
|   |   
|   \---FireTV_Piotrowski_Jan
|       \---FireTV_Piotrowski_Jan
|               2018-01-23.json
|               2018-01-26.json
|               ...
|               FireTv-Glossary.csv
|               
+---Kindle
|   +---Geräte
|   |       appusage_000.csv
|   |       deviceusage_000.csv
|   |       marketingoptout_000.csv
|   |       registration.csv
|   |       
|   \---Inhalte
|       |   householdsharing.csv
|       |   KindleReadingActions.csv
|       |   ReadingSessions.csv
|       |   whispersync.csv
|       |   
|       \---digitalcontentownership
|               DigitalMusicTrack_B00...AG.json
|               DigitalMusicTrack_B00...DS.json
|               ...
|               KindleEBookSample_B00...W0.json
|               KindleEBookSample_B00...WA.json
|               ...
|               KindleEBook_B00...L0.json
|               KindleEBook_B00...W0.json
|               ...
|               KindlePDoc_2UEXX...TSOH.json
|               KindlePDoc_3753F...0766F1E.json
|               ...
|               MobileApp_B00...BO.json
|               MobileApp_B00...1W.json
|               ...
|               
+---Prime Music
|       DSAR_Jan_Piotrowski_Meine_Musikbibliothek.csv
|       
\---Prime Video
        Genderlanguage.csv
        Locationdata.csv
        Viewcounts.csv
        Viewinghistory.csv

As you can see this new package includes the same files as the first package in `/- Ihr Kundenkonto -` and `/Community Profile`, but also adds several other folders with my real usage data from Amazon:

The easiest way to look at the data was to just upload the whole folder to Google Drive. The previews of the `.csv` files is decent enough to get a quick overview.

Opening some of the files with Google Spreadsheet then enabled me to better format the available data and add columns to e.g. parse strange date format columns, sort by date columns and so on.


After a first look through the data files, they seem to be a pretty solid representation of what I expected to get from Amazon.

Some „logs“ are a bit short, only showing data from the last few months which is surprising, after I looked into those more I will possibly check with Amazon if there isn’t more that they just didn’t include by default.

I’m pretty happy with the time it took Amazon to compile this as well. Instant response and download or even self-serve would have been great, but I understand how much work it might be to compile all this data if there are not automated processes in place (yet). I expect this to get faster and better in the future.

Google Spreadsheet: Extract proper dates from funny date strings

Published 2018-09-18, 13:11

Recently Amazon sent me a „Datenauskunft“ that included a .csv of my Kindle’s Whispersync activity with a column containing dates, but in this funny format:

FriApr1412:21:01UTC2017
WedApr2610:43:54UTC2017
WedApr2611:30:41UTC2017
WedApr2611:30:40UTC2017
FriMay1119:26:44UTC2012
TueNov0819:47:36UTC2016
SunJan1022:12:49UTC2016

To get a proper date out of this, I built this formula to be used in a new column:

=DATE(RIGHT(C2;4);MATCH(MID(LEFT(C2;8);4;3);{"Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"};0);RIGHT(LEFT(C2;8);2))

`C2` being the column with the date here, this first extracts the year (4 characters from the right), then converts a 3 character month name to a number (which it got from extracting char 4-6 from the first 8 chars of the string), and finally the date which are the last 2 chars of the first 8 char block. The time is not needed here and discarded.


More variants:

WedApr2611:30:41UTC2017=DATE(RIGHT(C2;4);MATCH(MID(LEFT(C2;8);4;3);{"Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"};0);RIGHT(LEFT(C2;8);2))
31-DEC-2015 17:26:15=DATE(LEFT(RIGHT(F2;13);4);MATCH(MID(F2;4;3);{"Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"};0);LEFT(F2;2))
Sun May 08 09:47:24 UTC 2011=DATE(RIGHT(D2;4);MATCH(MID(LEFT(D2;8);5;3);{"Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"};0);RIGHT(LEFT(D2;10);2))
09/May/2011 11:49:10 UTC=DATE(MID(D2;8;4);MATCH(MID(D2;4;3);{"Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"};0);LEFT(D2;2))



How to develop iOS 10.3.x apps in Xcode 8.2.x

Published 2017-07-10, 18:44

If you work on an older version of Mac OS, for example because Apple decided your Macbook is to old to upgrade to a recent version, you might be stuck with Xcode 8.2.x to develop and test your iOS apps. Unfortunately this can lead to this nice error message if you made the mistake to upgrade your iPhone to iOS 10.3:

Could not locate device support files
This iPhone 6s is running iOS 10.3.1 (14E304), which may not be supported by this version of Xcode.

This is because the old Xcode doesn’t get these „device support files“ via updates any more. Luckily the internet is here to rescue you.

  1. Download https://www.dropbox.com/s/i1f7q8w3vgr2ozl/10.3%20%2814E269%29.zip?dl=0 and extract it
  2. Click on „Finder“ in MAC OS
  3. Click on „Go to Folder“
  4. Paste this path:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
  5. Paste your extracted „10.3 (14E269)“ directory to that place.
  6. Quit Xcode and restart it (and maybe the whole Mac).
  7. You can now run your projects successfully on your real device again.

Adapted from source: https://gist.github.com/steipete/d9b44d8e9f341e81414e86d7ff8fb62d#gistcomment-2041802

Windows 10: WLAN/Netzwerk von „Öffentliches Netzwerk“ auf „Privates Netzwerk“ umstellen

Published 2017-03-30, 13:20

Mit Windows 10 hat sich (mal wieder) geändert, wie man sein WLAN/Netzwerk von „öffentlich“ auf „privat“ umstellen kann. Das ist relevant weil die Windows Firewall zwischen diesen beiden Klassen von Verbindungen unterscheidet und manche Verbindung aus Versehen falsch kategorisiert werden kann. Also muss man es ändern. Nur wo?

Die Einstellung findet sich nun in den „Einstellungen“ (bzw. „Eigenschaften“, je nach dem wo man es findet) des jeweiligen WLANs/Netzwerkes und wird dort als „Dieser PC soll gefunden werden“ bezeichnet. Ist dieser Schalter auf „Ein“, wird die Verbindung als „privat“ gehandhabt, bei „Aus“ eben als „öffentlich“.

Logisch, oder? *augenroll

Viele weitere Möglichkeiten finden sich hier: https://www.deskmodder.de/wiki/index.php?title=Netzwerk_%C3%B6ffentlich_privat_%C3%A4ndern_Windows_10

Postman: Use result data in test scripts (and save to environment)

Published 2015-03-10, 21:41

Just use ‚request‘ in the test script:

Makes so many things easier 🙂

Postman (REST Client) Tests

Published 2014-10-31, 16:04

### VORBEREITUNG ###

// save response in env
var data = responseBody;
postman.setEnvironmentVariable("data", data);

// parse value from json and save in env
var data = JSON.parse(responseBody);
postman.setEnvironmentVariable("device_id", data.id);

// parse array from json and safe as string and save in env
var data = JSON.parse(responseBody);
var product = JSON.stringify(data[0]);
postman.setEnvironmentVariable("contentful", product);

// parse array from json, change value, and safe as string and save in env
var data = JSON.parse(responseBody);
data.locale = "en_US";
var device_update = JSON.stringify(data);
postman.setEnvironmentVariable("device_update", device_update);


### TESTS ###

// test resposonse code
tests["Status code is 200"] = responseCode.code === 200;

// test if response is empty
var data = JSON.parse(responseBody);
tests["Transaction list is empty"] = data.length === 0;

// test if body contains value
tests["Body contains string" + environment.device_id] = responseBody.has(environment.device_id);

// test exact values of json
var data = JSON.parse(responseBody);
tests["transaction.id is " + environment.transaction_id] = data.id === environment.transaction_id;
tests["transaction.state is IN_PROGRESS"] = data.state === "IN_PROGRESS";

Lösung: Maus zu langsam in Adobe Photoshop/Fireworks/… CS3

Published 2008-08-12, 11:08

Systemsteuerung -> Maus -> Registerkarte „Bewegung“ -> Haken bei „Beschleunigung in Spielen deaktivieren“ entfernen

Und schon hat man die normale Mausgeschwindigkeit auch in CS3-Programmen.

Quelle: http://www.psd-tutorials.de/modules/Forum/11_photoshop/25234-photoshop-cs3-maus-zu-langsam.html

15 queries. 0,092 seconds.