Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open File - Security Warning

Status
Not open for further replies.

lintow

Programmer
Nov 29, 2004
82
0
0
US
When I run my script I call the xcacls.exe program.
this sets permissions on files that I create.

When the program is ran, I always get:

The publisher could not be verified! Are you sure you want to run this sofware!

and of course I want to run it. But I want this to happen automatic without me hitting the run button.

Can anyone help me with this problam
any sample code this is what I have

If Not objFSO.FolderExists(sFolder) Then
objFSO.CreateFolder(sFolder)

cmd=Chr(34)&"\\server\perm\xcacls.exe"&Chr(34)
arg="\\server1\Home\" & sUser & " /G " & sUser &":F" & " " & " administrators:F" & " " & " user:F" & " " & " user2:F"
Set Sh = Wscript.CreateObject("Wscript.Shell")
Set Shw = Wscript.CreateObject("Wscript.Shell")
Sh.Run cmd&" "&arg,1,False
WScript.Sleep 500
Sh.SendKeys"Y~"
WScript.Sleep 500
Sh.SendKeys "{ENTER}"

Shw.AppActivate "Open File - Security Warning"
WScript.Sleep 300
Shw.SendKeys "{ENTER}"
 
When I run my script
A vbs file ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How is this script launched ?
I thought the security warning box open only with "downloaded" file ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Dim oFSO, WSHSHell, sFolder, sXpath


'Set fs = CreateObject("Scripting.FileSystemObject")
Set ws = CreateObject("WScript.Shell")


sFolder = "\\spider\Home\" & sUser

sXpath = "\\spider\per\xcacls.exe"

If Not objFSO.FolderExists(sFolder) Then
objFSO.CreateFolder(sFolder)

cmd=Chr(34)&"\\spider\per\xcacls.exe"&Chr(34)
arg="\\spider\Home\" & sUser & " /G wlinton:F" & " " & " bwest:F" & " " & " administrators:F"

Set Sh = Wscript.CreateObject("Wscript.Shell")

Sh.Run cmd&" "&arg,1,False

Wscript.sleep 500
Sh.SendKeys "Y~"
Wscript.sleep 500
Sh.SendKeys "{ENTER}"
End if
 
You posted the contents of the VBS file.
I asked how this VBS file was launched.
 
By licking the file from windows explorer
 
you will want to look at ESCDomain entries in the registry, IE security zone settings, , ipaddress of name of the server where your script is running from...usually happens over across domains
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top