Solved

Wrong script

Posted on 2007-03-20
23
416 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: 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!

 
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
 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
Learn about cloud computing and its benefits for small business owners.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 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