angrycomputingteacher Posted July 13, 2016 Posted July 13, 2016 Hello, I am tyring to add some stuff to our Batch script that runs on all logons. I need to have a shared desktop to a location //server/shared-area/shared desktop/. If this is not possible maybe I would need to have the bactch file copy over what I need to the desktop and remove what is already there.
pantscat Posted July 13, 2016 Posted July 13, 2016 I understand that you're just running standalone, is that right? If that's the case - you might want to use a .reg file to change the path in "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Desktop" - that should do the trick. Although, it'd be more elegant to get a server and do it via group policy! It might even be cheaper than you think... especially in terms of man(person?)-hours saved.
sted Posted July 13, 2016 Posted July 13, 2016 I understand that you're just running standalone, is that right? If that's the case - you might want to use a .reg file to change the path in "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Desktop" - that should do the trick. Although, it'd be more elegant to get a server and do it via group policy! It might even be cheaper than you think... especially in terms of man(person?)-hours saved. or use local gpo iirc most things can be done and iirc exported that way rather than direct reg editing
pantscat Posted July 13, 2016 Posted July 13, 2016 or use local gpo iirc most things can be done and iirc exported that way rather than direct reg editing Interesting - I didn't realise that you could do folder redirection with a local GPO... But, having said that, it's not something I've ever needed to do!
angrycomputingteacher Posted July 14, 2016 Author Posted July 14, 2016 I understand that you're just running standalone, is that right? If that's the case - you might want to use a .reg file to change the path in "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Desktop" - that should do the trick. Although, it'd be more elegant to get a server and do it via group policy! It might even be cheaper than you think... especially in terms of man(person?)-hours saved. I'll try the registry edit later. Also, I'm thinking instead of it being on the desktop, I'm just thinking of mapping it as a network drive but I'll try other things first.
Walkabouttigger Posted July 15, 2016 Posted July 15, 2016 Just to ensure I understand what you are attempting to accomplish, I will re-iterate your question based on other information in this thread. You have a number of stand alone workstations connected to a network but not managed by nor connected an Active Directory domain. You have a network location which contains a number of icons, files, programs, et. al. You want to distribute the collection from the network location to the %UserProfile%\Desktop folder on the stand alone workstations. Is this correct? Awaiting an answer so I can assist in providing you with a solution.
angrycomputingteacher Posted July 15, 2016 Author Posted July 15, 2016 Just to ensure I understand what you are attempting to accomplish, I will re-iterate your question based on other information in this thread. You have a number of stand alone workstations connected to a network but not managed by nor connected an Active Directory domain. You have a network location which contains a number of icons, files, programs, et. al. You want to distribute the collection from the network location to the %UserProfile%\Desktop folder on the stand alone workstations. Is this correct? Awaiting an answer so I can assist in providing you with a solution. Yes, that is perfectly correct
Guest obsidianpillar Posted July 17, 2016 Posted July 17, 2016 In a nutshell, do as above. I personally go through the registry editor but that being said I have never used local group policy editor unless preparing Exam Laptops. We used the registry editor in one of my environments for the Desktop folder redirection (using an old XP machine) and it has worked fine with no problems. However you are asked to authenticate on logon against the server hosting the share if you are logging on as a local user. It may be worth creating a service account for the share which the password can be remembered on the client workstations. We then created a batch file on logon to call the .reg file we exported and thus the Desktop was redirected properly. I'm typing this off my phone so please excuse breverity. If you want a more detailed explanation or help, feel free to send me a PM. Hope this helps, Tom
angrycomputingteacher Posted July 18, 2016 Author Posted July 18, 2016 In a nutshell, do as above. I personally go through the registry editor but that being said I have never used local group policy editor unless preparing Exam Laptops. We used the registry editor in one of my environments for the Desktop folder redirection (using an old XP machine) and it has worked fine with no problems. However you are asked to authenticate on logon against the server hosting the share if you are logging on as a local user. It may be worth creating a service account for the share which the password can be remembered on the client workstations. We then created a batch file on logon to call the .reg file we exported and thus the Desktop was redirected properly. I'm typing this off my phone so please excuse breverity. If you want a more detailed explanation or help, feel free to send me a PM. Hope this helps, Tom I'll PM you now!
Walkabouttigger Posted July 18, 2016 Posted July 18, 2016 Rather than hide any solution paths in PMs, please keep the post public so others may benefit from the solution - that is the value of a site such as this. 1
elsiegee40 Posted July 18, 2016 Posted July 18, 2016 (edited) Rather than hide any solution paths in PMs, please keep the post public so others may benefit from the solution - that is the value of a site such as this. I agree. Please keep solutions public @TomMagee. We can move this thread to a forum that is not indexed by the search engines and is only visible to members if you have concerns. Just report the opening post of the thread and any mod can do it. Edited July 18, 2016 by elsiegee40
Guest obsidianpillar Posted July 18, 2016 Posted July 18, 2016 Hi, my apologies. I too realise the value of this forum and did not intend to hide any of the solutions from other members. It is through course of habit that I offer people to send me PM's. There is no need for this thread to be moved, my solution does not contain anything that could be used unlawfully to generate harm to a computer system. I'm currently on Holiday but will ensure that the solution is posted as a reply within the next 48 hours. Cellular signal is poor hence why I've only been able to get back online tonight. Again, apologies. Regards, Tom
angrycomputingteacher Posted July 19, 2016 Author Posted July 19, 2016 Oh OK. I'll bear that in mind for the future.
Guest obsidianpillar Posted July 21, 2016 Posted July 21, 2016 Hi, the registry edit you need to make is located in: HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > User Shell Folders. At this point you want to right-click on "User Shell Folders" and press Export, then save it to your place of choosing. This provides a backup if you ever need to revert any of the changes you've made. Once you've done that, click on the "Desktop" String (You should see an entry at starting point of "%USERPROFILE%\Desktop". You want to change it to the location of your choosing, e.g. "L:\Shared-Desktop". Then, to save you replicating this on all the other Client PC's, again Export the folder "User Shell Folders" to a shared location of your choosing. Open up Notepad and copy and paste the following: regedit.exe /S \\SERVER\Share\RegValueWeJustExported.reg Save the above as a Batch Script, and save it wherever you wish. Running the script will call the registry file and apply it. This is how we did it with using Windows 7 and Windows XP clients. It worked fabulously. Hope this helps.
angrycomputingteacher Posted July 21, 2016 Author Posted July 21, 2016 Does this apply to all users or just the ones that run the batch script?
Guest obsidianpillar Posted July 21, 2016 Posted July 21, 2016 It'd apply to all Users who run the script, however if they are local users running on a "Business" version of windows, you can set it as a login script by the following: Start > Run > gpedit.msc > User Configuration > Scripts (Logon/Logoff) > Logon > Navigate to your script All users logging onto that workstation will receive the script as a login script to apply this policy. Best way I can think of doing it. In our case everything was managed by Group Policy off a Domain Controller. In a standalone environment, this is the only logical way I can think of doing it. Unless anyone can think of something else that will work with less user intervention? Hope this helps. Tom
angrycomputingteacher Posted July 21, 2016 Author Posted July 21, 2016 I found a small problem with the script. When I tried it with another user it would not just come up. It waited until I logged off and then logged back in again. Does that mean users would not be able to use the desktop probably without them logging in again.
Guest obsidianpillar Posted July 21, 2016 Posted July 21, 2016 I found a small problem with the script. When I tried it with another user it would not just come up. It waited until I logged off and then logged back in again. Does that mean users would not be able to use the desktop probably without them logging in again. Shouldn't do? We ran it as a Login Script under Group Policy. Unless it's because yours is a standalone Workstation? Ours applied instantly, did you push F5 to refresh the Desktop?
sted Posted July 21, 2016 Posted July 21, 2016 I found a small problem with the script. When I tried it with another user it would not just come up. It waited until I logged off and then logged back in again. Does that mean users would not be able to use the desktop probably without them logging in again. you would probably need something like net use x: \\server\share /user:pcname\user pasword /persistent:no or the next user wont have permission to the share and it will fail
Guest obsidianpillar Posted July 21, 2016 Posted July 21, 2016 you would probably need something like net use x: \\server\share /user:pcname\user pasword /persistent:no or the next user wont have permission to the share and it will fail You've got it. I completely forgot that it's a standalone. Forgot the Server would need auth before connecting! Cheers for that! Tom
angrycomputingteacher Posted July 21, 2016 Author Posted July 21, 2016 Everyone has auth to the server. The batch is running on the server. And yes I did refresh the desktop but still no desktop until logged back in. If it helps the shared desktop folder is read only.
Guest obsidianpillar Posted July 21, 2016 Posted July 21, 2016 "The batch is running on the Server" - You are meant to be running it on the Client PC?
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