I've been working on 4 standalone scripts. They each have their own GUI and are now independent .exe's. But instead of having 4 separate icons on my computer, is it possible to put them all together into one .exe?
What I want is one interface with tabs. Each script's GUI would be on their own respective tab. Is this possible?
The different scripts don't need to communicate with one another. I just want them all in one .exe.
I can't find this anywhere... Any help would be greatly appreciated. Thank you!
I need to be able to issue a command line which has a folder in parentheses as
attrib +s +h "absolute folder to hide" I've read through many posts here but nothing quite hacks how to use a variable as the folder in parentheses.
Local $dosattrib = "attrib +s +h " & ""$hidFolder"" ; $hidFolder built up from decrypted encrypted C:\Hidden Folder which I do not want visible when compiled version is reverse engineered which errors with excess parentheses but in single "" it doesn't work.
There seems to be a relatively complicated method to make it work but surely there's a simple way?
Hello Everyone , Are you tired of searching the forum for getting both the exit code & the stdout output? Then you are in the right place!
With this UDF you can get the both output & exit code of the command or the console app! Or you can get the exit code of another process without having to use RunWait...
1. Simple & Lightweight (15 KB)
2. Detailed comments & description
3. Flexible functions with many optional parameters
A BIG THANKS TO PsaltyDS for the functions! 2 of the (main) functions in the UDF are his work
List of functions:
Grab the latest (in development) code from GitHub
Hope it may help you, TD
P.S Icon made by Freepik from www.flaticon.com, Modified by TheDcoder
I need to start a script that include:
- admin privileges
- multiple cmd commands
- no bat, no exe, no tmp files created anywhere (especially in the user temp folder)
In a bat file it would be simple, but users shouldn't see what commands I'm sending.
Example of the script:
echo off cls echo. echo I AM A TOOL echo. echo NOTE: echo - note 1 echo - note 2 echo - etc set USER1=0 set COMPUTER1=0 if /i %username% equ user.user ( set USER1=1 set COMPUTER1=1 ) if /i %username% equ another.user set USER1=1 if /i %computername% equ notebook set COMPUTER1=1 if %USER1% EQU 1 ( if %COMPUTER1% EQU 1 ( reg delete "HKLM\SOFTWARE\blablabla" /f ) else ( echo Computer not authorized. Contact assistance.) ) else ( echo User not authorized. Contact assistance.) echo. pause exit With the send("") is a disaster.
I'm a noob here, so what can I do?
EDIT: OR ELSE I explain the situation and what I need, so if there is a simple solution I can use that.
SITUATION: our domain users have Users rights on the machine. Some of them need administrator rights.
We create a local user with administrator rights, so that the users must insert username and password when asked to run something with administrator rights.
We have an internal domain group policy that blocks EXE, BAT, COM, TMP files from the user local temp directory, for a security reason (malware). That also blocks most software installation.
But some users are often out of office, away from workplace and in another country, they need a complete control on their computers.
WHAT I NEED: I need to check the username and the computer name. If the username is the one with local administrator rights and the computer name is a computer that is qualified to temporary remove the policy, then I need to execute a REG DELETE command with administrator rights.
I hope I explained myself.
Thank you very much.
I have problems running both Bat files and Command line instructions.
This function hopefully shows what I have tried so far
Global $fFileToCreate = "", $DOS ScanFilm($fFileToCreate) Func ScanFilm($fFileToCreate) MsgBox($MB_SYSTEMMODAL, "Scanning Status", $fFileToCreate) ; $DOS = Run(@ComSpec & " /c " & "scan.bat" & @CRLF, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) $DOS = Run(@ComSpec & " /k " & "ncat 192.168.1.6 80 <scant.txt >scanrep", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ; $DOS = _RunDOS("ncat 192.168.1.6 80 <scant.txt >scanrep") ProcessWaitClose($DOS) $Message = StdoutRead($DOS) MsgBox($MB_SYSTEMMODAL, "Stdout Read:", $Message) Endfunc My first attempt running scan.bat reveals a bug in cmd.exe where the result of
echo !SR | ncat 192.168.1.6 80 > scanrep is
C:\S3_GUI\ncat>scan.bat C:\S3_GUI\ncat>echo scant.txt | ncat 192.168.1.6 80 1>scanrep Ncat: . C:\S3_GUI\ncat> note the added '1' which then throws the error, (when client is connected), "File or directory not found" so the command fails. This has been run on four different computers running Windows 7 with same result.
Next using Run() seems to truncate the command so $DOS reads:
Using _RunDOS() doesn't throw any error but MsgBox() is empty.