Solved

creating an ICON to run .bat file on remote server

Posted on 2015-02-06
18
72 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Will DB Backup's  cleanup job will cause Paging ? 6 30
Inventory 1 59
PSTOOLS Office Activation Not Working 11 58
SQL Server memory Issue 7 109
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
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…

863 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

23 Experts available now in Live!

Get 1:1 Help Now