Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

need help in creating a .bat file

bat program usb software

  • Please log in to reply

#1
Rasaur

Rasaur

    New Member

  • Member
  • Pip
  • 2 posts

dear,

I am currently making a USB stick that can extract the USB history of laptops. Using USBDeview from NirSoft.
currently the launch.bat looks like this:
Start USBDeview.exe /stext USBDeview.txt

Now my question: the .txt files appear in the same folder as the .exe files and launch.bat, I do not want this, I would like them to go into a separate folder and when the folder is deleted the launch.bat makes a new one, for that reason the program must also check whether the directory exists and otherwise automatically create it again (this must all remain within the USB)

And my 2nd question: when the start USBDeview.exe is done and start the .exe, I have to manually turn off the program,
is there a way that he stops when the files are extracted

In short, I would like to have a launch.bat that starts the .exe, .txt save it in another file, and that when all is done its quits the .exe so I can quickly go to the next PC


  • 0

Advertisements


#2
Alan1998

Alan1998

    Member

  • Member
  • PipPipPip
  • 295 posts

Try defining the "USBDeview.txt" file as C:\Users\User\Desktop\Folder Name\USBDeview.txt Does that do anything?


  • 0

#3
Rasaur

Rasaur

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts

Try defining the "USBDeview.txt" file as C:\Users\User\Desktop\Folder Name\USBDeview.txt Does that do anything?

well it does safe it to th folder, but I use the F: drive and if the folder does not exist is doesnt do a thing


  • 0

#4
Alan1998

Alan1998

    Member

  • Member
  • PipPipPip
  • 295 posts

Sorry, so you want to save the file to the USB as well?

 

Define the Save directory previously known as "C:\Users\User\Folder Name\USBDeview.txt" as "F:\Folder Name\USBDeview.txt".

 

Does that accomplish your needs?


  • 0






Similar Topics


Also tagged with one or more of these keywords: bat, program, usb, software

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP