Command line

Sep 18, 2015 at 5:44 PM
I guess I'm dense, but I don't see any information on how to setup Ghostbuster to run from a command line. I know I need a configuration file, but I'm not sure how to create that file. Can I use it with the portable version?

Thanks,

T
Coordinator
Sep 18, 2015 at 6:40 PM
Hi

To answer your 3 questions?

1) If you start ghostbuster with /help you will get the command-line help in a popup.
2) The config file is located in %appdata%\GhostBuster and is created by running the program in GUI mode and right click ghosted devices that need to be removed & select either the class or the device or enter a wildcard. The marked devices will be removed only if ghosted. You can use this file to run completely from the command-line. You need to run from a elevated prompt or use an elevated scheduled task.
3) Yes the portable version is ok, but it will created the settings file mentioned in 2). (so it's not 100% portable as it leaves traces).

regards
wvdv
Sep 18, 2015 at 7:43 PM
Excellent, thanks for the help, and for the fantastic program!

T
Oct 9, 2015 at 8:44 PM
OK, I must be doing this wrong. I have a Ghostbuster.ini file with the following in it.
[Class.RemoveIfGosted]
item_0=Disk drives
Count=13
item_1=Floppy disk drives
item_2=Monitors
item_3=Network adapters
item_4=Portable Devices
item_5=Ports (COM & LPT)
item_6=Storage volume shadow copies
item_7=Storage Volumes
item_8=Non-Plug and Play Drivers
item_9=System devices
item_10=DVD/CD-ROM drives
item_11=Human Interface Devices
item_12=Sound, video and game controllers

[Descr.RemoveIfGosted]
item_0=USB Mass Storage Device
Count=5
item_1=USB Composite Device
item_2=Unknown Device
item_3=Sony DSC
item_4=Y-E Data USB Floppy

I copy it and Ghostbuster portable to a computer and I run:
GhostbusterPortable.exe /nogui Ghostbuster.ini

It seems to run (I see Ghostbuster show up in the task list) but when I run it manually, it hasn't removed anything. Any idea where I'm going wrong?

Thanks,

T
Coordinator
Oct 9, 2015 at 10:15 PM
Hi,

Did you start from an elevated command prompt?

Regards
Wvdv
Oct 9, 2015 at 11:07 PM
Yes, I'm running it by hand from an elevated prompt.
Coordinator
Oct 12, 2015 at 7:30 PM
Hi

I will look into it.

What version are you running?

Regards
wvdv
Coordinator
Oct 12, 2015 at 7:43 PM
Hi

Just tested it here and it runs and removes devices with a command GhostBuster /nogui ghostbuster.ini (provider the ini file is off-course in the current directory).

I used the latest portable version available for download.

I'm not sure but it could be that GhostBuster is expecting an private eventlog file to be present. (I'll look into that as it's not portable anyway, but is a part of the reason how/why I coded the /nogui options, ie to allow it to run as a scheduled task so you do not need to elevate). It allows you to run ghostbuster at login for instance.

Regards
wvdv
Oct 13, 2015 at 11:48 AM
Ok, I'll test it again. I must be doing something wrong.

T
Oct 14, 2015 at 1:54 PM
I'm using GhostBuster Portable 1.0.5.0. Running Win 7 Home Premium x64.

From an elevated prompt, I'm running the following command:
GhostbusterPortable.exe /nogui Ghostbuster.ini

The GhostBuster.ini (which is in the same folder) looks as follows:
[Class.RemoveIfGosted]
item_0=Disk drives
Count=13
item_1=Floppy disk drives
item_2=Monitors
item_3=Network adapters
item_4=Portable Devices
item_5=Ports (COM & LPT)
item_6=Storage volume shadow copies
item_7=Storage Volumes
item_8=Non-Plug and Play Drivers
item_9=System devices
item_10=DVD/CD-ROM drives
item_11=Human Interface Devices
item_12=Sound, video and game controllers

[Descr.RemoveIfGosted]
item_0=USB Mass Storage Device
Count=5
item_1=USB Composite Device
item_2=Unknown Device
item_3=Sony DSC
item_4=Y-E Data USB Floppy

When I run the command, GhostBuster runs (I see it in the task manager) and then it drops back to the prompt.

If I run Ghostbusterportable.exe manually, it still shows a bunch of ghosted devices under Disk Drives, DVD/CD-ROM drives, etc. So it doesn't seem to be removing anything.

So then I selected everything I wanted to remove, and it generated a new ghostbuster.ini which looks like this:
[Class.RemoveIfGosted]
item_0=BlackBerry
Count=15
item_1=Disk drives
item_2=DVD/CD-ROM drives
item_3=Floppy disk drives
item_4=Human Interface Devices
item_5=IDE ATA/ATAPI controllers
item_6=Keyboards
item_7=Mice and other pointing devices
item_8=Monitors
item_9=Network adapters
item_10=Portable Devices
item_11=Processors
item_12=Storage volume shadow copies
item_13=Storage Volumes
item_14=Non-Plug and Play Drivers

[Descr.RemoveIfGosted]
item_0=HID-compliant mouse
Count=5
item_1=Generic USB Hub
item_2=No Printer Attached
item_3=Unknown Device
item_4=USB Mass Storage Device

Then I ran the command:

GhostbusterPortable.exe /nogui Ghostbuster.ini

And it removed all the updates!

So maybe the original .ini file was wasn't working?

T