Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Script windows server 2008 r2

$
0
0

Hi, my name is Paul.

I want to run a program to run as!!   eveloped a vbs script for my domain.

################################

Option explicit
Dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "icacls c:\Coletor /inheritance:r /remove:g *"
WScript.Sleep 50
oShell.Run "icacls c:\Coletor /t /grant:r dmcase\digita:(OI)(CI)F /grant:r SYSTEM:(OI)(CI)F /grant:r dmcase\paulors:(OI)(CI)F"
oShell.Run "Runas /noprofile /user:dmcase\digita c:\Coletor\RMColetor.exe"
WScript.Sleep 50
oShell.Sendkeys "!D1#G1T@!~"
Wscript.Quit

when I run the script it opens the correct program so but does not exclude the groups that already have permission on the folder.

friends what I'm doing wrong?


Paulo Silvano


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>