Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

$OEM$ Directories Not Working...

Featured Replies

Hello!

I have read the MSFN guide all about the $OEM$ folder structure.

I created a cmdlines that calls a batch file which creates the necessary registry keys.

The batch itself runs like a charm, but I wanted the batch creation process to be "invisible" to the user.

I tried using the cmdow.exe, but had no luck.

in the " $OEM$ " directory, I created another directory of " $$ ". In this directory I created a " System32 "directory, in which I put the cmdow.exe.

The directory structure:

$OEM$ 
|
-------$$
|
----------System32
|
------------ cmdow.exe

According to the guide this file was supposed to be copied during the installation into the system32 directory, but for some reason it isn't being copied.

So the obvious question is: Why isn't the file not being copied? Or should I say what am I doing wrong? :blink:

More over, if someone knows a better way of doing this process (the cmdow.exe still creates a momentarily CMD window before activating its clock).

Thanks for any help!


According to the guide this file was supposed to be copied during the installation into the system32 directory, but for some reason it isn't being copied.

So the obvious question is: Why isn't the file not being copied? Or should I say what am I doing wrong? :blink:

Ensure that OemPreinstall=Yes within Winnt.sif as mentioned here within the unattended guide.

You can use another language to hide the window or totally replace the cmd script. AutoIt can do a better job at hiding the window. The demonstration code below show how the window can hidden without any flicker.


; create a test CMD file
FileWrite('test.cmd', 'pause')

; show window then close
$pid = Run('test.cmd')
Sleep(5000)
ProcessClose($pid)

Sleep(1000)

; hide window then close
$pid = Run('test.cmd', '', @SW_HIDE)
Sleep(5000)
ProcessClose($pid)

; remove test CMD file
FileDelete('test.cmd')

MsgBox(0x40000, '', 'Demonstration finished')

Exit

or compile your own window hide exe from the below code


; Usage: CompiledScript.exe "path/to/test.cmd"

If $CMDLINE[0] Then
Const $FILE = $CMDLINE[1]
If FileExists($FILE) Then
If StringRight($FILE, 4) = '.bat' Or StringRight($FILE, 4) = '.cmd' Then
RunWait('"' & $FILE & '"', '', @SW_HIDE)
EndIf
EndIf
EndIf

Or perhaps try WScript.exe using VBScript or JScript. Or some other language.

:)

  • Author
Ensure that OemPreinstall=Yes within Winnt.sif as mentioned here within the unattended guide.

I am using nLite, and I don't want to lose the option to use the recovery option (R during start of txt setup).

I chose in nLite in the unattended mode - prompt repair, so it disabled the OEMPreinstall.

Anyway to keep the repair mode available and use the cmdow?

As for the hiding part, I am trying to use NirCMD. ;)

Edited by YMatrix

Just maker a SFX archive with NirCMD or Cmdow inside and execute from cmdlines.txt as the 1st entry. Tutorials exist on the Forums for making a 7-zip SFX archive or use WinRAR or some other archiver capable to make an unattended SFX.

  • Author
Just maker a SFX archive with NirCMD or Cmdow inside and execute from cmdlines.txt as the 1st entry. Tutorials exist on the Forums for making a 7-zip SFX archive or use WinRAR or some other archiver capable to make an unattended SFX.

Worked like a charm!

Used NirCMD and created a SFX archive using Winrar.

Instead of copying cmdow.exe in place with a SFX at T-12(cmdlines.txt), then i would personally just instead place the 2KB tool hidcon.exe into your $OEM$ folder and then add 'hidcon.exe ' infront of your RunOnceEx batchfile's name in cmdlines.txt.

Unlike cmdow.exe, then hidcon.exe will not shortly show the cmd prompt before it's hidden...

It can be downloaded from this russian page : http://unattended.solta.ru/unattended.ru.htm

Edited by Martin H

  • Author

Thanks for the info!

Another way to hide console windows :yes:

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.