Create .bat file to launch a series of specific commands

I need to create a batch file to run a series of commands for a specific task.

I'll send someone that a certificate encrypted PDF along with the public key (.pfx file) because I want only this part to be able to view the pdf file. But this does send the PDF and the public key to a third party, enabling them to see also.

That's why I want to write a batch file to allow the first part install the public key, and once the installation is done, I want to delete the .pfx so.

I have zero knowledge in the writing of scripts and commands, and all I was able to make browsing through forums is to create 2 batch files single line code: one that runs the .pfx and one to remove the file. But that's only if I know the location of the file on the hard drive. So, how can I combine these 2 commands in a single batch file, allowing him to detect where the other party has saved the file and run it after installation, remove the file.

Please, any advice would help me greatly!

This issue is beyond the scope of this site and must be placed on Technet or MSDN

Tags: Windows

Similar Questions

  • BAT file automatically launch several virtual machines

    I try to use the automatic VMware.exe software from starting my VMs (three) when restarting my Windows desktop computer.

    I have created a. BAT file creating three lines of code in the startup of the host folder.

    Each line is similar to:

    "C:\Program Files (x86\vmware\vmare workstation\VMWare.exe"-x "c:\users\admin\Documents\Virtual Machines\vm1\vm1.vmx".

    Each line calls the next VM to start.

    My problem is that the batch file runs the first line (i.e. - start the first virtual machine) but will not progress to the second and third lines (so from the second and third VM)

    Each line of code works perfectly if entered manually and individually in the command RUN in the host.

    What I'm missing here?

    Hi WoodZ and jmtella

    A big THANK you.  The vmRun command was the answer.

    The attached file renamed as StartVM.bat works for me...

    I welcome your critical comment

    See you soon,.

    Michael

  • Workstation - Bat file to run several Virtual Machines

    I am currently using the following .bat file to launch several virtual machines:

    Start "" /b "C:\Users\Abe\Desktop\Virtual machine 1.lnk".

    Start "" /b "C:\Users\Abe\Desktop\Virtual machine 2.lnk".

    My problem is that start each machine's own instance of VMware.  Is it possible to build a script (.bat or other) who will start the virtual machines in a single instance of VMware Workstation.

    Regards and thanks in advance

    k

    You can create a file of commands like this:

    vmrun start "C:\VM\VM1.vmx".

    vmrun start "C:\VM\VM21.vmx".

    This would open up two virtual machines in the same GUI - at least that's the way it works on my Windows 7 host with 9 Workstation.

  • How to create a .bat file that references another hard drive?

    I am trying to create a simple .bat file that creates a text file listing all the files in the folder designated on the top line. However when I tried the version below, he created a list of the files on my desktop instead. How can I make 'look' the path on my internal D drive?

    CD D:\inetpub\kthings
    dir > C:\tftDocuments.txt
    Start C:\tftDocuments.txt

    Hello

    Information about batch files
    http://www.computerhope.com/batch.htm

    First, you need to access the real player if you're not already on it.

    D:
    CD D:\inetpub\kthings
    dir > C:\tftDocuments.txt

    You can display on the screen or have an application to display.

    TYPE tftDocuments.txt

    Or

    Notepad tytDocuments.txt

    -------------------------------------

    Maybe an application such as this one would be useful.

    KarenWare - printer - free directory
    http://www.KarenWare.com/PowerTools/ptdirprn.asp

    I hope this helps.

  • Create the folder Date current Wise via .bat file

    I want to create a folder using the current date in the .bat file, and then copy some files into the newly created folder. And then copy this folder from one place to the other. that is on the network location. I need that .bat file will work with two Windows XP & Windows 7.

    I'm totally unexperience in the script.

    Hello

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the public to theTechnet on the Technet forums. Here is the link.
    http://social.technet.Microsoft.com/forums/en-us/iTCG/threads

    I hope this helps.

  • I want to create an icon on my desktop to load 2 programs. I tried a .bat file, but it only loads the first program.

    I want to create an icon on my desktop to load 2 programs.  I tried a .bat file, but it only loads the first program.

    This helps you in some way?
    Microsoft® Security MVP, 2004-2009

  • How to create the file .bat for auto archive locally

    Hi, can someone guide me on creating a file bat for auto archive locally and a volume mounted, daily for an external HD operating system Windows server 2003 stnd?

    Thank you

    Here is the Vista Forums.

    http://TechNet.Microsoft.com/en-us/WindowsServer/default.aspx

    Try the repost in the communities of server above.

    They will help.

    See you soon.

    Mick Murphy - Microsoft partner

  • Windows Update doesn't have a download, the rename.bat file created without success

    I tried to do the Windows updates, and it would not download.  I tried everything, including the creation of a rename.bat file.  From what I read, I had to double-click on the rename.bat to attach the download of Windows.  I was not able to do.  Can anyone help?  I don't understand how completely.  I tried double clicking and just, it flashes and goes away and then the update will not download.  Help, please?

    http://www.Microsoft.com/downloads/en/default.aspx

    Put the number in the search at the above link > download it manually.

    If this does not solve it:

    Windows Update Forum:

    It comes with Vista, upgrade install and activate Forum.

    You will get the best help for any problem of Update/Service Pack in the Windows Update Forum; the link below:

    http://social.answers.Microsoft.com/forums/en-us/vistawu/threads

    When you repost here, kindly include the Error Codes, and exactly what is happening when you try to update.

    In this way, you will receive the best help.

    See you soon

    Mick Murphy - Microsoft partner

  • Is there a function in Adobe Acrobat which allows me to create a PDF file that has a capacity of "self-destruction"?  We have a situation where we allow people to download PDF files, but after a series of time (48 hours), the file cannot be opened and rea

    Acrobat can create PDF files that once downloaded - cannot be opened after some preset (48 hours)?

    Sorry, Acrobat has no such feature of "Self-destruct" you ask.

    Kind regards

    Rave

  • Copy of the Batch (.bat) file to the Start Menu for all users User/Each

    Created a lot on each machine (file1.bat) leader to create a queue (file2.bat) of lot for a launch of a page to start windows.

    This is the content of file1.bat:

    off @echo

    @echo > C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat «»
    @echo start http://www.MSN.com/ > C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat

    Expected result is to copy the file2.bat to the start of each user profile.  However, the file2.bat is not copied to the Startup Windows 7, 8, 10 folder after the test.

    However, it will work in file1.bat:

    off @echo

    @echo>"C:\Testing\file2.bat
    @echo start http://www.MSN.com/ > C:\Testing\file2.bat

    I have not the network joins a domain.  I need to send the file1.bat to all staff.  I intend to deploy to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup.

    Thanks in advance to all.  Any help is appreciated.

    To run a command as Administrator file, you must click on it & select run as administrator.  Despite being connected with an Admin-level account, individual actions like yours needs as the run as Admin permission.  This is the way Windows works.

    You cannot add anything in a batch file to run as an administrator.

    You will see the system's responses to your batch file by adding a last line containing just the word break [test]

    - - - - - - - - - - - - - - - - - - -

    "File2.bat is to launch a web page which start machine"-Yes, I understand that. ""  But using a batch file to do this isn't better than just sending them the URL shortcut to the Web page instead.

    - - - - - - - - - - - - - - - - - - -

    "Wish only to send the file1.bat for users" - you must give them instructions to run as admin.  Since the instructions are necessary in all cases, then you might as well keep it simple by sending them a shortcut in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup folder and url of msn [shortcut].  In your email, you can tell them to use the first shortcut [Startup folder] to get to the good copy of place and then * the second [msn url] in there, giving approval to the Admin when / if * it is called for.

    Some target computers may have lower security settings [settings "UAC"] meaning permission Admin is not necessary, but since you do not know that in advance, you will have to warn that it may be necessary.

    If there are multiple users on each computer only one of them has to do this on each machine.  You must choose a user who is either an Admin user who knows the password for this computer.  If you ask each individual user to do this, then only the first will be something to see; others may follow your instructions, but they will see that it has already been done and he can stop then.

    - - - - - - - - - - - - - - - - - - -

    It is difficult to tell many users on many different computers to do something.  Some will ignore your instructions & do nothing.  Some will try to comply, but will make mistakes.  Some will do what you want.  You won't know the results even if you ask them to email you back to let you know.

    Denis

  • HP Officejet 6500 E710: How to create desktop icon to launch the Scanner dialog box?

    I would like to create a desktop icon to launch the Scanner dialog box. I'm not a fan of the approach to Tile Windows.

    Under Windows, 8.1, there was a desktop icon which allow me to connect to my Officejet 6500 unit and allow the scan to computer option. Who disappeared with the upgrade of Windows 10.

    I ran the print and Scan doctor and it solved the problems. When I went to test scanning, it arises from the familiar dialog box where I could choose different settings.

    It worked perfectly. But after having closed the doctor, I could not find any place to launch the new dialogue box, outside the doctor.

    I downloaded and installed the scanning HP and Capture app. It works very well, but I rather not leaving office to launch it, or use it enough to justify the taskbar setting.

    Is it possible to create a desktop icon for the application of scanning and Capture

    or

    is there a way to create an icon to launch the dialog box scan that print and Scan Doctor uses?

    I prefer this one.

    Hello

    Thank you for using the HP Forums.

    Is there a way to create the shortcut to scan on your desktop. Try the following steps:

    1. open a file Explorer

    2 C: > Program Files (x 86)

    3 program Files (x 86) > HP

    4 HP > HP Officejet 6500

    5 HP Officejet 6500 > Bin

    6 bin > Scanner HP

    7. right click on the analysis of HP and "create shortcut".

    You'll get a prompt that "Windows cannot create a shortcut here.  Do you want the shortcut to be placed on the desktop instead?    Select "Yes".

    Hope that helps!

  • How do I open Mozila firefox with another user using any script or Bat file

    Hello...! There I want to create a bat by which I can open Firefox with a different username.

    I typed below the code and it works well in command prompt, but his does not work as a bat file.

    runas/user: domain\username "C:\Program Files\Mozila Firefox\Firefox.exe".

    or

    runas / user: ABC\XYZ "C:\Program Files\Mozila Firefox\Firefox.exe".

    Can someone help me out here. Can someone give me a code by which I can open firefox with a different user name by using the bat file.

    Hello

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please ask your question in the Forums Pro TechNet Windows XP IT.

  • Problem executing .bat files

    Hello

    Recently I found myself unable to run .bat files. When I try to do, the computer slows down terribly and it takes forever to load cmd.exe and more to run each command. If, by chance, the .bat file terminates its execution, the computer plays again slowly, freezing the mouse and do not let me interact with the interface graphics or even open the Task Manager. This also limits me a lot, because I can not install MinGW + MSYS (timeout error), Java 6u21 (loads but does nothing), or I can use the .bat files to speed up tedious work.

    There is an exception to this situation, and this happens when I run the .bat from an already open terminal file, but that only solves the third problem (using files .bat for boring tasks).

    I have Windows Vista SP2 running on a PC of 2007 with Intel Core 2 Quad to 2.4 GHz, 3 GB RAM and graphics card ATI Radeon 2600 HD Series. For security reasons, I use the Windows Firewall and Panda Antivirus Pro 2010.

    Any help is greatly appreciated.

    EDIT: I have a little... news. Their execution in safe mode doesn't cause any slowdowns and, also, the virus seems to be innocent (but I can't be sure, that he has disappointed me so much this year). This probably means that some process is blocking or running the files beats during a normal filtering mode.

    Try a boot minimum http://support.microsoft.com/kb/929135.  If the problem goes away then it's just a matter of tracking down the culprit at the origin of the problem.   Follow the procedures described in the article.  Once found, remove, delete, disable or uninstall.  Once remember to put Vista in normal status, as described in the procedures. If the problem occurs in clean mode then just restore the system to normal and reboot - this solution will not work. Given that the problem does not occur in Mode safe, I have better average hope that this process would work - but it will try it and see.

    I hope this helps.  If this isn't the case, after return and we will try other options.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • OfficeJet 4500 scan does not create a file on disk

    Recently purchased, this replaces a PhotoSmart HP 2570, no problem with the software install, printer setup, network (ethernet connected), etc. Print and copy of work. Did not try the fax. Scan to file (pic to file) does not create a file on the disk that you use the HP Solution Center or on the button scan Panel before starting the scan.  "Preview scan" and "launch Windows Explorer in the save location after saving the files" are both checked.  I also used different 'save locations' and even created a new subfolder "temp1" from the root C: and set security to be "full control" for all of the listed users.  During a scan, all works well until and including the scan preview projected.  When "Finish" is selected, a progress dialog box is shown with a message to «Finish the scan of the computer...» "reasonable given the"Save location"by which the progress bar gets about 2/3 full and then disappears.  Windows Explorer does not start in the save location and there is no file created anywhere on the disk.

    Appreciate sincerely all serious and constructive comment.  If I don't get this resolved, I need to go back and return to the PhotoSmart...

    Download and run this HP critical update for their software v13.

  • I, stupid, changed the program by default to a BAT file to the cmd prompt, well, now I can't run the batch files now, please help!

    I, stupid, changed the program by default to a BAT file to the cmd prompt, well, now I can't run the batch files now, please help!

    Hi William,.

    Welcome to the Microsoft community.

    Batch file is a type of script file, a text file, containing a series of commands to be executed by the command prompt. When you run a batch file, it opens the command prompt to run the scripts.

    It would be great if you can answer the following questions:

    1. what happens when you try to run a batch file?

    2 are. what batch file you referring?

    3. the problem occurs for a particular batch file?

    First of all, I suggest you to check the commands written in a batch file. To do the same thing, just right-click on the batch file, and then click change. It will open Notepad with the list of orders scripted for this particular batch file.

    If you have additional questions on the computer, please ask your question about Windows and we will be happy to help you.

Maybe you are looking for

  • Try to do a 1080 p Quicktime file - 20 GB is too big!

    Hello I'm trying to export a project exhibition at a film festival.  It should be Apple ProRes 422 HQ and 1080 p.  The original material was Apple ProRes 720 p files.  When I export it with parameters ProRes/1080 p file is 20 GB, too big to put in a

  • Upgrade Satellite A100-200 RAM question

    Hello I have a Toshiba Satellite A100-200, I want to move to 4 GB.I install 2 x 2 GB kingston kvr667d2s5/2 GB pc-5300 ddr2 667 mhz. Every time I make a control sites Internet it tells me to install PC24200 ddr2 533.The above will work even as the 420

  • Lost access to the admin page after upgrade to the MyNetgear account

    I used my ReadyNAS to 104 for over a year now without any problems. Today, I signed and decided to update a MyNetGEear account and after the update is finished, he couldn't find my ReadyNAS 104. I goto page discover, he sees my ReadyNAS 104, but when

  • optimization of 3D image redraw expensive?

    Hi all! I have a VI with a 3D picture control. This control is updated, and then set it to redraw 10 times per second. The redraw method is called by: The reference to the control is stored as a control reference generic, then sank to the control of

  • Dynamic FG in of multiple called vi

    I have an application in which the primary vi, I load any incoming number of instances of the same vi and its façade.  Each instance of these "Sub main" environment vi, I am trying to assign their own index in a table functional global cluster, like