Wrong script

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.
lcipolloneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AnthonyP9618Commented:
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
Jay_Jay70Commented:
the variable is more like this

c:\documents and settings\%Username%\

What are you trying to do here?
0
lcipolloneAuthor Commented:
Trying to place a shortcut on every workstation
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Jay_Jay70Commented:
copy \\servername\roommaster\file.exe c$\documents and settings\%Userprofile%\Desktop

that would copy to the currently logged on user
0
Jay_Jay70Commented:
oh i see, do you have roaming profiles in use?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lcipolloneAuthor Commented:
yes
0
Jay_Jay70Commented:
copy \\server\roomaster\filename \\Server\Sharename\%Username%\Desktop
0
Jay_Jay70Commented:
grrrr ignore that had a blank   two secs...
0
Jay_Jay70Commented:
i dont know how to make that loop but if you add it to a logon script it will work
0
lcipolloneAuthor Commented:
i don't know why but none of these examples work. Any other ideas?
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
QUOTES!

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

(It's also %userprofile% - NOT %userprofiles% as your original posting had it.
0
lcipolloneAuthor Commented:
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
Jay_Jay70Commented:
roommaster is shared isnt it?
0
lcipolloneAuthor Commented:
yes
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
Can you post the EXACT error when you execute the command I posted?
0
lcipolloneAuthor Commented:
i do not get any errors. the shortcut just does not show up on the desktops
0
Jay_Jay70Commented:
this is relating to your other Q where roaming profiles isnt working - check the actual direcoty for the file
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
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
lcipolloneAuthor Commented:
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
Lee W, MVPTechnology and Business Process AdvisorCommented:
There's no space between the quotes -
copy "\\server\roomMaster\rw5main.exe""%userprofile%\desktop"

Should be

copy "\\server\roomMaster\rw5main.exe" "%userprofile%\desktop"
0
lcipolloneAuthor Commented:
Finally that worked. The only problem is that its copying the exe and not placing the shortcut onto the desktop.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.