Random Tech Question

Random Tech Question

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Random Tech Question

Post by Argh »

Sorry to bug everybody, but I can't remember how to do this...

How do you put a file onto a generic Windows user's desktop, from the command-line?

I've written a very simple script, and it has a section at the end where it's supposed to dump ipconfig/all into a text file, like so: ipconfig/all > C:\macadd.txt

After sending this out, I've found that users want this information on their Desktop (yes, people, there are lots of folks who find looking at the C:\ root confusing). I know there's a generic way to refer back to the Desktop for the user, but I can't remember what it is... something like %username%blahblah... anybody know what I'm supposed to put there?
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Post by lurker »

%userprofile%\Desktop
no idea if it works on 9x though
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Doesn't matter, all the users are 2K / XP... thanks very much, I knew it had to be something simple!
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

Not sure that'd work - you can customize your desktop folder to be outside of your user folder.

Sure there's not a %Desktop% or something?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Nope. You can try it youzrself, open cmd and type "set".
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

None of these people will have customized the location of the desktop, trust me :roll:
Post Reply

Return to “Off Topic Discussion”