Solved

creating an ICON to run .bat file on remote server

Posted on 2015-02-06
18
74 Views
Last Modified: 2015-02-17
Is is possible to set up an ICON on a domain workstation (Win7)  that runs a .bat file on a server (SVR2003) that is in a workgroup?
0
Comment
Question by:ADVLUV2FSH
  • 10
  • 8
18 Comments
 
LVL 24

Expert Comment

by:NVIT
ID: 40594859
Do you mean a link like the Windows Explorer "Create shortcuts here" option? If so, see my solution here. In your case, you'd use the /A:C switch to create the shortcut: http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_28604990.html#a40573662
0
 

Author Comment

by:ADVLUV2FSH
ID: 40594875
this is what I need the ability to do.   A client sends a file to our sftp server.  Once my backoffice clerk verifies that the file is correct, they need the ability to copy that file from the original folder on the sftp server to a different folder on the same server but simply clicking on an ICON.   I can run the .bat file locally but cannot run it via the desktop
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40594931
I can run the .bat file locally...
Can you post the command that runs the .bat? I don't need to see the .bat code - just the command that runs it.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 24

Expert Comment

by:NVIT
ID: 40594944
Unless the user is an admin, you may need to share the folder wherew the .bat resides.

Since you're in a workgroup, you may need to make a same-named local account of the user on the 2003 server.

After making the account:
- Logon the user
- Run the .bat locally to confirm it works (or doesn't).
- Logoff.
- Run the .bat from the user's desktop to confirm it works (or doesn't).
0
 

Author Comment

by:ADVLUV2FSH
ID: 40595131
I created a local account and gave it admin rights.   I shared the folder and also mapped a drive to the server logging the map drive in with the local account.  

Here are the commands I have tried.
C:\windows\system32\cmd.exe /C "z:\FTP Data Files\customerallocations\bat\vegasoul2.bat"

This is the command that works locally
C:\windows\system32\cmd.exe /C "C:\FTP Data Files\customerallocations\bat\vegasoul2.bat"
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40595173
As the desktop user (not local on server), you can open folder "z:\FTP Data Files\customerallocations\bat" and see vegasoul2.bat there?
0
 

Author Comment

by:ADVLUV2FSH
ID: 40595177
Yes but it will not run if I try to run it that way.
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40595323
From the desktop...
- Run CMD to open a cmd prompt window
- Type DIR "z:\FTP Data Files\customerallocations\bat\vegasoul2.bat"
- Do you see the file? If so, type "z:\FTP Data Files\customerallocations\bat\vegasoul2.bat"
- What is the exact error?
0
 

Author Comment

by:ADVLUV2FSH
ID: 40596091
I do not see the file the error is "The system cannot find the path specified"
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40596208
- Run CMD to open a cmd prompt window

1. What is the server name? Example: MainServer
- Type NET VIEW \\MainServer
- What is the result?

2. From the desktop...
- Type NET USE
- What is the result?
0
 

Author Comment

by:ADVLUV2FSH
ID: 40598640
Server side
net view\\afsftpas400
Shared resources at \\afsftpas400
Share name                  Type     Used As Comment
customerallocation     Disk
CVTRADES                     DISK
FTP Data Files               DISK
OPERATIONS                DISK
The command completed successfully

Desktop Side

Status
Disconnected            \\172.24.120.85\customerallocations
0
 
LVL 24

Accepted Solution

by:
NVIT earned 500 total points
ID: 40598970
What does the Z: map look like? Type:
NET USE Z:

Open in new window

0
 

Author Comment

by:ADVLUV2FSH
ID: 40598978
C:\Users\klejeck.AFLLC>net use z:
Local name        Z:
Remote name       \\172.24.120.85\customerallocations
Resource type     Disk
Status            OK
# Opens           0
# Connections     2
The command completed successfully.
0
 

Author Comment

by:ADVLUV2FSH
ID: 40604101
Thank you for your help I now have the ICON working
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40604108
Thanks for the update, ADVLUV2FSH. Glad you got it working...
0
 

Author Comment

by:ADVLUV2FSH
ID: 40615540
I've requested that this question be closed as follows:

Accepted answer: 0 points for ADVLUV2FSH's comment #a40598978

for the following reason:

The answer pointed me in the correct direction.   I needed to use the net use command
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40615535
ADVLUV2FSH,

If one of my comments provided the Answer for you, Please pick one of either "Accept as Solution" or "Accept Multiple Solutions" links next to the comment. Also choose the grade: A, B, C as desired. See

http://support.experts-exchange.com/customer/portal/articles/608621-how-do-i-accept-a-comment-as-my-solution-

http://support.experts-exchange.com/#hi331
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40615541
ADVLUV2FSH seems unfamiliar with closing process. Assisted with appropriate links.
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

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

830 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