Skip to content

Instantly share code, notes, and snippets.

View john-clark's full-sized avatar
🛸
Out there

John Clark john-clark

🛸
Out there
View GitHub Profile
@for %i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do @%i: 2>nul && set/pz=%i <nul
@john-clark
john-clark / about.txt
Last active December 15, 2015 09:39
Windows 8 Startmenu
Several scripts for Windows 8 (not 8.1)
Gives a start menu button with shutdown and several other fixes.
' cmd /c start /wait wscript HideKBs.vbs
'
' Original Mike.Moore Dec 17, 2012 on answers.microsoft but when ran it Hide everything so no good.
' Link to script: http://www.msfn.org/board/topic/163162-hide-bing-desktop-and-other-windows-updates/
Dim WSHShell, StartTime, ElapsedTime, strUpdateName, strAllHidden
Dim Checkagain 'Find more keep going otherwise Quit
Dim hideupdates(37)
@john-clark
john-clark / raa.wsf
Created October 25, 2013 14:48
wip to automate remote assistance
<job id="Partially works">
'filename raa.wsf
<script language="VBScript">
'setup
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Set oShell = createobject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objHTTP = CreateObject("Microsoft.XMLHTTP")
DISM Capture and Deploy
-----------------------
1. Create a windows install
a. Boot & install from windows media
(DVD, ISO, USB, PXE)
b. Customize
i. Run through install until customize screens
ii. Enter Audit mode
(press CTRL+SHIFT+F3 at first install screen)
iii. Configure, Update, and Install software
#
# Lets make this better looking
#
function GenerateForm {
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null
$form1 = New-Object System.Windows.Forms.Form
$dataGridView1 = New-Object System.Windows.Forms.DataGridView
$InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState
$System_Drawing_Size = New-Object System.Drawing.Size
@echo off
mode con cols=90 lines=70
chcp 437 >nul
openfiles >nul 2>&1
if %errorlevel% NEQ 0 goto :UACPrompt
goto :gotAdmin
:UACPrompt
Echo CreateObject^("Shell.Application"^).ShellExecute WScript.Arguments^(0^),"%*","","runas",1 >"%temp%\elevating.vbs"
%systemroot%\system32\cscript.exe //nologo "%temp%\elevating.vbs" "%~dpnx0"
del /f /q "%temp%\elevating.vbs" >nul 2>&1
@john-clark
john-clark / About.txt
Last active May 8, 2017 02:45
Server Core
some random stuff I needed to dump while working on server core 2016
@echo off
if %1$==$ (
rem use the localcomputername if nothing is specified
set computer=%computername%
) else (
rem use the computername passed as a parameter
set computer=%1
)
echo Creating report for %computer%
#!/bin/bash
# Guacamole installation
# Supports Ubuntu 14.04,15.10 and Debian wheezy,jessie
# 32 and 64 bit
# Script to be run as sudo/root
# ver 1.5
# To be run on a FRESH OS install
# Do not install anything other than base OS
# Bharath Chari 2016