[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Logon script syntax problem

Posted on 2006-05-30
5
Medium Priority
?
303 Views
Last Modified: 2010-03-19
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
 

 
0
Comment
Question by:Dubs
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:aseusainc
ID: 16789013
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
 

Author Comment

by:Dubs
ID: 16789039
is that all thats wrong?

greg
0
 
LVL 7

Accepted Solution

by:
aseusainc earned 80 total points
ID: 16789077
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
 

Author Comment

by:Dubs
ID: 16789122
Nice one! makes sense...

cheers

greg
0
 

Author Comment

by:Dubs
ID: 16789153
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will be showing you how to subnet the easiest way possible for IPv4 (Internet Protocol version 4). This article does not cover IPv6. Keep in mind that subnetting requires lots of practice and time.
LinkedIn blogging is great for networking, building up an audience, and expanding your influence as well. However, if you want to achieve these results, you need to work really hard to make your post worth liking and sharing. Here are 4 tips that ca…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

865 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question