Vbs to run an uninstaller silently or click confirm? - command

So I have a utility on about 250 computers that is now obsolete. The remote management program I use will not easily let me remove it via the gui. I am no programmer. Not by a long shot. I need a script to run via the remote command prompt to remove the file. I can easily delete the folder it is in but this will leave the registry entry's and thus still list it as installed. I would love to run it 100% silent but if not I at least need the script to confirm when the Uninstall confirm box pops up. I have searched and tried copy and paste with some success. Thanks for any helpful constructive criticism or entire scripts! Haha

Related

Autohotkey Not Auto

Running AutoHotKey Version 3.0.06.01 with Win 10 Version 10.0.19043 Build 19043 on a System SKU LENOVO_MT_81CU_BU_idea_FM_YOGA 730-15IKB laptop.
I have read many postings about AHK not performing as expected on Win10 OS. I have followed those instructions: rebooting, uninstall/reinstall, changing UAC settings, using run as admin , checking virus software -- et al.
I am very new and have only attempted very rudimentary scripts: Send Hello World, Msgbox Hello World and the like. Those seem to work fine by simply selecting the indicated hot keys. However,
The problem: when attempting use [Run] EG.
^j:: Run Notepad.exe or ; an executable
^1:: Run C:\HamSphere\UnaMas.xlsm ; a file
I must
1. select the saved file
2. right click and select run script
3. (the hotkeys icon displays in the tray)
4. then select the indicated hot keys
in order for the script to run as expected. I cannot simply select the indicated hotkeys. Compiling the file doesn't help.
Question: is this normal? If so, it seems like it defeats the purpose of hot keys.
TIA
doco
Apparently,
1. right clicking the *.ahk file and selecting the [Run Script] menu item
2. compile the script to an executable then double click that executable
will cause script to be ready and running in the background as evidenced by the green icon in the tray. This then allow use of whatever hotkeys defined in the script, to run.
The scripts will automatically end when windows closes or the user right clicks the associated image and selects [Exit] from the subsequent drop down.
Kind of a toss-up to actually going and getting the exe/file.
You don't need to compile scripts.
There are 3 main options for getting your scripts executed on start.
Startup folder.
Scheduled tasks.
"AutoHotkey.ahk": The program looks for a script file called AutoHotkey.ahk in the following locations, in this order:
The directory which contains the AutoHotkey executable.
The current user's Documents folder.
And if you don't want your file to be called AutoHotkey.ahk you could for example save it somewhere else and call it with Run from AutoHotkey.ahk.

Win'2019 is detecting my scripts with the Win32/Casur.A!cl trojan

I have a windows batch script that, depending on the user menu selection, opens a powershell.exe and passing a variable to run a .ps1 script. I then use Bat To Exe Converted (v3.0.10) to convert it to an exe. A few hours ago I made changes to the PS script and copied it to the Win'2019 server and it accepted it. Now, I just changed two letters in a write-host message command and it keeps quarantining the file. Since this will be passed to customers I can't be telling them to ignore it or white list it.
I'm guessing the .bat and .ps1 files are throwing Windows Defender off. Funny how it was fine just a few hrs ago. Even if I undo the 2 letters I added it still deleting the exe.
The .bat is quite big and it'd be very difficult for me to convert and add inside the .ps1 script in hope of not setting off the trojan. What other options do I have to fix this? Is there a process or url to notify MS about this to get them to fix this false positive?
NOTE: No other Windows version or 3rd party antivirus that I've tried is detecting the exe infected. Only Win'2019's Defender is.
It looks like MS has fixed the false-positive with my code. I came in to work this morning and tried to copy the exe again and this time it worked. I didn't even contact MS (we don't have a support contract anyway).
Btw the exe consisted of a bat and ps1 script that just downloads some public install files (such as 7zip) from an https address, saves them and when running the exe the user would just get a menu of which of the downloaded programs they want to install.
The issue can be reproduced creating a simple new console application (Language : C++) with Visual Studio 2019 (Community Edition) and then just run program: Ctrl + F5. The solution that worked for me, to run the program, was to add the folder as an exclusion in Windows Defender Antivirus. I couldn't find any solution on other threads

Run PowerShell in Google Backup and Sync folder

I installed Google Backup and Sync and placed my PowerShell script, myscript.ps1, within the Google Backup and Sync folder at C:\Users\<username>\Google Drive. When I double click myscript.ps1, the PowerShell window will open for a very brief period, then close without running. If I move myscript.ps1 to any other location in my C:/ drive, I can double click it and it will run without problems. Also, if I open PowerShell and type C:\Users\<username>\Google Drive\myscript.ps1 it also works without problems. It is just when I double left click within the Google Drive folder that I run into issues. Does anyone know why this is happening? Thanks!
You may want to log out and back into Google Drive/Sync. This happened to me a while back and I am pretty sure that resolved it.

Automatically windows powershell opens when I open my laptop

I have this problem going on for few days, every time I open my laptop it starts Windows Powershell automatically.It's not causing me any problem as I close it once it opens, but I am quite annoyed by it and wants to know if this is some problem or just something went bad with my settings. I am using windows 10 pro.
There is probably an autorun entry for Powershell registered on your system. Without more information, it's not possible to tell how it got there.
Programs registering themselves to start up on boot is a common symptom of malware infection, but most malware would also try to hide any visual cues, i.e. the Powershell window would be hidden.
To troubleshoot further, you can try the free utility Autoruns available from Microsoft. Look for any entries related to Powershell.

How can I run vim from PowerShell just by typing vim?

I just installed vim. It's awesome. From PowerShell, I want to be able to launch it both via typing vim and by typing vim someFile.txt.
I can already open vim through the run dialog. Further, it's already in my system PATH. What must I do to launch it from PowerShell?
If it's already in the path, it should work.
But you can, alternatively, use an alias via New-Alias. If you add that to your profile, it will load every time.
To see how the run box behaves differently from powershell, and how you might get around that, see my answer here:
Run a program by name from PowerShell (similarly to the run box)