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.

Two Simple Problems

Featured Replies

Dear MSFNers...

I'm deeply troubled :( by two problems for my ignorance of writting advanced Batch files. Here're these:

1>>I have thought out a small scheme of installation where i want to do the following set of actions:

A. An executable (say, program.exe) if run from a batch file will generate a report file (named, report.txt) that may have informations like "GenuineIntel", "VIA/S3G Unichrome IGP" etc.

B. I'll have a template information file named Template.txt inside some directory in my CD which obviously have the "GenuineIntel", "VIA/S3G Unichrome IGP" etc. type informations pre-written.

C. Now, "GenuineIntel" string is to be matched between report.txt and template.txt. If the string is found then a "certain.exe" file will be launched from the cd. If the string is not found in report.txt then some "other.exe" file will be executed from the CD.

Now, i am completely new to writting batch files and really can't sort out the method. Can anybody help me by writting some batch routines for the sake of achieving these tasks?

2>>My next problem is in the area of finding "First Unutilized Drive Letter" in a system. My system has a HDD partitioned into 7 Partitions (C D E F G H I) and one CD-ROM (J:) and a CD-RW (K:). Now, somewhere inside the forum i found a batch file which can find "First Available Drive Letter". Problem is that it always finds my CD-ROM (J:) as the first available drive letter, just because there is no CD inside it. While my requirement is that the batch file should always find out "L:" as the next drive letter. Can this be achieved from a batch file? That's the reason for mentioning "First Unutilized Drive Letter" which if searched will find L: even if there's no CD inside either CD-ROM or CD-RW drive.

I hope i could make you understand my problems. Please provide some solutions if you noticed this post.

Thanks in advance...please help...

Edited by MOONLIGHT SONATA


Dear MSFNers...

I'm deeply troubled :(

Me too!
2>>My next problem is in the area of finding "First Unutilized Drive Letter" in a system. My system has a HDD partitioned into 7 Partitions (C D E F G H I) and one CD-ROM (J:) and a CD-RW (K:). Now, somewhere inside the forum i found a batch file which can find "First Available Drive Letter". Problem is that it always finds my CD-ROM (J:) as the first available drive letter, just because there is no CD inside it. While my requirement is that the batch file should always find out "L:" as the next drive letter. Can this be achieved from a batch file? That's the reason for mentioning "First Unutilized Drive Letter" which if searched will find L: even if there's no CD inside either CD-ROM or CD-RW drive.
Here is an example which should work in XP
@echo off&Mode 33,2&Color b2&Title Script By YzOwl
for %%? in (z y x w v u t s r q p o n m l k j i h g f e d c) do (
fsutil fsinfo drivetype %%?:|find "No such Root Directory">nul 2>&1&&set nextfree=%%?:
)
echo/The next free drive letter is %nextfree%&ping -n 11 127.0.0.1>nul&goto :eof

  • Author

@ Dear YzOwl,

you know when i posted my problems i had only you in my mind. Please read "Dear MSNers" as "Dear YzOwl". i knew it can't and shouldn't bypass you. thanks, your posted code works, failure rate of your codes are always at almost( with some modesty) zero level. BTW, what about the first one, sir? please help as i've seen you always rescued everybody in their batch troubles.

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.