rudi Posted September 28, 2012 Share Posted September 28, 2012 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! Link to comment Share on other sites More sharing options...
hannes08 Posted September 28, 2012 Share Posted September 28, 2012 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] Link to comment Share on other sites More sharing options...
rudi Posted October 1, 2012 Author Share Posted October 1, 2012 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! Link to comment Share on other sites More sharing options...
hannes08 Posted October 1, 2012 Share Posted October 1, 2012 (edited) $s_RemoteCommonDesktopDir=RegRead("<remotepc>HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerShell Folders", "Common Desktop") This applies to Windows XP Edited October 1, 2012 by hannes08 Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Mechaflash Posted October 1, 2012 Share Posted October 1, 2012 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.” Link to comment Share on other sites More sharing options...
rudi Posted October 2, 2012 Author Share Posted October 2, 2012 @Mechaflash: I don't get, what you mean, sorry, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Mechaflash Posted October 2, 2012 Share Posted October 2, 2012 (edited) If @OSVersion = "WIN_XP" Then [do stuff for Windows XP] ElseIf @OSVersion = "WIN_7" Then [do stuff for Windows 7] EndIf Edited October 2, 2012 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.” Link to comment Share on other sites More sharing options...
rudi Posted October 4, 2012 Author Share Posted October 4, 2012 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! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now