Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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
  • 292 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
  • 292 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