This script assumes that the branch `bug-fix` and branch `master` are in order.
Now to delete `bug-fix` branch:
The following is the answer I posted on StackOverflow.
My solution is for the Windows platform. Many thanks to Assem for giving his solution on which I based mine.
I wrote a C# console app `CbImage2File` that writes the image on the clipboard (if there is one) to a path given as the command line argument. You will need a reference to System.Windows.Forms assembly.
I use Greenshot to take the screenshot, which (via its configuration) automatically copies the screenshot to the clipboard.
I then use a shortcut `C-S-v` to paste the image in the org mode buffer using the function `org-insert-image-from-clipboard`:
This function will work out a file path, then invoke the C# app to create `png` file, then it will add the image tag and then call `org-display-inline-images` to show the image. If there is no image on the clipboard, it will paste in the response from the C# app.
This solution using the command line application of 7z.
If you have a folder called `myproject`, then we can create a zip file containing this folder using a bat file in the same folder at `myproject`:
If you wish the contents of `myproject` to be the contents of the zip, then you use `.\myproject\*` instead of `.\myproject\`.
The following script, which needs to be run as administrator, adds a user to the administrators group using Powershell:
Replace `<domain>` with the domain and `<username>` with the username.
The following script will add the user to the administrators group, if they are not already a member, and then logoff:
To run this script as a desktop shortcut, we set the target to:
It will automatically resolve the `powershell.exe` to the full path of the Powershell executable.
Lastly, we can set the icon of the shortcut to an icon found in:
This script can be run using the Task Scheduler. Use `Action` -> `Create Task`.
The following simplified script can be used:
Follow the referenced guide. Make sure the following is true: