CCStopper icon indicating copy to clipboard operation
CCStopper copied to clipboard

[Bug]: Right after opening bat file closes

Open xlukn opened this issue 1 year ago • 4 comments

What happened?

The moment I open CCstopper a cmd window will pop up and close right after, cant get it to work. Running a custom install of windows 10 (AtlasOS)

Expected Result?

Bat file should open?

Version?

v1.2.3-hotfix.1

How did you use CCStopper?

One-Line - Run

Windows Version?

windows 10

Duplicate Issues

  • [X] I have read through the issues and have not found a duplicate.

xlukn avatar Sep 09 '23 07:09 xlukn

Try downloading the zip file and running it that way. A common issue I've seen is to do with the Powershell Execution policy, which you can fix. I recommend you set that setting back to default afterwards, as leaving it unrestricted is a security issue.

t4rra avatar Sep 10 '23 00:09 t4rra

Same as above; Win 11、Powershell 7.3.6、CCStopper v1.2.3-hotfix.2

Get-ExecutionPolicy was already set to "Unrestricted"

I downloaded the zip and ran the script from there (unzipped, of course :D)

I also tried the first one liner you suggested

Deleted @echo off for the rest:

  • When run manually from a VSCode terminal window (which does not always "insta-close"🎉)

    if 2 NEQ 0 goto elevate
    mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd","/c %~s0 ::","","runas",1)(window.close)
    exit
    
  • Removing exit gives a blue Powershell window which insta-closes (after powershell -ExecutionPolicy RemoteSigned -File . \scriptsMenu.ps1 is executed)

  • From an elevated Powershell prompt, powershell -ExecutionPolicy RemoteSigned -File .\scripts\Menu.ps1 works. Huzzah

  • However, I'm not convinced that everything is working properly, as I can see red error text flash up when I run 1, 3.1, and 3.3

tildebyte avatar Sep 29 '23 22:09 tildebyte

Are you getting the admin privileges prompt when running the .bat file? If not, and the script opens, it may be why you're getting errors when running certain modules. Unfortunately I don't have much knowledge about the closing on launch problem as of now.

t4rra avatar Oct 14 '23 05:10 t4rra

CCStopper is being sunset. I don't have any more information on fixing this problem unfortunately, but I suggest you take a look at the listed alternatives that may work better.

t4rra avatar Jan 14 '24 01:01 t4rra