Laptop crashing in the morning, Temperature Issue?

This situation should be dealt with seriously as expensive damage can occur.

  • I am not a professional, I’m just doing this slowly to possibly learn how to solve issues like this.
  • This post lists some symptoms and possible fixes but the main problem isn’t known exactly.
    • Different problems can have the same symptoms.
    • Different crashes could be caused by different problems.
  • When looking for an answer online, make sure the symptoms match yours before making any changes.
    • Independent Advisors” sometimes don’t give good information.
  • Before making any changes, if the problem could be with your computer’s memory, making changes can overwrite something it shouldn’t.
  • This is also a rough draft as I am putting off working on it more.
    • Missing:
      • Identifying significant issues.
      • Concrete Solutions.
      • More in-depth research.
      • References to sources of information.

Important Initial Steps

  • Make a recovery drive.
  • Back up important files.
  • Properly clean the dust from your PC. Dust can cause issues. Cleaning your PC improperly can cause issues.
  • Check that your cooling system is working, in my case, fans. They also need enough space to effectively move air through the system.
  • Keep a list updated of what you install and date of installation, accessible outside of your computer.
  • Find any and all information about the crash, including crash dump files. In this case, look to fix what is causing the dump log creation to fail.
  • Know the exact model of your laptop/PC and operating system.

Observed Issues

IssuePriorityAssumed Possible Causes
Crashing when turning on the computer.HighBooting, Memory Access
Crashing when turning on/using the computer in the morning.HighCooling Issue?
Crashing when Gaming (or GPU/CPU intensive activities)MediumGPU/CPU, Display Drivers
Windows loading to BIOS screenHighMemory or Hardware
In BIOS, Storage appearing as [EMPTY]HighMemory or Hardware
Light Blue Error Screen (Blue Screen of Death) appearing for a brief moment.HighMemory or Hardware
Unable to save error/dump log. This event being found in Event Viewer.HighMemory or Hardware
“Preparing Automatic Repair”, “Diagnosing your PC” LoopMediumBooting, Memory Access

I’ve observed a couple of things.

  1. If the computer loads up to the BIOS screen, storage was listed as “EMPTY”, meaning there may be an issue there.
    • OS isn’t loading but the BIOS (Basic Input) is.
    • When finally able to load OS, the MSI logo shows for longer than 2 seconds.
  2. OS seems more likely to load if leaving the computer to “rest” shutdown for a couple minutes, rather than after an immediate restart. This isn’t consistent however.
    • This is what makes me thing this is a temperature issue with the hardware.
  3. If the computer loads up to the “Preparing Automatic Repair” loop, instead of the BIOS screen, storage perhaps was able to accessed normally. I think I enter this loop if I had VMD enabled when changing settings in the BIOS screen. Disabling VMD seems to allow the OS to load normally. I’m not sure if changing the “Fast Boot” setting had an effect as well.
  4. Computer appears to have crashed when it was sleeping. Or it had woken up somehow and crashed.

Errors in Event Viewer

SourceDescription in General
EventLogThe previous system shutdown at 2:48:31 AM on ‎5/‎21/‎2024 was unexpected.
volmgr Dump file creation failed due to error during dump creation.
Service Control ManagerThe RstMwService service terminated with the following error: %%2684420176
WHEA-LoggerA fatal hardware error has occurred. A record describing the condition is contained in the data section of this event.

The Errors to focus on are likely volmgr and Service Control Manager.
There may be other events worth looking into that are not of the Level “Error”.

volmgr, dump file creation error possible causes

  • Corrupted system files (can be tested with sfc via command prompt)
  • Memory
  • RAM (can be tested with memtest86)
  • BIOS

RstMwService:

  • RstMwService is Intel Rapid Storage Technology Management
  • https://www.file.net/process/rstmwservice.exe.html
  • Assumed to be not needed if not using a raid setup.
  • Read somewhere that I should be using VMD (Volume Management Device) instead. {Need to find where I got this information}
    • ** I think I needed to have this disabled before Windows was able to load. I need to read more about this option and system.
    • To enable VMD: bios menu -> Advanced -> VMD is Enabled
  • https://new.reddit.com/r/techsupport/comments/ry6m3t/comment/hwjxl7m/ (Accessed 8/26/2024, Posted 02/11/2022)
    • Is said to be a Windows 10/11 issue, though not much more information is given here.

Assumed Main Problems

  • There could be one core issue or there might be multiple issues.
  • Different crashes could be happening for different reasons.
  • Types of crashes:
    • When the computer is starting up in the morning.
    • During gaming/GPU/CPU intensive activity.
  • Hardware Issue
    • Because the crashing appears to happen consistently in the morning.
    • The crashing doesn’t happen regularly. It happens every couple months or so. Does it happen more often during the warmer seasons?
    • Why is the computer unable to boot/load the system for a while, then be able to load normally with no changes made?
    • This information makes me think the issue may be a temperature issue, but the problem can possibly be something else.
  • Laptop is overheating and isn’t able to cool down effectively. (Hardware Issue)
    • With the hardware not being able to function properly, possibly every function, including ones that would log and track issues, might not be able to work.
    • Solutions found were Repaste (the CPU?) and or Undervolt.
  • Issue with booting windows (the operating system), possibly from where the windows system is stored.
    • The computer is having an issue loading up the operating system (or something). I do not know for certain where the computer is having an issue and I should learn more about the exact specifics.
    • Issue with Software reading hard drive (SSD) or other storage.
    • Hardware issue with hard drive or other storage.
    • <personal note: should learn how a computer boots to better understand the possible issue.>
    • <Where is the code/information to boot stored? on the hard drive or something else?>
    • DMA (Direct Memory Access) issue

Other possible main problems

  • Software issue in windows 10/11.
  • Read of instances where GameInput Service may be the main issue. I assume this is a symptom instead.
  • Often related to gaming. This was a point other online posts had in common. I assume this is about the stress on the GPU caused by rendering content and somewhat on constant calculations.
  • Malware/Viruses isn’t completely ruled out.
    • Could be malware made to collect information in a specific way that requires crashing/starting up.

Things that needed to be looked up.

  • <What are SATA/AHCI/Chipset drivers.>
  • DMA (Direct Memory Access) issue

Things to check/try/fix

Test memory and everything else before installing/reinstalling or making system changes.
DO NOT do any solution you find online until you fully know what doing that solution does and why you should do it.

Command line:

  • sfc /scannow
  • DISM.exe /Online /Cleanup-image /Restorehealth
  • chkdsk
  • chkdsk /f (this requires the computer to restart so I put this off )
  • TODO: make into table, add note about what exactly does each test do.
  • Windows Memory Diagnostic
  • memtest86

Looked up my laptop model on the manufacturer’s website.

  • Found the file for the Intel Rapid Storage Technology driver on my computer manufacturer’s website.
  • Was not able to install the driver with the message “You are trying to install this software on an unsupported platform.”
  • From what I’ve read, I assume I do not need this driver, but I could be wrong.

Last resort is to reinstall windows and format the hard drive.

I had a similar issue with frequent crashing (minus the difficulty in booting windows from what I remember).
I thought I fixed it with installing the compatible intel graphics driver where I had an incompatible version.

Fans

Checking my fans, the fans appear to be able to work normally. A program that shows fan speed (MSI Center for my laptop model) is showing the the fans are functional and working.
I’m thinking there might be an issue in that the fans are not speeding up when needed or not getting enough airflow to properly cooldown the hardware.
Investing in a laptop stand might be beneficial for better airflow.

  • Basic usage, such as plain web browsing, core temperatures are around 48-58 °C.
  • When gaming, specific cores tend to go higher up to 90+ °C.

GPU

I don’t think my issue is with the GPU but here are some ways to test it.


Basic Solutions

  • Make sure you have the Correct/Compatible drivers for your computer model.
    • Check on the manufacturer’s website or with their software such as MSI Center.
    • Newer drivers found elsewhere may not be compatible and cause errors.
    • One answer mentioned is to check that your BIOS is updated.
    • As mentioned above, installing the appropriate graphics driver for my laptop model appeared to fix something as crashes became less common. Perhaps this fixed one source of computer issues.
  • Uninstalling unneeded software that were installed recently is probably a good idea.
  • Overheating/Cooling Issue
    • Fans are not effectively cooling down the hardware when it needs to.
    • Fans require free space around them to move air more effectively.
    • Cleaning your fans safely and working in a room that is cleaned regularly would help.
  • There is the possibility that this is a hardware issue.
    • Such as a faulty connection or an issue with a device inside the computer.
  • Error/Dump logs can help find the main issue.

Event Log

  • Crashing/booting issues were had a few times for multiple days around 5/21/24.
  • 5/31/24, crashing hasn’t happened yet for the whole weak, while also doing CPU/GPU intensive activities.
  • 6/2/24, when first loading up from sleep mode after the night, loading up a video stream (twitch) and started up a medium intensive game (Oxygen Not Included). Computer crashed and loaded something named BIOS. System Information was read as “empty” where it would say SSD information normally. Selecting “optimized defaults”, which also disabled “VMD”, was able to boot windows. Errors in Event Viewer are the same as listed in a section below.
  • Generally avoiding restarting the computer as there were issues with booting the operating system (turning the computer on is fine).
    • Many fixes and checks require restarting the computer.
  • 8/3/24
    • Crashed in the morning with a graphics intensive video game and with a browser open.
    • Dump file failed to create.
    • “The Razer Central Service service terminated unexpectedly.” Which seems to be a different error.
    • It isn’t known if this crash is related to crashes before. The main cause can possibly be the same.
    • As the computer had not crashed or had issues with loading up, I assumed that with me making enough space for air flow, minimizing dust by cleaning the room regularly, tracking temperatures, adjusting fan speeds was enough in dealing with this issue.
    • Waiting a couple minutes before booting the computer sometimes had the computer boot normally, possibly evidence that the crash was hardware related, maybe overheated.
    • Computer had restarted to install updates and did not have an issue booting up previously.
  • 9/1/24
    • A morning crash occurred when first turning on the computer from sleep mode.

References used

https://www.minitool.com/partition-disk/dump-file-creation-failed-due-to-error-during-dump-creation.html
Solving the “Dump file creation” error. Lists possible issues, how to preform a variety of checks, provides a number of solutions to solve this error.

https://new.reddit.com/r/MSILaptops/comments/nex34a/look_here_if_your_temps_are_too_hot_or_you_dont/ (Posted by ddr4memory on May 17, 2021, Accessed on August 5, 2024)
On how to solve temperature issues on an MSI Laptop.

https://answers.microsoft.com/en-us/windows/forum/all/the-rstmwservice-service-terminated-with-the/86f7b8c3-8878-46a7-8b53-05d268f1d975
Creating a “Small Memory Dump” to test dump file creation.


Extra Notes

  • I had put off on publishing this as I felt that it needed more information or more research done.
  • Possibly one of the sites I’ve looked at identified the problem and provided a solution but I skipped over it somehow.
  • Do the simple, cheaper checks/fixes first before doing the more expensive ones.
  • Users would assume its a cheaper software issue rather than an expensive hardware one.
    • Users/We really don’t want it to be a hardware problem.
  • Some things may treat a symptom and not the cause.
    • Fixing the smaller issues would make it easier to find the main problem possibly.
  • Like programming, there can be a variety of ways to fix it.
    • One way can be better than others.
    • Another way may be “doing more than necessary” such as wiping drives and replacing hardware.
      • Though necessary in some cases.

Post todo:

Post Organization:

  1. List every issue that may be related to the problem.
  2. Make safety backups and perform system and memory tests before making any changes.
  3. Research the details about the problem.
  4. Identify solutions that specifically fix specific problems that were identified. (Unnecessary changes can cause other problems.)
  5. Apply simple solutions slowly and check if they fix smaller problems before trying other solutions.
  6. Leave last the solutions that require making significant changes unless those solutions are the only way to fix a major problem.
  • A table of contents of a sort. With wiki like links to move between sections
  • define bios
  • list more sources
  • identify more solutions and checks.
  • some things are stated multiple times
  • Remove lines that are repeated more than needed.

AutoHotKey: Replicate Mouse Wheel actions

Issue:

Mouse scroll wheel no longer functions as smoothly. Find a simple and reliable alternative that provides the same functions.

I found the following program that would help in creating the solution to this issue.

AutoHotKey: Program that allows you to create hotkeys to do a variety of things. It can help do something complex such as adding an interactable guide into a game.


Modifying the code from the following answer:

[superuser.com] Keyboard shortcuts to send mouse scrolls to active window, Soumya’s Answer to Question made by Amelio Vazquez-Reina.

; Scroll up
!x::
    Send,{WheelUp 5}
return

; Scroll down    
!z::
    Send,{WheelDown 5}
return

The 5 in {WheelDown 5} is the scroll amount. (Information from comment by Stevoisiak to the Answer in the link above.)

Paste into it’s own .ahk file and run it to have it start working.

With this script running:

  • “Alt + X” would scroll up.
  • “Alt + Z” would scroll down.

These keys were chosen as this was used to zoom in and out of a screen.

Missing would be the “Wheel Press” function but I did not have need for it.


Other Solutions

[AutoHotKey] Using Keyboard Numpad as a Mouse written by deguix: A more thorough script replicating the whole mouse, but I wanted something more lightweight and simple. Likely more customizable than the script I ended up using.


Additional Background: This could be a physical issue with the mouse, that it needs needs to be cleaned well, but it may depend on how the mechanism works.

In-Depth: Note Tokens (Incomplete, Interim Title, Temp Piggyback)

Initial Post Date: 22/04/25
Update Date: 22/04/25

Tags/Keywords: Note Tokens, Design Concepts, Productivity, Utility, PowerShell, Windows File Explorer

Changing the way I make notes helped me a bit in getting more productive. A part of it is probably learning a new way of doing things and applying it. You learn how to make it efficient in your own way.

Todo: clean up thoughts and sections of this post.

Duplicate Top Notes (To be placed in the sidebar probably.)

  • Don’t be evil: it’s just possible that this would happen and this principle gets lost and forgotten. This was a popular guideline, rule or something at a certain place.
  • I don’t often read guides on how to do things. It’s fun going into things blind and doing things at your own pace. Not recommended for everything. (Concept is also used in video games)
  • There are probably other blogs out there like this one. With most thoughts already shared and more organized. I won’t let that stop me nor you however.
  • Do not be afraid of making duplicate thoughts such as this one.
  • Do not be afraid of making duplicate thoughts such as this one.

Blog todo list (Carry over across posts)

  • Probably common references in the sidebar. Like a regex check or code/function reference site.
  • Mobile Friendly: A link to posts by Title, by Category or by Tag. (Category is more higher level than a Tag) You can’t easily find posts about a specific topic on mobile yet.
  • Post 8: WP Groups & Blocks, WP Visual Editor, Table of Contents
  • Blog: Take a relook at current Blog Structure. (The meat of the blog is in the posts)
  • Post XX: Coding/Organization Terms: Vocabulary
  • Post XX: Blog Post Structure and Notes
  • Post XX: Code Structure and Notes (General, not any language specifically)
  • Post XX: Note Structure and Notes
  • Post XX: Blog todo list (Internal: keep at top of listed posts?)
  • Cleanup: In-Depth: Note Tokens, Create table of contents.
  • Cleanup: Post 7: Wikifying Blog Posts

Note Token Concept/Philosophy/Design

Individual files that each with a priority value right in the filename. The usual default value I currently use is ‘zz’ so that the Note Token is usually sorted at the end of a list of files. (Concept: The tail is the second head of a list.) Process is mostly manual at the moment so there is a minor issue when you have many Note tokens. Note Tokens are basically more engaging than moving text around in a text editor.

  • Make Note Tokens freely but be as clear as possible in content of the note as it may be sometime before you read it.
  • It is better to have many notes rather than no notes at all. (There may be special cases against this.)
  • Need to be somewhere you will see them, not somewhere/some folder out of the way.
  • Being individual files, they carry additional mental weight in which perhaps improves memory about these notes. (Vocab: mental/memory retention)
  • Do not be afraid to make duplicate note tokens, you may get more disorganized, but there is less overhead about worrying about missing notes/ideas and worrying if you make duplicate notes.
  • Note tokens can be screenshots, I have a dedicated custom mouse button to make quick screenshots. Empty Bookmarks can also be Note Tokens. Even empty bookmark folders, whichever you feel might have more “mental weight”. Edit: Ideally Note tokens have the least amount of function as possible. You may also misplace files into these folders.
  • Priority prefix should be changed freely. This is why I use Letters instead of numbers for the Priority prefix because there are more than twice as many numbers in regards to what a single character could be. With many tokens, needing to rename multiple tokens becomes an issue but there are programs to quickly rename a set a files. One could also write small scripts to do renaming. I personally use Bulk Rename Utility.
  • The Note Token filename may include 1-2 short tags, right after the priority prefix, to help categorize the Note.
  • Because I love throwing Anime/Video game references everywhere, lazy one with Joey Wheeler and his Scapegoat Card.

Incomplete & Completed Task Tokens

Following the concept above, a token can be made for any small task that gets added to your to-do list. When completed, place the task token in a task complete folder with the finish date appended to the filename. This may help you feel productive.

Note Taking Strategies

I take notes in VS Code, kinda lightweight but perhaps not really? An extension that really helps out is Bookmarks. I’ve changed the hotkey to make/remove a bookmark to Alt+B.

  • Make as much notes as possible. Any random note may have contribute significant value later on.
  • Freely make up a number of “tags” (of key words) everywhere to help organize/group different notes together. This helps you group thoughts together and more importantly, connect thoughts in your head.
  • in VS Code, I’ve made a shortcut to insert a date & time stamp and have been using that freely. The shortcut used is Alt+D as I think good shortcuts can be done with with one hand. Most of the utility currently is that this identifies which thoughts/notes are older.
  • Some notes could use a Table of Contents.
  • I’d say my vocabulary could be better so I use the tag [wording/word: “word to look up/change”] when I would like to find a word that better fits, or when I think of a word that may fit what I’m thinking of but I may not have a clear definition of it like the words retroactive and meta (still having a tough time wrapping my head around this). Also look up any words you may want to relook up anyway and see if there are related words that you may want to start using like concise and theory. And Paradigm Shift.

(Temporary Notes Section)

  • Ordering:
    Common/common reference toward front/top, decreasing going back.
    Smaller things toward the top, larger things in the back. (Sometimes the ordering oppose each other, the common reference probably takes higher precedence.)
  • Internal Notes should usually be in parenthesis to distinguish them from normal thoughts. (Vocab: distinct)
  • Priority Prefixes: Other than lists/sets of items needing priorities, small lists whose order don’t matter do not need a priority prefix.
  • Issue with my token generator script: The shortcut I use that copy everywhere each reference that script by filename individually. I can’t rename the script/folders without breaking those shortcuts. (A not ideal solution is to search for those shortcuts via search and double check them) Is there an option to have the shortcuts reference a file the script name so I only need to change that reference if I decide to rename my script? Side note: Generally, there shouldn’t be too much levels of redirection, that increases work time generally.
  • Organization: when sorting with priorities, 2-3 “stacks” is ideal, High, Medium, and Low. 3 is slightly unwieldy so there shouldn’t be more stacks/queues than that. Additionally, a single stack/list, in my own head has 2 heads.

WP Groups & Blocks, WP Visual Editor, & Custom Formatting (Temporary Section, Post 8 Content, to split)

I’m getting used to the using this wordpress’s post editor, it has some good features like inline previews which is amazing QoL.

WP Groups & Blocks

  • Separate groups/lists by pressing enter twice.
  • Use the up and down arrow keys to control the positioning of lines instead of copy and paste.
  • This editor uses special blocks to organize content, very much different from editing a wiki page which is more basic. It takes time to get to understand how they work. It’s useful to make a completely separate “block” when moving things around, press Enter/Return a couple times before and after the item you want to make into a block.
  • List View makes organizing groups and blocks much easier.
  • Group only Sections and Subsections, use groups to organize content.
  • Lock blocks when possible.
  • Understanding groups and feels important to know how to use in using the visual editor. (Internal Note: Opinion like lines should be toward the bottom.)
  • (Internal note/comment: We can’t name groups? We can name Reusable Blocks.)

WP Visual Editor

  • Edit as HTML for more control.
  • Feedback/Comment: changing the text of headers is annoying as the formatting doesn’t cover new text having to go into the HTML code itself to fix it.
  • Ugh, making blog posts is so much harder than working on a wiki post. Making different blocks, line breaks and empty space are currently difficult to manage here. There is to much overdesigned UX that it’s interfering with my control over the content. This is probably designed to be more mobile friendly for working on a mobile devise. (a hotrod, vroom vroom.) (Thought saved for posteriority) (posterity?) (Vocab: posteriority)
  • To combine 2 lists, move {placeholder: word for the blinking text line thing} to the front text of the 2nd list and press delete.

Custom Formatting Rules & guidelines (For my blog specifically)

  • <div style=”border-bottom: solid 1px #8a8682;”>Post Section Base</strong></div>
  • Sub-Sub Section headings are paragraph blocks that are bold and underlined.

Custom Formatting Notes (For my blog specifically)

  • I’ll try cross out notes instead of deleting them when I feel they aren’t that useful. They might be useful.
  • Going to make posts as if I’m working on code, instead of hidden comments, they’ll be in gray boxes and/or in lists. I can probably make a class and define some css to easily help identify these “visible code comments”. A non-CSS’d example is the following bullet point. (Not Internal)
  • Perhaps sparingly or whenever you feel like it, underline important points of any thought. This may help in identifying common themes and thoughts. (Not Internal)
  • Readability: I think it’s easier to read bullet points instead of long imposing blocks of text.
  • When possible, cross-out completed tasks instead of deleting them. This helps you understand your thinking process however this would make a post more “ugly”? Not as clean. (Possible Internal)
  • How should subsections and sub-subsections look like? Decide on a uniform style. (Vocab: uniform)
    • Interim subsubsection title formats: h3, underlined, not bold
    • Use either h2 or h3, do not bold.
    • <h2>: border-bottom.
    • <h3>: just underline the title.
    • May need to convert to HTML code for <h2> unless we can customize <h2> titles in wordpress settings as I want h2 titles to have a page long underlines/separators.
    • Might be able to convert basic <p> and <h3> elements into WP blocks.
    • <h3><span style=”text-decoration: underline;”>h3 base</span></h3>
    • WordPress doesn’t line <h3> and <p> elements directly next to eachother.
    • [marker: Finish uniform <h3> subsection title point]
  • Create a new post on defining general styles/formats. (Vocab: formats) This should be made into it’s own post so that it’s easier to reference. (Post 8 or 9)
  • Design concept: Do everything on one page until the page fills up. Only make separate pages after that.
  • In making h3 standard for subsections, it’s been difficult in separating near/relative ‘<p>’ elements. (vocab: relative)
  • Slight issue when using Alt+Z to undo, I have been jumping to a point where I last made a change instead of where I made the undo.
  • Concept: Maybe make 2 posts, one “clean” version, without internal comments, and an unclean version with internal comments. An alternative is to have a script that toggles hidden elements that contain notes. This script could toggle hidden elements on different sites should they also design their pages in a specific way with hidden toggleable comments/notes.
  • I’ve been working on wiki pages for Black Desert Online and Lost Ark (Korean Massive Multiplayer Online Role Playing Games). (Korean mmos tend to be large time sinks that “don’t value your time”) Good game wikis I know of are one for Runescape and another for Path of Exile. (Move to General Thoughts, the bottom section).
  • (Internal Note: Perhaps this is how an editor feel like when reviewing written articles before they get published.)
  • Probably should make a separate sub-section for notes about writing on a blog. Probably after General Technology and before Organization. The primary focus of this blog is programming/coding. Could be more generalized to a section about Sharing/Communicating Information (Effectively). That isn’t a good title. (Thought saved for posteriority)

PowerShell Script: Note Token Generator

Description

The purpose of this script is to create special “note token” files which are generally used to make small notes. My nickname for these are Pico Notes, for personal reasons.

Reserved characters for filenames:

  • It’s an image so you can put it where you can reference it easily.
  • A square image is also easy to see as a thumbnail.

Value/Utility/Hypothesis/Design/Theory

  • Simple to use, no extra programs aside from the small simple script below.
  • Note Tokens supposedly carry more mental weight than standard notes.
  • Exist on the same “plane” of your work area.
  • Don’t have to open the file to read it, may save time.
  • Gets you thinking about notes in a different way. Similar to rewiring your brain and looking at things at a different perspective. Because taking notes is a basic step, it could help you think about other basic things differently.
  • Notes are purely stored in the filename and the other contents of the file should be left empty.
  • The extension, “.ntok”, is mostly cosmetic other than to identify note token files.
  • Organize and track tasks.
  • Can spread the concepts to file folders, url files, and images. Concept is more manageable when it’s just Meta information and not the actual data.

Background Info

I usually just copy a of a shortcut that executes the code into the folder that I want to make Note Tokens in. I’m thinking there could be a more efficient way to execute this code via a keyboard shortcut. The word “generator” is used because it implies that this is used to create multiple things instead of one thing like a general verb word like “make” though using the verb form, “generate” more of a standard naming procedure. (nomenclature/jargon)

To-do List

Link to post on making executing scripts with a shortcut file. Link to post about going into detail about Note Tokens. Create separate post about Note Tokens, post should only be about Note Tokens or include thoughts about note taking. (Internal Note: Vocab: cmdlet)

# version 1.02
# version date: 22.04.23

<#
== references ==
get-date reference
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.2

== date formats ==
(get-date -format "yy.MM.dd")
example: 22.04.23
(get-date -format "HH.mm")
example: 23.59
- this is 24 hour format.

== parent folder name ==
$parentFolder = Split-Path -Path (Get-Location) -Leaf

#>
$priorityPrefix = "zz" ## Generally use "zz" or "aa"
$name = -join($priorityPrefix, "--d",(get-date -format "yy.MM.dd"),"-t24-",(get-date -format "HH.mm") )
# zz--d22.04.16-t24-09.06.ntok

New-Item -Path .\$name.ntok
# no new token made if same name exists.

# read-only to reduce overhead.
Set-ItemProperty -Path .\$name.ntok -Name IsReadOnly -Value $true

<#
== notes ==
ntok - abbreviation of note token.
#>

<#
== change log ==
- 22.04.25 - 1.04 - new-item reference link, read only setting. comment out to disable.
- 22.04.23 - 1.02 - cleanup, documentation of code bits.
- 22.04.15 - 1.00 - initial
1.01 date stamp
1.02 timestamp
#>

Reg Ex: Substrings (ex: $1, $2)

I’ve recently had to learn about these substring identifiers as they are used in powershell scripts and the program, Bulk Rename Utility.

These are useful in separating a string into substrings, as well as keeping substrings as needed.


If I’m following the information below correctly:
MDN web docs: RegExp.$1-$9

Here is an example of substring matching with a global RegEx Object.

example regex: /(a\w+)\s(b\w+)/
example string: zebra alpha beta yankee
regex.$1 = alpha
regex.$2 = beta

The strings zebra and yankee aren’t matched and are basically ignored.


Using the same example string and a different regex below:

example regex: /(\w+)\s(\w+)/
regex.$1 = zebra
regex.$2 = alpha

Here, as the regex isn’t global, it only returns the first match, beta and yankee and ignored.


Replace in VS Code but keep existing substring

VS code allows the usage of using regular expressions to find and, optionally, replace text.

vscode substring

Would take the text in the following block:

1:
2:
3:

And replace matched instances while keeping matched substrings, like in the block below.

1
|-
|
*
2
|-
|
*
3
|-
|
*

This text example was used to organize information/data in a wiki table.