Tag Archives: technology

SYPAK #32: Windows 11 – OOBE Allow Local Account

So fun! Testing Win11 Don’t care about any of the cloud, online, blah blah blah. Don’t have network access. Don’t want network access. So here I am again. Hence, my reminder to myself that this is the current (As of Sept 2023) to get to a local account on Win11 22H2 fresh install.

TLDR; oobe\ is a path. bypassnro.cmd is a batch file. Use shift+f10 to open a command prompt at the network configuration step and run oobe\bypassnro (no space).

Thank you, NavyLCDR for this post.

When installing Windows 11, if you want to get around having to connect to the internet and login with a MS account, you can enter the command prompt and run:
oobe\bypassnro

I always thought oobe was the command and \bypassnro was an option switch, and I found it completely odd there was no space in there. I was wrong. The command prompt opens in C:\Windows\System32. In \Windows\System32, is a folder called oobe. And inside the oobe folder is bypassnro.cmd. So, that is what you are running with the command oobe\bypassnro.

The bypassnro.cmd is a script which contains:
@echo off
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE /v BypassNRO /t REG_DWORD /d 1 /f
shutdown /r /t 0

So, it is really a registry key that causes oobe to not require a network, and then subsequently allow you to create a local account on a clean install.

SYPAK #31: Windows – Command Line Access to Mapped RDP Disks

I have sniffed around this solution for quite some time, but just last week came up against an immovable need and finally got serious about making it work. Specifically, I was looking to copy some files from an old server to my local disk for “safe keeping” (until I figure out what to do with the junk utilities I’d amassed), and simple file copy was failing (annoyingly, as it does, For Shame! Windows, that in 202x we STILL just get a failure instead of “continue & log for remediation” report!). For the first time in my career, I didn’t have another server to move “it” to, so…

This is where I found this information: https://itworldjd.wordpress.com/2015/08/03/how-to-access-the-disks-mapped-through-rdp/

Thank you, Jacques Dalbera!

Not quite a reproduction of Jacques’ post, but here ’tis.

Since Windows XP, support for drive mapping to the client during a Microsoft Terminal Services Connection (aka Remote Desktop) session, allowing file copy from the server to the client and vice versa via the file system.

To my knowledge, this is supported only in the Microsoft Remote Desktop Connection (aka MSTSC, RDP) application, and is not supported in the Microsoft Universal Remote Desktop App. I hope to find I’m wrong one day and correct this post, but meantime…

In the Microsoft Remote Desktop Connection (MSTSC) interface, “Local Resources” tab, “Local devices and resources” section, hit “more” to see options for “Drives”. Each volume (removable, fixed, or network) available on the client workstation is enumerated, and can be selected to be connected to the server during the RDP session. Each will show in the server’s Windows Explorer as “volume on computer name”, (e.g. “C on Computer1” for C: drive, or “F on Computer1” for F: drive). This makes for reasonably useful GUI browsing and file manipulation, but what about command prompt access?

I’m so glad you asked.
Drives can also be addressed much like network shares via Universal Naming Convention (UNC), and/or mapped in a similar fashion if that suites the purpose. Volumes on the client are accessible to the server as \\TSCLIENT (note the client workstation’s machine name is not used, but is always referenced with the generic name “TSCLIENT”) followed by the volume’s drive letter, so using the same example as before “C on Computer1” could be connected through \\TSCLIENT\C or “F on Computer1” could be connected through \\TSCLIENT\F. We can display the content of C: drive on Computer 1 via UNC:
DIR \\TSCLIENT\C
and/or map a drive letter to it:
NET USE Y: \\TSCLIENT\C
We can also perform other command prompt actions, like copying files:
COPY \\TSCLIENT\C\USERS\ME\DESKTOP\*.XLS D:\DATA\EXCEL
or what I needed, Robocopying files:
ROBOCOPY \\TSCLIENT\C\ME\DESKTOP D:\DATA\EXCEL *.XLS /Z /ETA
ROBOCOPY Y:\ME\DESKTOP D:\DATA\EXCEL *.XLS /Z /ETA

Note from Jacques’ post, as I have not investigated this: the remote Terminal Services session inherits the user’s permission. So if you are logged on to the workstation as user A and you log in to the Terminal Services server as user B, the session will have access to the drives according to A’s permissions.

I hope this helps future me, and, with a little bit of luck, others out there seeking.

PS here’s another article I found while researching this, complete with some pictures. Thank you, Brandon Lee, even if your commenters feel that you did not write about what the title states. The pictures & process still helped me.

SYPAK #25: Repair Windows With DISM and Installer “Disk”

In reply to Geezanansato’s post on September 2, 2015

Using DISM to repair windows from the install disc:

Assuming d: drive is where the cd/dvd is

launch cmd prompt as administrator

mkdir c:\mount

DISM.exe /mount-Image /ImageFile:d:\sources\install.wim /index:1 /mountdir:C:\mount\ /readonly

( server 2008, R2, without SP1 (because that is what I was trying to get installed) had to use DISM.exe /mount-wim /wimfile:d:\sources\install.wim /index:1 /mountdir:c:\mount\ /readonly )

make sure this results in:

Mounting image
[==========================100.0%==========================]
The operation completed successfully.then you can run

DISM.exe /Online /Cleanup-image /Restorehealth /Source:c:\mount\windows /LimitAccess


In reply to aaronfranke’s post on September 28, 2016

Not claiming to be an expert here but i’ve been dealing with the same issue.

Win pe is preinstall environment, since you are not running windows technically the os image is not online so /online wont work.

Use diskpart, then “list vol” to find what letter your OS partition is and what letter the installation media is then modify the command as such.

“DISM.exe /Image:*letter here*:\ /Cleanup-image /Restorehealth /Source:c:\mount\windows /LimitAccess”

To save having to mount the image beforehand change source to

“DISM.exe /Image:C:\ /Cleanup-image /Restorehealth /Source:WIM:*Install media letter*:\x64\sources\install.wim:1 /LimitAccess”

Depending on the install media you are using if it is only 64 bit install with no option for 32

“DISM.exe /Image:C:\ /Cleanup-image /Restorehealth /Source:WIM:*Install media letter*:\sources\install.wim:1 /LimitAccess”

Some installers use ESD instead of WIM so.

“DISM.exe /Image:C:\ /Cleanup-image /Restorehealth /Source:ESD:*Install media letter*:\x64\sources\install.ESD:1 /LimitAccess”

Still sometimes this fails and thats how i found myself here….

Anyone have any ideas as to why sometimes with a specified offline image /cleanup-image is not recognised as a command? or can someone please further correct my syntax if there are any errors? Thanks


I’m just placing this here, where I can find it again.

I’ll be doing this again, soon, and expect I’ll update here when I have a friendly reminder of what actually works. Funny thing, that, once something we do every 2 years or so works, we just move on. Til the next time…

update 8/5/2020. None of this worked for me on the Server 2008 R2 that I needed to get SP1 onto. But the “System Update Readiness” tool, surprisingly, DID fix the whole thing. Weird thing to note: you simply run the “update” (kb 947821) and it “fixes” stuff, logs it, etc. Here’s a link: https://support.microsoft.com/en-us/help/947821/fix-windows-update-errors-by-using-the-dism-or-system-update-readiness#!en-us%2Fhelp%2F947821%2Ffix-windows-update-errors-by-using-the-dism-or-system-update-readiness

It just looks like a standard KM updater, runs like one, but works more like DISM or other toosl when used for repair.

SYPAK Tip #2 – Searching for Email Using Outlook pt. 2

Once again, I found myself wishing I could get back into GroupWise so I could search for particular emails. In this case, I wanted to find emails in a specific folder. (Yay! Outlook does NOT suck at that as much as it does at other things!!!) The problem?

I wanted to return emails in the bodies of which were 2 (count’em ONE, TWO) very specific pieces of information. I did NOT want results containing one of them, nor results containing the other, but only results containing BOTH. For you nerds out there, this is an “AND” statement, not an “OR” statement.

To make matters worse, one of the two pieces of information was TWO WORDS!!!

 

OH NO!!!

Whatever to do?

I wandered into my newly found friend the “advanced find” “tool”. There, under the “advanced” tab lie the secret to my quandary (I hoped)…

I selected “Message” from under the “All mail fields” selection under the “Field” list. I selected “contains” from the “condition” field. I put in my criterion under value.

I click “Add to List”.

I repeated this for the second criterion, using quotes to denote “as a single phrase”.

I click “Find now”. I curse at it as it asks if I want to add the second criterion to the search.

**&#)@#($)*JF!! Of course!!!

NO RESULTS. Well, technically “all results”, meaning every email in the folder returned.

Poop.

After several fruitless efforts, which end the same, I found out 2 things:

1: I have no idea what would happen if I could press the “More Advanced…” button on my mail client, because that little beauty is disabled

2: Despite looking like it might be an advanced search, it ain’t, cause you can’t select BOOLEAN operations!!!

 

ARGH!

 

Google, old buddy, don’t let me down.

Here is what I found:

 

http://office.microsoft.com/en-us/outlook-help/learn-to-narrow-your-search-criteria-for-better-searches-in-outlook-HA010238831.aspx

 

So, I closed the stupid “advanced tab” on the stupid “advanced find” “tool” (along with the disabled and therefore infinitely even more stupid “more advanced…” button)and returned to the client window.

I selected the folder in question.

I typed into the “instant search” “field” “bar” thingy (Yeah, I used 2007. So what? 2010 and 2013 will be similar!) “criterion1 AND “criterion2″” and clicked the magnifying glass.

 

Viola! Results. Right there in my client window.

 

Hope that helps someone.