Jump to content

Shared Start Menu based on what's installed!


Recommended Posts

Posted
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

Posted
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.

Posted

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.

Posted (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 by burgemaster
Posted
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

Posted
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 :<)

Posted
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? :p

 

Steve

Posted (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? :p Try moving the strComputer = . above the line of the problem, else it's not set to be anythign yet)

 

Steve

Edited by Steve21
Posted
Which script? Main one should be commented on line 7 unless you altered it? :p

 

Steve

 

Ignore me it was line 5 :) sorry :)

Posted
Ignore me it was line 5 :) sorry :)

 

Same question though :D

 

Is it script 1, or the big one? Seeing big one has 1-11 lines commented out :p. (Or can you post your first 5 lines or w/e)

 

Steve

Posted
Same question though :D

 

Is it script 1, or the big one? Seeing big one has 1-11 lines commented out :p. (Or can you post your first 5 lines or w/e)

 

Steve

 

Sorry, its the startup script :)

Posted
Sorry, its the startup script :)

 

Explains that :p What is the error with 2nd char? Does it say anything? Can't really run script to see error :p

 

Thanks

Posted
Explains that :p What is the error with 2nd char? Does it say anything? Can't really run script to see error :p

 

Thanks

 

Please find the attached

Capture1.PNG

Posted

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

Posted
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.

Posted (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 by Steve21
Posted
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.

Posted

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 :p (Think the above is right, don't have a share to test it from :()

 

Steve

Posted
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 :p (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

Posted

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 :p

 

If you're on 32bit computer (not program) it should be in system32 yes, 64bit "computer" it should be in syswow64 thingy.

 

Steve

Posted

Hi,

 

I have installed the Windows system tools and if i type robocopy in the cmd prompt it brings up robocopy.

 

Thanks

Posted

Then run this as a VBS file, and see if it works/errors :p (With your source and dest obviously :p)

 

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

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...