Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Start Stealth with Powershell or Batch?

Post Reply
sauber
Neophyte
Neophyte
Posts: 18
Joined: 18.07.2018 21:01

Start Stealth with Powershell or Batch?

Post by sauber »

Hello,

Would it be possible to start Stealth with a PS or Batch command and give arguments to start one script?

Solution.

Create a .txt file inside your main Stealth Folder like this (very important to mind the spaces!)

Code: Select all

ProfileName; connect;\ScriptName.sc; start
The script must be inside the Scripts folder within your main stealth one.

Then you can run it as a CMD line PATH\Stealth.exe char=txtfile.txt
or simply create a shortcut of your Stealth.exe and edit properties adding char=txtfile.txt

To run at Windows start, place into

Code: Select all

C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Last edited by sauber on 31.07.2019 22:44, edited 1 time in total.
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Start Stealth with Powershell or Batch?

Post by Vizit0r »

"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
sauber
Neophyte
Neophyte
Posts: 18
Joined: 18.07.2018 21:01

Re: Start Stealth with Powershell or Batch?

Post by sauber »

Thanks Vizit0r, but the script doesn't start and player doesn't go online.

1) Create autostart.txt file with:

Code: Select all

ProfileName; connect; /Script.sc; start
2) tried with Command Line or with Shortcut: C:\Path\stealth.exe chars autostart.txt
Stealth opens and nothing happens. Version 8.8.3
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Start Stealth with Powershell or Batch?

Post by Vizit0r »

try last version.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
sauber
Neophyte
Neophyte
Posts: 18
Joined: 18.07.2018 21:01

Re: Start Stealth with Powershell or Batch?

Post by sauber »

The same problem, nothing happens.
Also tried to run stealth as Administrator
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Start Stealth with Powershell or Batch?

Post by Vizit0r »

should be
ProfileName; connect; \Script.sc; start

in new ver added check\replacing for backslash
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
sauber
Neophyte
Neophyte
Posts: 18
Joined: 18.07.2018 21:01

Re: Start Stealth with Powershell or Batch?

Post by sauber »

By using Google Translate, I didn't realise there weren't spaces in the C:\Path\Stealth.exe chars=autostart.txt

In the text file you need

Code: Select all

Profile1; connect;\ScriptName.sc; start
No space after connect;\ <----
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Start Stealth with Powershell or Batch?

Post by Vizit0r »

spaces in command line separate params. So, chars = autostart.txt will be parsed as 3 params instead of one.
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Post Reply