Solved

Wrong script

Posted on 2007-03-20
23
410 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
Comment Utility
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
Comment Utility
the variable is more like this

c:\documents and settings\%Username%\

What are you trying to do here?
0
 

Author Comment

by:lcipollone
Comment Utility
Trying to place a shortcut on every workstation
0
 
LVL 48

Expert Comment

by:Jay_Jay70
Comment Utility
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
Comment Utility
oh i see, do you have roaming profiles in use?
0
 

Author Comment

by:lcipollone
Comment Utility
yes
0
 
LVL 48

Expert Comment

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

Expert Comment

by:Jay_Jay70
Comment Utility
grrrr ignore that had a blank   two secs...
0
 
LVL 48

Expert Comment

by:Jay_Jay70
Comment Utility
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
Comment Utility
i don't know why but none of these examples work. Any other ideas?
0
Want to promote your upcoming event?

Are you going to an event? Are you going to be exhibiting at a tradeshow? Talking at a conference? Using a promotional banner in your email signature ensures that your organization’s most important contacts stay in the know and can potentially spread the word about the event.

 
LVL 95

Assisted Solution

by:Lee W, MVP
Lee W, MVP earned 62 total points
Comment Utility
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
Comment Utility
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
Comment Utility
roommaster is shared isnt it?
0
 

Author Comment

by:lcipollone
Comment Utility
yes
0
 
LVL 95

Expert Comment

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

Author Comment

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

Expert Comment

by:Jay_Jay70
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Finally that worked. The only problem is that its copying the exe and not placing the shortcut onto the desktop.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

8 Experts available now in Live!

Get 1:1 Help Now