Jump to content











Photo
- - - - -

Setting an environment variable to indicate Host system drive

%hostdrive% environment

  • Please log in to reply
1 reply to this topic

#1 Voltaire

Voltaire

    Member

  • Members
  • 36 posts
  • Location:Lawrenceville,GA
  • Interests:Programming in assembler,Computers,Computers,Computers.
    SciFi,Single Malt Scotch
  •  
    United States

Posted 12 April 2013 - 11:58 PM

While writing some scripts it has occurred to me several times now,that it would be handy to know what drive a host system (the one under repair) is mounted on.  I could make a cmd script to do this that would then place the result in an environment variable like HostDrive or Host System,etc.  I could also write a quick proggie to do this in assembler.

 

So I have several questions:

1) Would this be useful to anyone else?

2)  What would be the preferred name of the variable?

3)  Is there a way to determine this already, and I would be waisting my time?

4)  Should this process be done in the Windows reg during startup, or is there a better place.  I would think the sooner during boot, the better.

 



#2 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 13 April 2013 - 12:46 AM

Don't quite understand, what you wanna do.

Every repair program already has an option to choose on what partition / HDD to work.

If you're talking about something like an autodetect. How do you wanna autodetect a broken OS on a multiboot system?

If you're talking striktly single OS systems, then the HostSystem will already always be partition C:.

:cheers:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users