Solved

creating an ICON to run .bat file on remote server

Posted on 2015-02-06
18
71 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 23

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 23

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

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 23

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 23

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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 23

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 23

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 23

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 23

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 23

Expert Comment

by:NVIT
ID: 40615541
ADVLUV2FSH seems unfamiliar with closing process. Assisted with appropriate links.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The way I use Experts Exchange to assist me in analyzing and diagnosing a problem is I first enter a Verbose Question at Experts Exchange like: Office 2007 will hang when opening and saving files I then launch WordPad (any text editor will do) an…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

746 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