Using %appdata% in a batch file with remote computers

Hello, I'm trying to copy a file from our server to other computers over the network (it's a customized Outlook Toolbar). If I type the paths in manually as $C\users\<user.name>\appdata\roaming\microsoft\outlook it copies over fine. What I would like
to know, is how to make it so I only need to re-enter the hostname instead of typing everyone's user accounts, if possible.
The current command is nothing fancy;
xCOPY "\\<NetworkLocation>\outcmd.dat" "\\<hostname>\%appdata%\Microsoft\Outlook\" /Y
but when I try to run this from my computer, it uses MY %appdata% instead of using the hostname's appdata. In other words instead of it copying to say, "10.0.0.100\DesiredUser\Appdata\etc." it goes to "10.0.0.100\MY
USER NAME THAT DOESN'T EXIST\appdata\etc." and gets "invalid drive specified".
So in short, is there anything I can add above the command to make the %appdata% look to the hostname that is typed right before it? I'm obviously doing this wrong but tried A LOT of research and couldn't find anything to help.
Thanks in advance!!

Hi,
About this command, the %appdata% is referred to current user account, that's why it will find your account on client computer.
As an alternative, I suggest you use GPO to deploy file for each user to implement this:
Group Policy allows you to deploy files and create folders on computers you are managing without having to visit those PCs manually. You can do this either in Computer Configuration or User Configuration, but we are going to be using User Configuration.
To begin, open Group Policy Editor on your server, and navigate to User Configuration\Preferences\Files, right click on Files and choose New\File.
Import the file and the location where you want to put this file in New file properties window, and deploy out.
Kate Li
TechNet Community Support

Similar Messages

  • HTMLLoader - local HTML file with remote access

    Hi,
    I use the HTMLLoader to load a local HTML file. (AIR
    development with Flash)
    In this local HTML file is a remote JavaScript, which I need.
    It doesn't work, because of the sandbox.
    But is it possible to deactivate the sandbox or anything
    else, that I can use the local HTML file with remote access?

    Hi,
    I use the HTMLLoader to load a local HTML file. (AIR
    development with Flash)
    In this local HTML file is a remote JavaScript, which I need.
    It doesn't work, because of the sandbox.
    But is it possible to deactivate the sandbox or anything
    else, that I can use the local HTML file with remote access?

  • Using JSP to run batch file - command launches excel but doesn't open file

    I have written a jsp on a server which runs a batch file. Every command line in the batch works fine except the following:
    CALL "C:\Program Files\Microsoft Office\Office\Excel.exe" C:\Temp\spreadsheet.xls
    I can see that a command prompt has been opened and an instance of Excel has been created, but it does not open the file.
    I tried running the batch file on its own. It worked fine. I tried putting the java code in the jsp into a java class, that worked okay too. I think it might be to do with the fact that the client is trying lauch the application through the web, but it's missing some information such as paths.
    I am totally running out of ideas.. please help

    I guess if I know JSP stands for Java Server Pages..
    I would most probably know it runs on servers.Yes, you might, but if you were assuming that the path you gave would always lead to an executable running on the client you'd have a problem. It's worth asking.
    I must admit it's probably not the best idea, but if
    you can give me some advice on that, that would be
    greatJSPs shouldn't have code in them that doesn't pertain to view. I'd wrap something like a system call or Runtime.exec in a Java Bean that you can test off-line without the JSP. Then have the JSP instantiate an instance, invoke its method, and display the value that's returned.
    You've read this, of course:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Everyone who uses Runtime.exec should.
    %

  • Hi I am looking for a way to have trace32 open multiple files on remote computers

    Simply put I am looking for someone who could afford to give me a basic script (vbs) that I could run from an elevated command prompt. It would need to be available for me to type in the name of a remote computer or (mulitple if possible) and also
    allow me to choose log files to open or multiple files and then open them using trace 32. Hopefully it would detect the available log files and show me what is available to choose to open... anyone know of such a thing or know how to go about setting up something
    like this for people to use?
    EDIT
    I was able to create a basic script to do what I wanted but I want to be able to add wildcards for the rollover logs... Can someone suggest the easiest way to do that as I am not sure how to add the wildcards directly before the .log
    here is the script.
    ' ******Created by Luis Delgado*********
    'This script will get a remote computers .log files depending on which documents you enter in the "files to open on remote computer using trace32" section
    'Get and open log files on remote Computer
    on error resume next
    Set WshShell = Wscript.CreateObject("Wscript.Shell")
    strcomputer   = inputbox("Enter remote computer name or leave as localhost for this computer","Get log files from a remote computer with Trace32","Localhost")
    If strComputer = "" Then
      WScript.Quit
    End If
    'Opens trace32
    wshShell.run "C:\Program Files\ConfigMgr 2007 Toolkit\CCM Tools\Trace32.exe"
    'Files to open on remote computer using trace32
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\datatransferservice.log"
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\ccmexec.log"
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\locationservices.log"
    !!!!NOTE!!!
    What I need is for any file that starts with datatransferservices, ccmexec, or locationservices to open in trace32
    my thought would be place a wild card in its respective spots but it does not work see below
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\datatransferservice*.log"
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\ccmexec*.log"
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\locationservices*.log"

    The roll over logs all have the same name exact the extension is .lo_ , So.. I'm not sure what you are looking for.
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Run Batch File for Domain Computers on Startup

    Hello,
    I am trying to run a batch file I created to grab computer specs off of every computer on our domain.  I have created a new GPO under my domain and under there I have the file sitting under Computer configuation>policy>windows settings>scripts>startup
    and also computer configuation>policy>administrative template>system>run these programs at startup.  Neither one seems to be working... I know the batch file works because I have tested it on multiple computers.  Here is what the file
    looks like:
    @echo off
    call :test >> \\10.0.2.3\users\rricks\computerinfo\%ComputerName%.log
    goto :eof
    :test
    wmic csproduct get identifyingnumber,name,vendor
    wmic os get osarchitecture
    wmic os get name
    wmic os get installdate
    wmic computersystem get name
    wmic computersystem get username
    wmic computersystem get totalphysicalmemory
    wmic baseboard get serialnumber
    wmic cpu get name
    I have also tried putting this file in the netlogon share folder on our DC with no luck.  Let me know what Im doing wrong.  Any help would be greatly appreciated.
    Thanks,
    Ryan

    > call :test >> \\10.0.2.3\users\rricks\computerinfo\%ComputerName%.log
    Who has access to this shared folder you are piping to? Did you try
    piping to a local file? %public%\blah.log :)
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • I thought we could share files with 5 computers?? how!

    I thought that we were allowed to download songs from 5 different accounts, or computers. How do I do this. Everytime I try it asks if I would like to replace the existing library.

    "I thought that we were allowed to download songs from 5 different accounts, or computers"
    If you purchase songs from the iTunes Music Store you can play those tracks on up to 5 authorised computers About iTunes Music Store Authorisation and Deauthorisation
    "Everytime I try it asks if I would like to replace the existing library"
    If you want to connect and use an iPod on more than one computer (For instance you have one at home and maybe a laptop or PC you use at work) you can change the update preference to "manually manage songs and playlists. By doing this, you can listen to your iPod at work where you may have iTunes but no songs on the computer. You are getting that message because it is set to automatically update and it is warning you that if you proceed it will link to a new and possibly empty iTunes library that will replace what you currently have. How to use an iPod with multiple computers
    Some additional info:
    The iPod offers three ways to transfer music from your computer. You can select one of the following update modes from the iPod Preferences menu in iTunes (Edit=>Preferences=>'iPod' tab):
    1) Automatically update all songs and playlists. This is the default mode, in which your entire music library, including playlists, is automatically synced to your iPod. If the music library on your computer exceeds the iPod storage capacity, you are prompted to select a different update method.
    2) Automatically update selected playlists only. With this option, iTunes automatically copies the playlists you have selected to the iPod when you connect it to the computer.
    3) Manually manage songs and playlists. You can also choose to transfer music to the iPod manually. This allows you to drag and drop individual songs and playlists from iTunes to the iPod.

  • How do we use Script (batch file with msbuild/msbuild project) to build Cordova Project created with Visual Studio Tools for Apache Cordova?

    I use Visual Studio to create Cordova projects. I need to build Cordova projects using msbuild and buildbot via script for my project but I can find only information about how VS combine with Cordova CLI to build multi device hybrid application.

    Hi Samseth,
    Yes, correct, the only thing we can find on the MSDN is:
    Deploy and Run Your App
    And that's the reason why Visual Studio Tools for Apache Cordova existing.
    I think you may get more detail compile information from here:
    http://cordova.apache.org/docs/en/4.0.0/guide_cli_index.md.html
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Reliably use one external drive with iTunes files with two computers?

    Hi all,
    I have an iMac with a 200GB external firewire drive as my main desktop. I also have a 12" Powerbook that I use around the house. I've also used the PB to stream music from my iMac to my stereo. I have the odd bit of trouble with this, music stopping and not reconnecting etc.
    We had a party last weekend and to stop the problems with wireless streaming occuring, I unplugged my firewire drive from my iMac and plugged it in downstairs to my Powerbook.
    To get the files to appear in iTunes on the PB, I had to drag everything across to from the finder to iTunes. After a while everything was there.
    The party went well: one visit from environmental health telling us to turn things down, and one visit to accident and emergency.
    Next day, I returned my firewire drive to to my iMac and now every track in itunes has an exclamation mark next to it.
    I know how to sort this out, and I'm not bothered about losing my playlists: what I want to know is a safe method to allow me to move my harddrive around and make sure it's all OK when I plug it into my iMac again.
    Any ideas?
    I suppose I probably left on the "Organise the music into folders" option when I first plugged in the drive to my PB and the files have actually moved a bit. Would making sure that this was set on both machines be a food thing to do?
    Cheers
    Stuart

    I suppose I probably left on the "Organise the music into folders" option when I first plugged in the drive to my PB and the files have actually moved a bit. Would making sure that this was set on both machines be a food thing to do?
    That probably changed the file locations, presumed the 'Organize' option was turned off on your iMac.
    Now your 'iTunes Library' file (iTunes' database) on the iMac can't find the files.
    It's a good thing to have the option turned on (or off) on every Mac you connect your external drive to.
    I used to have my library on an external disk too. The only thing I had to take into account was to copy the 'iTunes Library' file from one computer to the other when connecting my external HD.
    Never ran into problems.
    More info about the library files here.
    If you're running OS X 10.4, you could create an Automator workflow to copy the file to your external HD and another one to copy it from the external HD to the Powerbook.
    Hope this helps.
    M
    17' iMac fp 800 MHz 768 MB RAM   Mac OS X (10.4.6)   Several ext. HD (backup and data)

  • Using the server to share files with the clients

    Hello everybody!
    I finally managed to install properly iFolder on a server, and the client on a few computers. Unfortunately, I was suprised to see there is no functionality to upload from the server to the ifolders structure.
    I need to achieve this because the server I used is also used as a datacenter; I hoping to make the data available to each user directly on their own desktop using the mechanism integrated in the iFolder framework.
    Obviously, I would like to avoid copying back with ssh or ftp the files to one local client, and forth to the server using iFolder.
    The simplest thing would be to install a client on the server machine as well. Unfortunately, the folder monitoring function only works for graphical client, and my server does not have X installed.
    So my last resort would be to connect by ssh to the server machine, then start a non graphical web browser, connect to https://localhost/ifolder/ and share each file one by one... Really time consuming and annoying!
    Does someone have any suggestion?
    Thanks a lot for your help!
    Cheers

    Originally Posted by malcolmlewis
    On Sun, 02 Jan 2011 20:36:01 GMT
    aerospeace <[email protected]> wrote:
    >
    > Hello everybody!
    >
    > I finally managed to install properly iFolder on a server, and the
    > client on a few computers. Unfortunately, I was suprised to see there
    > is no functionality to upload from the server to the ifolders
    > structure. I need to achieve this because the server I used is also
    > used as a datacenter; I hoping to make the data available to each
    > user directly on their own desktop using the mechanism integrated in
    > the iFolder framework.
    > Obviously, I would like to avoid copying back with ssh or ftp the
    > files to one local client, and forth to the server using iFolder.
    > The simplest thing would be to install a client on the server machine
    > as well. Unfortunately, the folder monitoring function only works for
    > graphical client, and my server does not have X installed.
    > So my last resort would be to connect by ssh to the server machine,
    > then start a non graphical web browser, connect to
    > https://localhost/ifolder/ and share each file one by one... Really
    > time consuming and annoying!
    > Does someone have any suggestion?
    > Thanks a lot for your help!
    >
    > Cheers
    >
    >
    Hi
    AFAIK if you create a common directory on the server, then use the web
    admin interface to create a shared resource, then add the users.
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.24-0.2-default
    up 1 day 2:19, 2 users, load average: 0.05, 0.04, 0.00
    GPU GeForce 8600 GTS Silent - Driver Version: 260.19.29
    First, thanks a lot for your quick help. I am actually deeply impressed by the speed!
    Now, I don't know whether it is because I could not explain well my problem, or just because I can not understand your answer, but don't see what you're exactly suggesting me to do....
    1) create a common directory: Do you mean I physically create a directory (mkdir /pathtodata/)? Or I create an new folder in ifolder using the web interface?
    2) What is as "shared ressource"? I cannot find any reference to this term in the user manual. Do you just mean I share the ifolder I created in the previous step?
    3) Add the users: I imagine this is the step where I share the ressource with the user.
    Again, I am really sorry if my hesitations are stupid and the answer is obvious, but I read all the documentation and I cannot figure out the answer.
    Thanks a lot for your help

  • HOW TO: Open SQL Developer from a batch file with specific tables opened

    I use SQL Developer daily as I develop database intensive programs.
    ** Question **
    How can I define a specific configuration of tabs (i.e. tables, procedures, etc) to be opened upon startup of SQL Developer?
    For example, creating a .BAT file to open SQL Developer with a specific set of table tabs already opened. This will save me the time every morning I use to open SQL Developer and configure all the tables I need opened.
    NOTE: I have tried various options of appending a table name to a command line starting sqldeveloper.exe. For example: ..\sqldeveloper.exe mydatabase.mytable. However, this only opens a worksheet tab with the name "mydatabase.mytable" but does not open my actual table.
    Any help will be appreciated.
    - Gary Davis

    what version are you using? Sql Dev 1.5?
    Not an exact answer, but you could try using Table FILTER
    click on your connection
    right button on TABLES
    click apply filter
    as for your question, check out:
    Re: EA1 - Automatically open connection list at startup?
    or
    SQL Developer

  • Using multiply effect on illustrator file with 2 color job?

    Hi,
    Encountering a tricky problem and not sure if its an InDesign fix or an Illustrator fix.
    I am working on a 2 color job—pms color + black on a book cover. The cover needs to seperate into these 2 colors.
    Also, I need to make a high res and lowres pdf that look like the cover to send out to marketing, sales etc.
    WHAT's THE PROBLEM?...
    Well, I am creating a collage with black ink vector graphics on top of the pms background. I created this art in illustrator. it is saved as an .eps file. The illos were done by someone who used a white fill to knock out black areas. There is also a wide 50% grey outline around the illustration.
    I like the idea of the line of the illo being black and the fill being red so that it looks seethrough on the red background. But the 50% grey outline causes a problem...I'd like the 50% outline to blend with the red color, so instead of appearing like there is white in the ink it overprints.
    The only way I could think of (and quickest way) was to apply the multiply filter in illustrator to the vector illo. This seemed to work great.
    I brought the illo into InDesign where I created my cover layout.
    Looks great, Prints great. Separations appear to be good, although it shows the yellow, cyan, and majenta layer they appear to be blank, so I think it will seperate nicely into 2 plates–PMS + black.
    BUT, when I make a pdf, using "smallest file size" or using "high quality print", the pdf it makes does not show the illustrations in the collage. They are kind of beige and dulled out. The publisher needs pdfs too.
    Does this at all indicate that this job will not print correctly using this multiply filter, or is it all well and good final product wise, but its just an issue making the pdf? I am slightly nervous I am going to send this off to the printer and they will have some issue.
    I am a professional designer of 10 years with lots of print experience, but I have never used multiply in illustrator so I just want to make sure there is no rule against doing this I should know about. Does multiply at all mess with the color separations or is it fine? And how do I get my pdf to come out right? I'm hoping there's some dumb thing I'm forgetting, or a simple fix.
    Thanks for any insight you may have!
    L.

    I did figure out after posting this that I was using one .ai file and one .eps file—the .ai was showing up fine in the pdf and the eps was showing up screwy.
    odd thing though, when I just re-exported using pdf/x–1a settings, now both images appear muddy! but fine when I turn "overprint preview" on. I just don't want my publisher to have to tell everybody to turn overprint preview on...they shouldn't have to do that for editors etc, non design people.
    maybe the new "smallest file size" will be fine though since this is a press preset...we'll see.

  • MYOB AccountEdge - Sharing data file with remote Windows PC

    I use MYOB AccountEdge in a Mac environment at my office. Bookkeeper uses MYOB AccountEdge in a PC environment. We both would like to be able to have access to my MYOB data file. Simultaneous access to the file is not a requirement. We're not in the same office, so one of us would have to access the file remotely. I have Mac OS X Panther Server installed on my server. The MYOB folks told us that, in mixed environments, the data file would have to reside on a Windows server in order for both the Mac and PC to have access to the data file. They said that the Windows PC would not be able to access/use the file if it resided on a Mac server. Bookkeeper does not have a windows server. Before I go out and buy a PC to act as a server for the data file, wanted to know if the MYOB folks knew what they were talking about. I know it's their product, but over the years I've found some companies who make both Mac & PC software to be sometimes mistaken about the capabilities of the Mac platform.
    By the way, I do have a static IP address and broadband internet access. I would think that Mac OS X server would allow a PC to access and use the data file without any problems. Any advice/help anyone could provide would be greatly appreciated. Thanks.
    iMac G5   Mac OS X (10.4.8)  
    iMac G5   Mac OS X (10.4.8)  

    Pleaseeeeeeeee, help me!!!!

  • Using Copy-Item to overwrite files in remote server directory

    Hello,
    I am trying to copy newer files over older files from my workstation to a server using the copy-item cmdlet.
    The cmdlet looks something like this:
    copy-item *.* \\servername\c:$\pathname -force
    There are no subfolders involved, so -recurse is not necessary.
    When I run the command, I get this:
    Copy-Item : Access to the path <Destination> is denied.
    At line:1 char:1
    + Copy-Item '<source file>' '<Destination>
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Copy-Item], UnauthorizedAccessException
        + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.CopyItemCommand
    I am running with administrative credentials at both ends of the network path AND I can use the GUI to copy and paste the files using Windows Explorer.  I am losing hair due to scratching my head.

    Yes, what threw me was my ablity to copy and paste using Explorer from my machine to the server in an RDP session. I asked myself, "If I could do that, why can I not use the command line?"
    Then I did some googling and found all kinds of the same error but it was pointing towards files that existed or sharepoint sites.  In some of those cases, the solution was to remove the folder and then replace it.  That was not a an option in
    my case.
    So, I figure I can read using my normal user credentials and copy to the clipboard and then in the RDP window, I am the Admin user and can paste from my machine's clipboard.  Interesting behavior.

  • Want to use fujifilm xt-1 raw files with cs5

    I want to upgrade my raw converter for CS5 so I can use raw files from Fujifilm XT-1. When I try to download camera raw 6_4_1 it won't install. I'm using OS 10.8.5.
    Can anyone tell me what I'm doing wrong.

    Nothing you're doing wrong. It's just a case of software incompatibility.
    Camera Raw plug-in | Supported cameras
    X-T1
    RAF
    8.4
    5.4
    The XT-1 was first supported by Camera Raw 8.4 which is only compatible with CS6 or later
    Camera Raw-compatible Adobe applications
    So there is no plug-in for CS5 which will open Raw X-T1 files.
    Why doesn’t my version of Photoshop or Lightroom support my camera?
    Your choices:
    Upgrade to CS6 (provided you're running Win 7 or later)
    Join the Cloud
    Free option: download the Adobe DNG converter, convert all X-T1 Raw files to DNG format then edit the DNGs in CS5
    Photoshop Help | Digital Negative (DNG)

  • How to use external libraries and JAR files with OpenScript

    Hello.
    I am trying to include ApachePOI, JODATime, and Javamail in my scripts to handle different aspects of our automated performance tests.
    I followed the documentation for Eclipse to be allowed to utilize these external libraries, however, when I attempt to run my tests the classes and methods that are being imported, show up with errors saying that they do not exist.
    I think perhaps that I am using them incorrectly. I cannot see them as script assets, package assets, or project assets using the properties for these items. An error pops up and says those screens are not displaying correctly or display incorrect information.
    If anyone can provide guidance on using these items, that would be great. Right now I'm trying to include them as "previously exported scripts" but I'm not sure that method will work.
    Any advice is appreciated.
    Thanks.
    --tiff                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Tiff
    For OpenScript 9.* there is an out of the box solution for that, all you need to do in OpenScript go to:
    Script -> Script Properties -> Script Assets -> Add -> jar File ....
    And that is it.
    Alex

Maybe you are looking for

  • Where to look for reasons a job is active in sm37 but not in sm51

    I have sitation  a job is active in sm37 but not in sm51. What could be the reason? What to look for. I try to Job->Check staus in "sm37" but job still looks to be active

  • Binary To Decimal

    Hi i am having trouble from converting a binary number into decimal. I found the following code from a tutorial online and would like to merge it inside the code i currently have. This is the example i found online: //initialize the place values var

  • What exactly is un-needed from the Library folder?

    I just want to know what exactly is ok to delete and what is not ok to delete from my Library folder. Many things take up a lot of disk space. I know I can delete the printer drivers (2GB)... but I don't know what other stuff is unnecessary. I'm not

  • Question about Photoshop Premier and the need for coreaudio.dll drivers

    I downloaded Photoshop Premier Elements. When I run the video edit part of the program, I get an error saying the program cannot find coreaudio.dll and coreaudiotoolbox.dll. I'm using Windows 8.1. Are these drivers necessary? If so, how do I get them

  • Applet in IIS

    I have created a simple Applet and using IIS to acces the applet in a html file. In the browser applets are running fine as I tested some applets of live sites. But when I acces the applet which I created it doesn't work. I get following error in Jav