FN-GM Posted May 19, 2011 Posted May 19, 2011 I expect you have, but have you copied the robocopy.exe into the same location as the Startup script? I also tried that still didn't work. Interestingly when i did that and run the script on Windows 7 it stopped working on there. Thanks
ChrisH Posted May 19, 2011 Posted May 19, 2011 I also tried that still didn't work. Interestingly when i did that and run the script on Windows 7 it stopped working on there. Thanks Alter the script to use a full path to robocopy or put it in a "known location" such as c:\windows\system32.
Hightower Posted May 19, 2011 Posted May 19, 2011 Don't know if people are still looking for ideas but one our new network we're using Group Policy Preferences. I've created a GPO called SHORTCUTS All Users and another called SHORTCUTS Staff, then in the preferences part of the GPO I add all the shortcuts. For stuff like SIMS.net it obviously goes in the staff GPO. On logon, the shortcuts are created if the link is valid (i.e. the software is installed). If the software is installed and then removed, so is the shortcut. It works really well from my testing.
burgemaster Posted May 19, 2011 Posted May 19, 2011 (edited) When I run the user script i get: Line 129, Char 12, Expected "then" ? Is there anything to edit in the user scipt? The startup script runs fine. are you missing a ' from the start of this line? If the Icon File contains multiple files (e.g. an array of icons) perform the action to remove this reference Edited May 19, 2011 by burgemaster
FN-GM Posted May 19, 2011 Posted May 19, 2011 Alter the script to use a full path to robocopy or put it in a "known location" such as c:\windows\system32. Just tried this and it doesnt make a different i am afraid. Thanks
Steve21 Posted May 19, 2011 Posted May 19, 2011 When I run the user script i get: Line 129, Char 12, Expected "then" ? Is there anything to edit in the user scipt? The startup script runs fine. are you missing a ' from the start of this line? If the Icon File contains multiple files (e.g. an array of icons) perform the action to remove this reference I'd say no. Seems the comment is missing the ' at start If the Icon File contains multiple files (e.g. an array of icons) perform the action to remove this reference should be 'If the Icon File contains multiple files (e.g. an array of icons) perform the action to remove this reference Steve (Seems I was slow to notice your edit :<)
FN-GM Posted May 19, 2011 Posted May 19, 2011 I am getting an error saying there is a problem on line 7 character 2. could this be something else please?
Steve21 Posted May 19, 2011 Posted May 19, 2011 I am getting an error saying there is a problem on line 7 character 2. could this be something else please? Which script? Main one should be commented on line 7 unless you altered it? Steve
Steve21 Posted May 19, 2011 Posted May 19, 2011 (edited) Now: Line 31 Char 1 0x80041021 (null) Can you try changing it to: Set objWMIService = GetObject("winmgmts:impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") And see if it fixes it (or I'm being stupid, and it's just you haven't actually intialised strComputer with a value yet? Try moving the strComputer = . above the line of the problem, else it's not set to be anythign yet) Steve Edited May 19, 2011 by Steve21
FN-GM Posted May 19, 2011 Posted May 19, 2011 Which script? Main one should be commented on line 7 unless you altered it? Steve Ignore me it was line 5 sorry
Steve21 Posted May 19, 2011 Posted May 19, 2011 Ignore me it was line 5 sorry Same question though Is it script 1, or the big one? Seeing big one has 1-11 lines commented out . (Or can you post your first 5 lines or w/e) Steve
FN-GM Posted May 19, 2011 Posted May 19, 2011 Same question though Is it script 1, or the big one? Seeing big one has 1-11 lines commented out . (Or can you post your first 5 lines or w/e) Steve Sorry, its the startup script
Steve21 Posted May 19, 2011 Posted May 19, 2011 Sorry, its the startup script Explains that What is the error with 2nd char? Does it say anything? Can't really run script to see error Thanks
FN-GM Posted May 19, 2011 Posted May 19, 2011 Explains that What is the error with 2nd char? Does it say anything? Can't really run script to see error Thanks Please find the attached
Steve21 Posted May 19, 2011 Posted May 19, 2011 Seems more like you got robocopy missing. Does it work if you just type robocopy in cmd line? If so can probably re-word that line. Steve
FN-GM Posted May 19, 2011 Posted May 19, 2011 Seems more like you got robocopy missing. Does it work if you just type robocopy in cmd line? If so can probably re-word that line. Steve If you read some previous posts i have been trouble shooting this. putting robocopy on doesnt work it doesnt error out but it doesnt copy the files either.
Steve21 Posted May 19, 2011 Posted May 19, 2011 (edited) If you read some previous posts i have been trouble shooting this. putting robocopy on doesnt work it doesnt error out but it doesnt copy the files either. I read them, but I mean does cmd even pick up that it's installed. If you try to just type robocopy into it? In cmd can you type "set path" and paste what it returns? Are you missing system32 from it? (If you installed robo there) (Also important one, you on 64bit by any chance?) Steve Edited May 19, 2011 by Steve21
FN-GM Posted May 19, 2011 Posted May 19, 2011 I read them, but I mean does cmd even pick up that it's installed. If you try to just type robocopy into it? In cmd can you type "set path" and paste what it returns? Are you missing system32 from it? (If you installed robo there) (Also important one, you on 64bit by any chance?) Steve Will check in a second, its x86. I specified the full path in the script to robocopy.exe and it didn't make a difference.
Steve21 Posted May 19, 2011 Posted May 19, 2011 Can you try this: Dim strSource, strDest strSource = "\\KNG-NAS-001\Shared Resources$\Start Menu" strDest = "C:\Configuration\Start Menu" Set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run "robocopy " & Chr(34) & strSource & Chr(34) & " " & Chr(34) & strDest & Chr(34) & " /E /MIR /COPY:DATS /SECFIX /Z /W:20 /R:1" Had a stupid idea (Think the above is right, don't have a share to test it from ) Steve
FN-GM Posted May 19, 2011 Posted May 19, 2011 Will give it a shot when i get back in the office. Robocopy is causing this problem - http://www.edugeek.net/forums/how-do-you-do/74978-how-do-you-do-your-start-menus-3.html#post676851 Any ideas how to fix that please? Thanks
FN-GM Posted May 19, 2011 Posted May 19, 2011 Can you try this: Dim strSource, strDest strSource = "\\KNG-NAS-001\Shared Resources$\Start Menu" strDest = "C:\Configuration\Start Menu" Set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run "robocopy " & Chr(34) & strSource & Chr(34) & " " & Chr(34) & strDest & Chr(34) & " /E /MIR /COPY:DATS /SECFIX /Z /W:20 /R:1" Had a stupid idea (Think the above is right, don't have a share to test it from ) Steve How shall i set robocopy up? make sure its in system32? Thanjs
Steve21 Posted May 19, 2011 Posted May 19, 2011 Does it do anything if you just type robocopy in cmd? Trying to work out if it's "working" and just not the script. Or if robocopys totally dead too If you're on 32bit computer (not program) it should be in system32 yes, 64bit "computer" it should be in syswow64 thingy. Steve
FN-GM Posted May 19, 2011 Posted May 19, 2011 Hi, I have installed the Windows system tools and if i type robocopy in the cmd prompt it brings up robocopy. Thanks
Steve21 Posted May 19, 2011 Posted May 19, 2011 Then run this as a VBS file, and see if it works/errors (With your source and dest obviously ) Dim strSource, strDest strSource = "\\KNG-NAS-001\Shared Resources$\Start Menu" strDest = "C:\Configuration\Start Menu" Set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run "robocopy " & Chr(34) & strSource & Chr(34) & " " & Chr(34) & strDest & Chr(34) & " /E /MIR /COPY:DATS /SECFIX /Z /W:20 /R:1" Just trying to see if it's a silly error with the way it's reading the filenames. Steve
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