Operating system location (drive letter)
-
Hi, Is there a function that will tell me on wich drive the OS (Windows) is installed? I need this to perform a license check because not everyone has its OS installed on the C drive. And related to that: for the license check I use the volume information of the drive. In understand that it is different from the hardware ID of the drive, but how often do people reformat the drive where the OS is installed? I guess it is about as often as a drive would crash (well, maybe a little bit more), so that tells me the volume information check should be good enough for a license check. Am I doing something wrong in my reasoning, or did I forget something? I also understand that the volume id of a drive can be programmatically changed, but has this feature ever been used to override a license check? Any input is appreciated, thanks!
-
Hi, Is there a function that will tell me on wich drive the OS (Windows) is installed? I need this to perform a license check because not everyone has its OS installed on the C drive. And related to that: for the license check I use the volume information of the drive. In understand that it is different from the hardware ID of the drive, but how often do people reformat the drive where the OS is installed? I guess it is about as often as a drive would crash (well, maybe a little bit more), so that tells me the volume information check should be good enough for a license check. Am I doing something wrong in my reasoning, or did I forget something? I also understand that the volume id of a drive can be programmatically changed, but has this feature ever been used to override a license check? Any input is appreciated, thanks!
Environment variable
SystemRoot=C:\WINDOWS
If it's good enough for you, don't let anyone else tell you different. -
Hi, Is there a function that will tell me on wich drive the OS (Windows) is installed? I need this to perform a license check because not everyone has its OS installed on the C drive. And related to that: for the license check I use the volume information of the drive. In understand that it is different from the hardware ID of the drive, but how often do people reformat the drive where the OS is installed? I guess it is about as often as a drive would crash (well, maybe a little bit more), so that tells me the volume information check should be good enough for a license check. Am I doing something wrong in my reasoning, or did I forget something? I also understand that the volume id of a drive can be programmatically changed, but has this feature ever been used to override a license check? Any input is appreciated, thanks!
FloatingMarc wrote:
Is there a function that will tell me on wich drive the OS (Windows) is installed?
Check out
GetWindowsDirectory()
orSHGetFolderPath(CSIDL_WINDOWS)
."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
-
FloatingMarc wrote:
Is there a function that will tell me on wich drive the OS (Windows) is installed?
Check out
GetWindowsDirectory()
orSHGetFolderPath(CSIDL_WINDOWS)
."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
Thanks for the information to both of you!