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
How to find system drive on windows?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How to find system drive on windows?
Take a look at GetSystemInfo().
Re: How to find system drive on windows?
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)
just want to add that under windows there is also %windir% which point always to system path
cd %windir% -> C:\Windows (or whatever)
Christos
Re: How to find system drive on windows?
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.
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.
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: How to find system drive on windows?
Sure, you can. There's a GetEnv() command for that, e.g.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.
Code: Select all
DebugPrint(GetEnv("systemdrive"))