Jump to content

Recommended Posts

Posted

Hi.

Depending on the OS and OS-language this folder can be at different locations. (mostly XP and Win7)

The purpose is to replace an existing "My-TS-Session.RDP" file of 100+ PCs in branch offices, that are *NOT* AD integrated.

Full administrator access is available to all boxes, of course.

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Posted

First shot: You could use psexec and query for the environment variable %ALLUSERSPROFILE%

From there you could find the desktop directory.

Do all of these PCs have access to a central file share?

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Posted

Hi Hannes,

Thanks for your reply.

I was thinking of psexec.exe as well, as no other answer shows up, it might be the least ugly approach.

Or maybe you can think of a "second shot" ;) ??

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Posted (edited)

$s_RemoteCommonDesktopDir=RegRead("<remotepc>HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerShell Folders", "Common Desktop")

This applies to Windows XP

:)

Edited by hannes08
Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Posted

or just create the 2-condition 'IF' statement that you know you need and call it a day ;)

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Posted (edited)

If @OSVersion = "WIN_XP" Then
  [do stuff for Windows XP]
ElseIf @OSVersion = "WIN_7" Then
  [do stuff for Windows 7]
EndIf

Edited by Mechaflash
Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Posted

Ah, thanks,

and beside this, the language has to be taken care of, as well (XP: "C:documents and settings" vs. "C:Dokumente und Einstellungen")

regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...