I am looking for a way to create a Powershell script that will allow me to open DB Browser for SQLite ("C:\Program Files\DB Browser for SQLite\DB Browser for SQLite.exe")
and upon opening, load a file (C:\Users\XXXXX\AppData\Roaming\AirHauler2XP\Company\Atlas Airlines25045 PM.db)
in order for me to edit. Any help would be great (if possible).
Asked
Active
Viewed 67 times
-3

Marci
- 57
- 8
-
1can you do that in a cmd console? if so, that same thing otta work in a PoSh console. – Lee_Dailey Oct 17 '20 at 13:57
3 Answers
1
Please see the documentation: https://github.com/sqlitebrowser/sqlitebrowser/wiki/Command-Line-Interface#examples
According to that, it should be:
"C:\Program Files\DB Browser for SQLite\sqlitebrowser" "C:\Users\XXXXX\AppData\Roaming\AirHauler2XP\Company\Atlas Airlines25045 PM.db"

Christian Baumann
- 3,188
- 3
- 20
- 37
0
@ChristianBaumann is OK, and it will work from command prompt. But for powershell this will fail. You need to use &
to run it:
& "C:\Program Files\DB Browser for SQLite\sqlitebrowser.exe" "C:\Users\XXXXX\AppData\Roaming\AirHauler2XP\Company\Atlas Airlines25045 PM.db"

Wasif
- 14,755
- 3
- 14
- 34
0
I would add it to the path one way or another.
$env:path += ';C:\Program Files\DB Browser for SQLite'
cd AppData\Roaming\AirHauler2XP\Company
sqlitebrowser '.\Atlas Airlines25045 PM.db' # tab completion on the filename

js2010
- 23,033
- 6
- 64
- 66