dgriffit55
asked on
Need help writing a script...PLZZZZ
Hi,
I am hoping someone can assist me. I am wanting to write a script to create a shortcut for a program called ExamView Player and place it either on the desktop or in the start menu / programs.
I basically will be having a shortcut from the server the program will reside on. So, I figure it will be some sort of net use command or something like that.
I have never wrote a script before, but I am excited to try.
Thanks in advance.
Bob
I am hoping someone can assist me. I am wanting to write a script to create a shortcut for a program called ExamView Player and place it either on the desktop or in the start menu / programs.
I basically will be having a shortcut from the server the program will reside on. So, I figure it will be some sort of net use command or something like that.
I have never wrote a script before, but I am excited to try.
Thanks in advance.
Bob
ASKER
I have the program on the server and the folder shared.
Now I am just trying to figure out a way to add the shortcut to the student logins or something instead of adding the shortcuts manually which is very difficult to get access to the computers in the lab classroom during the quarter.
So, this script will work if I save it as a batch file?
Thanks.
Bob
Now I am just trying to figure out a way to add the shortcut to the student logins or something instead of adding the shortcuts manually which is very difficult to get access to the computers in the lab classroom during the quarter.
So, this script will work if I save it as a batch file?
Thanks.
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is cool stuff. Where do I store the .cmd file once it is created? I believe I go to the startup scripts section of the GPM to link to the file, but not sure where I should store the script file.
Thanks again.
Bob
Thanks again.
Bob
ASKER
I think I found out where to add the script to the logon script area by following the unique ID of the existing student policy. Then I opened the student policy and linked the script within the logon properties to add a script. However, it is asking for script parameters. Do I keep that blank?
I feel as if I am almost there.
Thanks again.
Bob
I feel as if I am almost there.
Thanks again.
Bob
Yes, this script doesn't need any parameters.
ASKER
Ok, I created the script as you have it & made the changes needed.
shortcut name = ExamView 5.2
netshare = \\ServerName\ExamView52
Saved it as ExamView52Shortcut.cmd
Then added it to the C:\WINDOWS\SYSVOL\sysvol\d omainname\ Policies\{ xxxxx-xxxx xxx-xxxx-x xxxx}\
User\Scripts\Logon
Then opened up Group Policy Management & edited Student Policy - Group Policy Object Editor - User Configuration - Windows Settings - Scripts - Logon
Does this sound correct?
Remember, my very first time dealing with scripts.
Thanks again.
Bob
shortcut name = ExamView 5.2
netshare = \\ServerName\ExamView52
Saved it as ExamView52Shortcut.cmd
Then added it to the C:\WINDOWS\SYSVOL\sysvol\d
User\Scripts\Logon
Then opened up Group Policy Management & edited Student Policy - Group Policy Object Editor - User Configuration - Windows Settings - Scripts - Logon
Does this sound correct?
Remember, my very first time dealing with scripts.
Thanks again.
Bob
ASKER
I am trying to do this from a Windows 2003 Server - Standard Edition to Windows XP Pro w/ SP2 clients.
Does the WSH already exist for Windows XP Pro systems?
Thanks again.
Bob
Does the WSH already exist for Windows XP Pro systems?
Thanks again.
Bob
ASKER
What does the /C /H /R /Y mean?
Bob
Bob
That should work.
Batch scripts will run just fine on XP.
See here for a reference on XCOPY switches:
http://www.ss64.com/nt/xcopy.html
Batch scripts will run just fine on XP.
See here for a reference on XCOPY switches:
http://www.ss64.com/nt/xcopy.html
ASKER
I am not sure where I need to proceed, but I know I am very close to getting this to work. I have tried the cmd file on my own system locally and it worked like a charm, now I need to figure out how to push it from the server to the client.
I believe I have the script in the correct place on the server & the Group Policy Management working correctly too, because when I logon to a client computer for the script to run on I get the following Error in the computers Event Viewer.
Type: Error
Source: UserInit
Event ID: 1000
"Could not execute the following script \\domainname\SysVol\domain name\scrip ts\ExamVie w52Shortcu t.cmd. Access is denied."
Any ideas how to correct this?
Thanks again for everything.
Bob
I believe I have the script in the correct place on the server & the Group Policy Management working correctly too, because when I logon to a client computer for the script to run on I get the following Error in the computers Event Viewer.
Type: Error
Source: UserInit
Event ID: 1000
"Could not execute the following script \\domainname\SysVol\domain
Any ideas how to correct this?
Thanks again for everything.
Bob
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great answer. Will refer to Shift-3 again for scripting questions.
Thanks again.
Thanks again.
If you actually want to create the shortcut with a script then you'll need to use a vbscript like the one in this article:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/jun07/hey0607.mspx
Open in new window