Solved

Wrong script

Posted on 2007-03-20
23
414 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
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 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

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.

Question has a verified solution.

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

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
On a regular basis I get questions about slow RDP performance, RDP connection problems, strange errors and even BSOD, remote computers freezing or restarting after initiation of a remote session. In a lot of this cases the quick solutions made b…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 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