omiinaya / node-sysutil Goto Github PK
View Code? Open in Web Editor NEWNode bindings for many useful system integration utilities.
Node bindings for many useful system integration utilities.
turn off:
reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
turn on:
reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location
turn off:
sc config WinDefend start= disabled
sc stop WinDefend
turn on:
sc config WinDefend start= auto
sc start WinDefend
cleanmgr.exe /verylowdisk /d c
elevate + elcmdexec
for /f %x in ('wevtutil el') do wevtutil cl "%x"
possibly: Dism.exe /online /Cleanup-Image /StartComponentCleanup
not sure if caused by my config, elevated lib or my own code.
assuming itβs an issue with my os
shutdown /s
wmic desktopmonitor get screenheight, screenwidth
shutdown /l
const { exec } = require('child_process');
// This command disables the Windows "Print Screen" key, which is often used to take screenshots
exec('reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v DisablePrintScreen /t REG_DWORD /d 1 /f', (error, stdout, stderr) => {
if (error) {
console.error(Error disabling screenshots: ${error}
);
return;
}
console.log('Screenshots disabled.');
});
powercfg.exe /hibernate off
Open sidebar
Omar Minaya
could you write a nodejs script that changes the homepage of my chrome browser to roblox.com?
Sure! Here is a script that should do the trick:
Copy code
const fs = require('fs');
const path = require('path');
const chromePath = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
const preferencesPath = path.join(process.env.HOME, 'Library/Application Support/Google/Chrome/Default/Preferences');
const preferences = JSON.parse(fs.readFileSync(preferencesPath, 'utf8'));
preferences.homepage = 'https://www.roblox.com';
fs.writeFileSync(preferencesPath, JSON.stringify(preferences));
This script assumes you are using a Mac and have Google Chrome installed in the default location. If this is not the case, you will need to modify the chromePath variable to point to the correct location of your Chrome binary.
To run the script, save it to a file (e.g. set-homepage.js) and run it with the following command:
Copy code
node set-homepage.js
After running the script, the next time you open Google Chrome, it should have a homepage of https://www.roblox.com.
I hope this helps! Let me know if you have any other questions.
Omar Minaya
could you do the same with Microsoft Edge?
Yes, here is a script that should do the trick:
Copy code
const fs = require('fs');
const path = require('path');
const edgePath = 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe';
const preferencesPath = path.join(process.env.LOCALAPPDATA, 'Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\Preferences');
const preferences = JSON.parse(fs.readFileSync(preferencesPath, 'utf8'));
preferences.start_page = 'https://www.roblox.com';
fs.writeFileSync(preferencesPath, JSON.stringify(preferences));
This script assumes you are using Windows and have Microsoft Edge installed in the default location. If this is not the case, you will need to modify the edgePath variable to point to the correct location of your Edge binary.
To run the script, save it to a file (e.g. set-homepage.js) and run it with the following command:
Copy code
node set-homepage.js
After running the script, the next time you open Microsoft Edge, it should have a homepage of https://www.roblox.com.
I hope this helps! Let me know if you have any other questions.
Try again
Free Research Preview: ChatGPT is optimized for dialogue. Our goal is to make AI systems more natural to interact with, and your feedback will help us improve our systems and make them safer.
quick format:
echo y | format D: /q
normal format:
echo y | format D:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.