Add-Type -AssemblyName System.Drawing Add-Type -ReferencedAssemblies System.Drawing -TypeDefinition @' using System;using System.IO; public class CliIcon { const int W=64,H=40; static void R(byte[,]p,int x,int y,int w,int h,byte c){for(int j=y;j>8));w.Write((byte)n);}static void U32(BinaryWriter w,int n){w.Write((byte)(n>>24));w.Write((byte)(n>>16));w.Write((byte)(n>>8));w.Write((byte)n);}static void S(BinaryWriter w,string s){var b=System.Text.Encoding.ASCII.GetBytes(s+"\0");U32(w,b.Length);w.Write(b);} static void Img(BinaryWriter w,byte[,]p){U16(w,0);U16(w,0);U16(w,W);U16(w,H);U16(w,2);w.Write(new byte[]{0,0,0,1,3,0,0,0,0,0});for(int q=0;q<2;q++)for(int y=0;y>i);w.Write(b);}} public static void Make(string template,string output){var h=new byte[78];Array.Copy(File.ReadAllBytes(template),h,78);h[12]=0;h[13]=W;h[14]=0;h[15]=H;h[16]=0;h[17]=6;h[48]=4;foreach(int p in new[]{22,26,50,54}){for(int k=0;k<4;k++)h[p+k]=0;h[p+3]=1;}foreach(int p in new[]{44,66,70})for(int k=0;k<4;k++)h[p+k]=0;using(var f=File.Create(output))using(var w=new BinaryWriter(f)){w.Write(h);Img(w,P(false));Img(w,P(true));S(w,"SYS:System/CLI");U32(w,16);S(w,"WINDOW=VNC:80/90/900/580/Amber CLI/SHELL/CLOSE");S(w,"STACK=16384");S(w,"FROM=S:Shell-Startup");}}} '@ [CliIcon]::Make('C:\Amiga\HD0\System\Shell.info','C:\Amiga\HD0\Utilities\WBDock2\CLI.info') [IO.File]::WriteAllText('C:\Amiga\HD0\Utilities\WBDock2\CLI','',[Text.Encoding]::ASCII) $p='C:\Amiga\HD0\Utilities\WBDock2\Amber.config' $s=[IO.File]::ReadAllText($p).Replace('SYS:System/Shell','SYS:Utilities/WBDock2/CLI') [IO.File]::WriteAllText($p,$s,[Text.Encoding]::ASCII)