Skip to content

Instantly share code, notes, and snippets.

Option Explicit
Dim objNet, objShell, objProcess
Dim userObj
Dim dc, domain, username, logonscript
Set objNet = CreateObject("WScript.Network")
Set objShell = CreateObject("WScript.Shell")
Set objProcess = objShell.Environment("Process")
Option Explicit
Dim objReg
Dim hasAccess, hasTspkg, hasSecProv
Dim arrSP, SPVal
Dim idxLast
const HKLM = &H80000002
const KEY_SET_VALUE = &H0002
const LSA = "SYSTEM\CurrentControlSet\Control\Lsa"
const SecProv = "SYSTEM\CurrentControlSet\Control\SecurityProviders"
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\7-Zip.001\DefaultIcon]
@="C:\\Program Files\\7-Zip\\icons.dll,9"
[HKEY_CLASSES_ROOT\7-Zip.7z\DefaultIcon]
@="C:\\Program Files\\7-Zip\\icons.dll,0"
[HKEY_CLASSES_ROOT\7-Zip.arj\DefaultIcon]
@="C:\\Program Files\\7-Zip\\icons.dll,4"
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
"Debugger"="\"C:\\Windows\\System32\\calc.exe\""
#include "calendar.h"
calendar::calendar() : QDate(){
}
calendar::calendar(int y, int m, int d) : QDate(y, m, d){
}
#include <cstdlib>
int main(int argc, char **argv){
int retval = 0;
if(argc > 1)
retval = atoi(argv[1]);
return retval;
}
#include <windows.h>
#include <iostream>
using namespace std;
#define ERR_CMD 1
#define ERR_NOTPID 2
#define ERR_NOTVALID 3
typedef LPSTR (WINAPI *gc)( void );
#include <windows.h>
#include <string>
int main(int argc, char **argv){
std::string msg;
for(int i = 1; i < argc; i++){
msg.append(argv[i]);
msg.append(" ");
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Security.Cryptography.X509Certificates;
namespace certreg {
class Program {
static void Main(string[] args) {
#include <windows.h>
int WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR cmdLn, int nShow){
char cmd[] = "nltest.exe /sc_change_pwd:DOMAIN"; // Change DOMAIN to domain name
PROCESS_INFORMATION procInfo;
STARTUPINFO startupInfo;
ZeroMemory(&startupInfo, sizeof(startupInfo));
startupInfo.cb = sizeof(startupInfo);
//chdir("%windir\\Sysnative");