Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 632 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the environment variable for the All Users Desktop path that works across all versions of Windows?

#1
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.
Reply

#2
There's no environment variable holding desktop path, but with [this post][1] you can see how to get it in batch (answers are for current user desktop, you'll need to adapt them for all users desktop


[1]:

[To see links please register here]

Reply

#3
It is `%public%` in Windows 7...
Reply

#4
in vista, 7, 8

%userprofile%\\..\Default\Desktop

Reply

#5
%public% works for Windows 10 and Windows 2011 Server and up

%ALLUSERSPROFILE% is used in Windows XP

But, you can look to see what the available variables are by running "SET" from a command prompt
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through