Skip to content

Instantly share code, notes, and snippets.

@rwilkes
rwilkes / XMLParseExample.iss
Created April 26, 2018 02:00 — forked from seraphy/XMLParseExample.iss
Inno SetupでMSXMLを使ったXMLの解析の実装例(Ansi/Unicode版どちらでもOK)
[Setup]
AppId=XMLParseExample
AppName=XMLParseExample
AppVersion=1.0.0
VersionInfoVersion=1.0.0
VersionInfoDescription={#SetupSetting("AppName")} Installer
OutputBaseFilename={#SetupSetting("AppName")}_{#SetupSetting("AppVersion")}
@rwilkes
rwilkes / functionptr.iss
Created April 26, 2018 02:00 — forked from seraphy/functionptr.iss
Inno Scriptで関数ポインタを使う方法
[Code]
type
Tproc = procedure(const msg: String);
Tfunc = function(const value: Integer): String;
procedure sample_proc(const msg: String);
begin
Log(msg);
end;
@rwilkes
rwilkes / innosample.pas
Created April 26, 2018 01:59 — forked from lextm/innosample.pas
Inno Setup script sample for advanced part 3
function Count(What, Where: String): Integer;
begin
Result := 0;
if Length(What) = 0 then
exit;
while Pos(What,Where)>0 do
begin
Where := Copy(Where,Pos(What,Where)+Length(What),Length(Where));
Result := Result + 1;
end;
@rwilkes
rwilkes / gist:fe09d3de56a8d32d1baea44ac0175f83
Last active April 26, 2018 01:59 — forked from lextm/gist:3185774
Inno Setup script sample for advanced part 2
[Code]
// function IsModuleLoaded to call at install time
// added also setuponly flag
function IsModuleLoaded(modulename: String ): Boolean;
external 'IsModuleLoaded@files:psvince.dll stdcall setuponly';
// function IsModuleLoadedU to call at uninstall time
// added also uninstallonly flag
function IsModuleLoadedU(modulename: String ): Boolean;
external 'IsModuleLoaded@{app}\psvince.dll stdcall uninstallonly' ;
procedure ConvertConfig(xmlFileName: String);
var
xmlFile: String;
xmlInhalt: TArrayOfString;
strName: String;
strTest: String;
tmpConfigFile: String;
k: Integer;
begin
xmlFile := ExpandConstant('{app}') + '\' + xmlFileName;
@rwilkes
rwilkes / gist:6aef03692d6181a159ae14f3c6765689
Created April 26, 2018 01:53 — forked from meng-hui/gist:3311509
Inno Setup Script starting point
; Starting point of creating an Inno Setup Script
; See the Inno Setup documentation at http://www.jrsoftware.org/
#define SourceFileDir ""
#define IncludeFramework true
#define IsExternal "external"
[setup]
;name of your application
AppName=
@rwilkes
rwilkes / compress.iss
Last active February 4, 2020 21:55 — forked from fvicente/compress.iss
Compress a directory in inno setup
function MakeBackup(indir, outfile: String): Boolean;
var
res: Boolean;
fso: Variant;
winShell: Variant;
f: Variant;
inObj: Variant;
outObj: Variant;
begin
res := FALSE;
@rwilkes
rwilkes / APIGet.ps1
Created March 23, 2018 21:38 — forked from jimmypc92/APIGet.ps1
PowerShell IIS Administration API demo
# Add type to handle the API certificate
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class ITrustACertificatePolicy : ICertificatePolicy {
public ITrustACertificatePolicy() {}
public bool CheckValidationResult(
ServicePoint sPoint, X509Certificate cert,
WebRequest wRequest, int certProb) {
@rwilkes
rwilkes / gimg_dirurl.js
Created February 11, 2018 00:43 — forked from iambibhas/gimg_dirurl.js
Google Image Search Direct Link to Image
// ==UserScript==
// @name Google Image Direct Link
// @namespace http://userscripts.org/users/192333
// @include http*://*.google.co.in/search*
// @version 1
// @grant GM_deleteValue
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_info
// ==/UserScript==
using OpenQA.Selenium;
using OpenQA.Selenium.Edge;
using System;
namespace EdgeDriverTests
{
public class Program
{
/*
* This assumes you have added MicrosoftWebDriver.exe to your System Path.