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.

Piping with RunOnceEx

Featured Replies

I have tried ever thing I can think of, and did some searching online, still nothing!

I am trying to use command piping with the RunOnceEx registry key, and it seems like no matter how I do it - I keep getting an error. :no:

The basic idea is to make sure the installation programs are run as a specific user that was created during the OS setup process, and that account is hidden, and has a password set to it, but I have a program that will auto answer the password entry.

Anyway the way to do this at the command prompt or inside a batch file is:

runas /u:Username filetorun | sanur password

But issue that same command using RunOnceEx and it complains.

Any clue how to make this work?

Thanks


  • Author
Did you try:

cmd /c "runas /u:Username filetorun | sanur password"

I hadn't - but just did, and still it did not like that at all........

the problem with that solution was probably the addition of the extra quotes, which weren't necessary and if required would have needed escaping.

This should have been fine

REG ADD %KEY%\001 /V 1 /D "cmd /c runas /u:Username filetorun | sanur password" /f

  • Author
the problem with that solution was probably the addition of the extra quotes, which weren't necessary and if required would have needed escaping.

This should have been fine

REG ADD %KEY%01 /V 1 /D "cmd /c runas /u:Username filetorun | sanur password" /f

Unfortunately not that easy - but at least I got the EXACT error this time:

The format of the " sanur password" RunEx or RunOnceEx entry was invalid. A vertial bar

("|") is needed after the function name and the function needs to support WinMain()

parameters.

That's the message that just keeps popping up no matter how I try to put it in......

Why don't you try to pre-enter your command into an expandable string:

[HKEY_CLASSES_ROOT\New Key #1]
"sample"=hex(2):63,00,6d,00,64,00,20,00,2f,00,63,00,20,00,72,00,75,00,6e,00,61,\
00,73,00,20,00,2f,00,75,00,3a,00,55,00,73,00,65,00,72,00,6e,00,61,00,6d,00,\
65,00,20,00,66,00,69,00,6c,00,65,00,74,00,6f,00,72,00,75,00,6e,00,20,00,7c,\
00,20,00,73,00,61,00,6e,00,75,00,72,00,20,00,70,00,61,00,73,00,73,00,77,00,\
6f,00,72,00,64,00,00,00

If you add that to your registry, the vertical bar character will be displayed just fine.

The long hex(2)-string actually stands for "cmd /c runas /u:Username filetorun | sanur password" without the quotes.

My example is taken from a .reg file but you should be able to add that long hex(2)-string using the reg command as well.

Just don't let the \ linefeed characters confuse you!

Unfortunately not that easy - but at least I got the EXACT error this time:

The format of the " sanur password" RunEx or RunOnceEx entry was invalid. A vertial bar

("|") is needed after the function name and the function needs to support WinMain()

parameters.

That's the message that just keeps popping up no matter how I try to put it in......

In order to run the command provided by you I have provided you with the correct syntax. If your provided information was incorrect then of course that was beyond the scope of the original question.
  • Author

Well, managed to get that to run using a different method - but that answered why the cmd /c is no good.... The point is to finish one process before starting the next - cmd /c execute the command, but dose not wait for it to finish before closing, making the app that called it, THINK the process has finished, when actually it just started!

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.