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.

Detect AppsRoot.txt properly

Featured Replies

To know my cdrom drive letter during my unattended installation, i used this trick during specialize pass :

<RunSynchronousCommand wcm:action="add">
<Description>Detect CDROM</Description>
<Order>10</Order>
<Path>cmd /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\AppsRoot.txt SETX AppsRoot %i: -m"</Path>
</RunSynchronousCommand>

By the way, I had an error dialog box while it was detecting AppsRoot :

errormj8.th.png

I had this error dialog box only on my main computer, not on my laptop. It's because my LCD Monitor has a memory stick/usb flash reader. Drive letters exists but there's no disk inside and it throws an exception (it should not, but it throws it).

So I Wrote a little .NET program (AppsRoot.exe) to detect AppsRoot.txt and set AppsRoot environment variable. Because it's written in low level, I can manage exceptions so there won't be error dialog box anymore and my unattended installation will stay unattended.

Here is how I use it, in specialize pass :

		<RunSynchronousCommand wcm:action="add">
<Description>Detect CDROM</Description>
<Order>10</Order>
<Path>cmd /c %systemroot%\setup\scripts\AppsRoot.exe</Path>
</RunSynchronousCommand>

And that's it! At first logon, you'll have your AppsRoot environment variable set correctly.

I've joined the executable AppsRoot.exe and its source in C# 2.0.

Hope it could help,

Kal

AppsRoot.exe

AppsRoot_SRC.rar

Edited by kal


Hello kal!

Great input and great work! That's highly appreciated! :thumbup

You're 100% right. It can happen like you've described, even if in very less cases only.

My very first German Vista Guide was using an exe-file a member of German windows-unattended.de has written. It's called FWDT.exe and it is almost doing the same like your AppsRoot.exe.

The "problem" of this exe solution is, that you have to find a way to copy the AppsRoot.exe over to the target drive to execute it. That means you've to integrate to install.wim or you have to use $OEM$ folder and UseConfigSet - what has a known issue, too. Many users found it to complicated and so I switched back to the simple method you've mentioned first. As far as I've got feedback the simple method is working in about 99% of setups.

Don't missunderstand... I don't want to criticise, cause I know that your solution is the 100% perfect way of doing it and you did great work!

Thanks!

Regards,

Martin

Edited by FireGeier

  • Author

Thank you FireGeier!

Your unattended guide is highly appreciated too! That's where I learned everything (with WAIK Doc).

As you said, this solution implies to run AppsRoot.exe from target SystemRoot, not from the DVD. I put AppsRoot.exe in VistaWork\DVD\SOURCES\$OEM$\$$\SETUP\SCRIPTS and then i can run it from specialize pass like explained in first post. I didn't use UseConfigSet (I don't know what it is). By the way, I don't see where it's a problem to put that file on target drive ;)

The best way would be to launch AppsRoot.exe from DVD, so I will use GetCurrentDirectory() method to get CDROM drive letter. But I still didn't found a way to launch it from DVD, so i'm using an AppsRoot.txt file to recognize my cdrom.

Thank you for your answer. You can use/distrib AppsRoot.exe in your guide if you need.

Regards,

Kal

Edited by kal

Hello kal!

I put AppsRoot.exe in VistaWork\DVD\SOURCES\$OEM$\$$\SETUP\SCRIPTS and then i can run it from specialize pass like explained in first post.

Ah... I forgot about this simple way of doing it. Than you will not have any problem usualy.

I didn't use UseConfigSet (I don't know what it is). By the way, I don't see where it's a problem to put that file on target drive newwink.

Well there is no problem, if you copy a file to the target system generaly, but if you use UseConfigSet tag in Autounattend.xml, than you will have the problem described here.

If you do it in an other way, than you'll have no problems - or better, you should not have. :sneaky:

You can use/distrib AppsRoot.exe in your guide if you need.

Thanks, I'll add that as a workaround, if the "simple" method should not work.

Regards,

Martin

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.