Solved

Wrong script

Posted on 2007-03-20
23
411 Views
Last Modified: 2008-01-09
What's wrong with the following script?
copy \\server\roommaster\rsw5main.exe %userprofiles%\desktop
{where server = server name, roommaster = apps folder, rsw5main.exe = exe file}
I don't know %userprofile% should be written as is or differently.
0
Comment
Question by:lcipollone
  • 8
  • 8
  • 4
  • +1
23 Comments
 
LVL 11

Expert Comment

by:AnthonyP9618
ID: 18761503
Is this something that should be on every users desktop?

copy \\server\roommaster\rsw5main.exe C:\cpuname\c$\Documents and Settings\All Users\desktop

where CPUNAME is the name of the computer you're targeting...
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 18761545
the variable is more like this

c:\documents and settings\%Username%\

What are you trying to do here?
0
 

Author Comment

by:lcipollone
ID: 18761565
Trying to place a shortcut on every workstation
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 18761567
copy \\servername\roommaster\file.exe c$\documents and settings\%Userprofile%\Desktop

that would copy to the currently logged on user
0
 
LVL 48

Accepted Solution

by:
Jay_Jay70 earned 63 total points
ID: 18761573
oh i see, do you have roaming profiles in use?
0
 

Author Comment

by:lcipollone
ID: 18761585
yes
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 18761593
copy \\server\roomaster\filename \\Server\Sharename\%Username%\Desktop
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 18761594
grrrr ignore that had a blank   two secs...
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 18761610
i dont know how to make that loop but if you add it to a logon script it will work
0
 

Author Comment

by:lcipollone
ID: 18761653
i don't know why but none of these examples work. Any other ideas?
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 95

Assisted Solution

by:Lee W, MVP
Lee W, MVP earned 62 total points
ID: 18761706
QUOTES!

copy "\\server\roommaster\rsw5main.exe" "%userprofile%\desktop"

(It's also %userprofile% - NOT %userprofiles% as your original posting had it.
0
 

Author Comment

by:lcipollone
ID: 18761800
None of these are working. Frustrating>>>> Maybe i'm doing something wrong..
Please take note of the following:
RoomMaster folder is located:    C:\Program Files\roomMaster\rw5main.exe
User proflies folder is located:    D:\profiles (this is a all shared folder)
Does anything here make a difference?
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 18761825
roommaster is shared isnt it?
0
 

Author Comment

by:lcipollone
ID: 18761843
yes
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18761850
Can you post the EXACT error when you execute the command I posted?
0
 

Author Comment

by:lcipollone
ID: 18761858
i do not get any errors. the shortcut just does not show up on the desktops
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 18761885
this is relating to your other Q where roaming profiles isnt working - check the actual direcoty for the file
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18761899
You're not copying a shortcut - you're copying a program.

How are you running the script/command?  Just double-clicking an icon?  What?  Open a command window (cmd.exe) and run it from there manually.  it will return an error message.  
0
 

Author Comment

by:lcipollone
ID: 18762020
I'm totally lost. I'm not good at scripts.
This is the script i have on my server.
RoomMaster folder is located:    C:\Program Files\roomMaster\rw5main.exe
User proflies folder is located:    D:\profiles (shared folder)

@echo off
IF %COMPUTERNAME%.==SERVER.GOTO end
NET USE R: /DELETE
NET USE S: /DELETE
NET USE T: /DELETE
NET USE R: \\SERVER\roomMaster /YES
NET USE S: \\SERVER\SharedDocs /YES
NET USE T: \\SERVER\rmBackup /YES
copy "\\server\roomMaster\rw5main.exe""%userprofile%\desktop"
NET TIME \\SERVER /SET /YES
:end

Do you see anything wrong with it?
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18762087
There's no space between the quotes -
copy "\\server\roomMaster\rw5main.exe""%userprofile%\desktop"

Should be

copy "\\server\roomMaster\rw5main.exe" "%userprofile%\desktop"
0
 

Author Comment

by:lcipollone
ID: 18764932
Finally that worked. The only problem is that its copying the exe and not placing the shortcut onto the desktop.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The question has been asked on multiple occasions as to how best to do printing in a remote desktop or terminal services environment.   It seems that this particular question has plagued several people and most especially as Terminal Services, as…
Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found here: http://www.experts-exchang…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now