Jump to content

Baboo85

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Baboo85

  1. RegDelete("HKLM\SOFTWARE\blahblabla", "RegValue") So this is the command to remove a key from the registry? Nice. Thank you, I'll try this and I'll let you know, because I can't add files (AdminInfo.ini), I need to keep all into the exe file. I need an array. It's inconvenient, but users shouldn't see anything. Also I'll add the #RequireAdmin command
  2. Hi all, 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.
  3. Hi all, I'm completely new in this world, and unfortunately I need to do a script for "yesterday" (as we often say when a thing to do is so urgent that isn't to be done "now" but "yesterday"). I need to execute a "cmd.exe" command ("reg delete") to eliminate a certain registry key, obviously under Administrator rights. And then, I'd like to insert a restriction for computer name (here we use a certain nomenclature of domain PCs, with name and surname, i.e.: John Smith's notebook will be "NB-JSMITH"). How do I do those things? I appreciate your help
×
×
  • Create New...