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.

if-statement for redirection

Featured Replies

hey peepz,

it is possible to make an if-statement in a batch file to check if their is an D-partition to redirect My Docmunts to it?

like this:

if exist d:/

then

input regfile for redirection

NOTE: i have to partition the disk manual in XP setup, but it has only a drive letter then, no filesystem or label yet

so is it possible to check for the existance of D: and input the regfile in the registery to the desired path?

so yes, how does the if statement look like, since i'm a noob with this kind of things :blushing:

thanks in advance

Edited by scaniafreak

No you cannot BUT what you can do is create a batch file or VBS script to accomplish this and call it from commandlines.txt. Hope this helps.

  • Author

ok thats clear. :P . but wat has to be in that batch file. and with VBS i'm really a noob, so that's not an option, or somebody has to make a script :blushing:

Edited by scaniafreak

Well, by your example, you would have to first format the partition. You should consider booting to a BartPE disk and running DISKPART (or scripting it). DISKPART can create all of your partitions and assign drive letters (even though these drive letters won't always be the same). You can also format these partitions in Bart PE. After that, you can pretty much run a regedit /s mydocs.reg (or whatever your reg file name is) from commandlines.txt

You could also format the 2nd partition (after creating the drive letter in DISKPART) via the commandlines.txt.

Edited by redfive19

  • Author

so the syntax of the driveformatting should look like this:

echo off

format d: /autotest /FS:NTFS /V:Data

exit

my question is how to check for the existance of D:. should it look like this?:

if exist D: regedit /s mydocs.reg

format d: /FS:NTFS /v:Data /q /y

You can guarantee the existence of D: if you use DISKPART prior to installing XP. I believe physical drives/partitions take letter precedence over DVD-ROM drives etc.

Are you saying that D: will not always exist on every box you roll this out on? If that's the case, you can copy over a small dummy file (say source.txt) to the root of D: and have a batch file do a search in the root directories of all drives for existence of this dummy file. There's an example in the unattended guide for how to set the variable for the CD-ROM with this method.

http://unattended.msfn.org/unattended.xp/view/web/59/

Edited by redfive19

  • Author

ok. thanks for the help. i'm going to check out DISKPART

Edited by scaniafreak

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.