Jul 18th, 2012, 12:52 AM
Hello guys, im newbie in here ,
i have problem with my program and i want ask u,
i want to make program that can copy to c:\windows\system32\whatever.vbs, the problem is i get "access denied" when its running.
i have tried to get administrator privilege but the UAC still come, can anybody give me a script to run my vbs as administrator and disable UAC when its running?
here its code :
dim folder, root, f1, source, destination, regedit, WshNetwork
function CopyFile(source, destination)
If filesys.FileExists(source) Then
filesys.CopyFile source, destination
Set WshNetwork = WScript.CreateObject("WScript.Network")
set folder = CreateObject("Scripting.FileSystemObject")
set root = folder.GetFile(Wscript.ScriptFullName)
source = root
destination = "c:\Documents And Settings\" & WshNetwork.UserName &"\Start Menu\Programs\Startup
destination = "c:\Windows\System32\whatever.vbs" -> in here access is denied
Jul 18th, 2012, 01:57 AM
You have posted this in the ASP.NET Forum, but I suspect that you are not actually doing ASP.NET Development.
Can you please confirm exactly what technology you are using? Windows Development? Windows Service? Office Application? etc so that I can get the question moved to the correct forum?