Page 1 of 1
How to find system drive on windows?
Posted: Wed Aug 12, 2020 12:39 pm
by amyren
On Amiga systems we can use sys: to adress the system drive.
But how to find the system drive on a window system, in the odd cases this is not c: ?
The same question also applies for locations like Desktop, Appdata, Documents etc for current user
Re: How to find system drive on windows?
Posted: Wed Aug 12, 2020 2:58 pm
by airsoftsoftwair
Take a look at
GetSystemInfo().
Re: How to find system drive on windows?
Posted: Wed Aug 12, 2020 6:19 pm
by plouf
best option is Andreas suggestion
just want to add that under windows there is also %windir% which point always to system path
cd %windir% -> C:\Windows (or whatever)
Re: How to find system drive on windows?
Posted: Thu Aug 13, 2020 12:40 pm
by amyren
Thanks.
GetSystemInfo() does not seem to have option to get the Desktop path (user or common), nor the system drive.¨
But in my case I think CommonAppData and MyDocuments will do what I want this time.
%windir% is already covered by the
GetSystemInfo() command
%systemdrive% is also used in windows, but I am not sure if and how these shortcuts can be used from Hollywood.
Re: How to find system drive on windows?
Posted: Thu Aug 13, 2020 9:21 pm
by airsoftsoftwair
amyren wrote: ↑Thu Aug 13, 2020 12:40 pm
Thanks.
GetSystemInfo() does not seem to have option to get the Desktop path (user or common), nor the system drive.¨
But in my case I think CommonAppData and MyDocuments will do what I want this time.
%windir% is already covered by the
GetSystemInfo() command
%systemdrive% is also used in windows, but I am not sure if and how these shortcuts can be used from Hollywood.
Sure, you can. There's a
GetEnv() command for that, e.g.
Prints "C" here.