Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the environment variable for the All Users Desktop path that works across all versions of Windows?

I'm trying to write a batch file that can copy a file from my computer to all computers in a list. It needs to be copied to the AllUsers Desktop (I'll use a domain admin account to run the batch file).

On my Win7 system, the %ALLUSERSPROFILE% returns C:\ProgramData. Is there a variable that returns the AllUsers Desktop path across every version of Windows? I have a mix of XP, Vista, and Win7.

like image 421
Chaddeus Avatar asked May 18 '11 00:05

Chaddeus


People also ask

What is Windows PATH environment variable?

The PATH environment variable is an important security control. It specifies the directories to be searched to find a command. The default systemwide PATH value is specified in the /etc/profile file, and each user normally has a PATH value in the user's $HOME/.

How do I set an environment variable for all users in Windows?

Windows 10 and Windows 8Search and select System (Control Panel). Click on the Advanced system settings link and then click Environment Variables. Under the section System Variables, select the environment variable you want to edit, and click Edit. If the environment variable you want doesn't exist, click New.

What is the default environment variable for path in Windows 10?

A typical path is C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. The file-system directory that serves as a common repository for document templates. A typical path is C:\Users\username\AppData\Roaming\Microsoft\Windows\Templates. Same as the standard environment variable.

What is the default path environment variable?

The default directory path for most versions of Windows is c:\Windows (for Windows NT 4 and 2000, it is c:\WinNT).


1 Answers

It is %public% in Windows 7...

like image 60
Kyle P Avatar answered Oct 07 '22 00:10

Kyle P