|
Answer» Windows Xp Pro- So LOCKED down that no one can put even a shortcut on their desktop. (New images) I work on the help desk and get maybe 10 of these calls a day. I would like to take care of these for the user and not have to put a ticket in for the desktop team ( cause its a HUGE time waster)
What I would like is a batch file to do this : Map a drive (asking for computer name) to{computername\C:\Program Files} Prompt for DIRECTORY (enter in name of directory) prompt for a file name to be copied to desktop (enter in name of exe to be copied)
Is this possible ?
I have been trying with no luck- I can map the drive and I can CHANGE dir- however- I cannot get a prompt.
I want this MONKEY proof....I work on a phone help desk.
What would work better for this with the fact that it is not an execute and have it just do it tool, is if you were to use a program to make system calls that will allow for all of this to happen.
I am a C/C++ user for tasks like this in which you can write code that will take in the users input and write it to a variable and then spill the string being the path out as a system call using the SYSTEM operand.
This also allows for you to add addition control so that you can test the user input before the input is executed so that given the fact that you have to manually enter the computer name and path of the EXE.
What might work out best for you is to have the batch instead of asking the user for all of this input, just search for the programname.exe and when it finds it copy it to the desktop of ( All users ) profile.
If the EXE has variable names then this wont work... But in most cases the EXE's that people reference dont change in name.
What is the drive map being USED for for this task? Are you referencing an EXE at a remote system to copy to the workstations desktop?
More info on what needs to happen might be helpful...but according to how I read this with prompts and user input. batch could do it with choice commands etc for user input for predefined input paths or options, but leaving the interface part up to C or another language might be best for better results.I used to work on a phone helpdesk!!
I WROTE loads of these sorts of batch file's to cover all the basic day to day jobs that kept coming in.
With out knowing what your actually trying to achieve, it's makes it a bit hard.
using the "/p" swicth on the set command like this will prompt the user for an input.
anyway..
Code: [Select]@echo off
echo. echo. echo. Welcome to the copy thingly batch file... echo. echo. echo. set /p PC="Enter the PC anme or IP: "
net use T: "\\%PC%\c$\Program Files"
cls echo. echo. echo. echo. set /p directory="Enter directory path: "
Do something here..
Hope it helps!!
|