Logon script syntax problem

Hi,

my collegue (who's now left0 wrote a logon script for me but my IT manager wont implement it as it has a syntax error yet he wontr tekll me what's wrong with it- can someone decipher whats syntaxically wrong with the script, it basically copies mde's and ade's from a shared folder into the c:drive of the pc the user has started:

::Delete old PGSR shortcut
del "%userprofile%\desktop\PGS Applications.lnk"

::Copy the file we need from draugr
copy \\draugr\PGS_SS_APPS\PGSApps.lnk "%userprofile%\desktop\PGS Applications.lnk"

::Kill old C drive based PGSR files
rmdir C:\pgsr /s /q

::Create a directory
mkdir c:\"JS Utilities"

::Create desktop shortcut
Copy \\sqlserver\admin\js\pgjs.lnk "%userprofile%\desktop"

::Copy PGJS Grades Entry for Greg
Copy \\sqlserver\admin\JS\"PGJS Grades Entry.mdb" C:\"JS Utilities"\"PGJS Grades Entry.mde"

::Delete existing PGJS
del C:\"Documents and Settings"\"%username%"\Desktop\"PGJS Grades Entry.mde"

cheers

greg
 

 
DubsAsked:
Who is Participating?
 
aseusaincConnect With a Mentor Commented:
There are other lines like that as well...probably what bossman is complaining about.

mkdir c:\"JS Utilities"  

to

mkdir "c:\JS Utilities"

and

del C:\"Documents and Settings"\"%username%"\Desktop\"PGJS Grades Entry.mde"

to

del "C:\Documents and Settings\%username%\Desktop\PGJS Grades Entry.mde"

0
 
aseusaincCommented:
Try changing

Copy \\sqlserver\admin\JS\"PGJS Grades Entry.mdb" C:\"JS Utilities"\"PGJS Grades Entry.mde"

to

Copy "\\sqlserver\admin\JS\PGJS Grades Entry.mdb" "C:\JS Utilities\PGJS Grades Entry.mde"
0
 
DubsAuthor Commented:
is that all thats wrong?

greg
0
 
DubsAuthor Commented:
Nice one! makes sense...

cheers

greg
0
 
DubsAuthor Commented:
so this is now safe?

::Delete old PGSR shortcut
del "%userprofile%\desktop\PGS Applications.lnk"

::Copy the file we need from draugr
copy “\\draugr\PGS_SS_APPS\PGSApps.lnk” "%userprofile%\desktop\PGS Applications.lnk"

::Kill old C drive based PGSR files
rmdir C:\pgsr /s /q

::Create a directory
mkdir “c:\JS Utilities"

::Create desktop shortcut
Copy “\\sqlserver\admin\js\pgjs.lnk” "%userprofile%\desktop"

::Copy PGJS Grades Entry for Greg
Copy “\\sqlserver\admin\JS\PGJS Grades Entry.mdb"  “C:\JS Utilities\PGJS Grades Entry.mdb"

::Delete existing PGJS
del “C:\Documents and Settings\%username%\Desktop\PGJS Grades Entry.mdb"


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.