i want to develop a software by which i can setup the internet in which manner. so that when user will login on my software, he will get the permission of internet and also i want to create the log file of accessing site.
so if anyone have faced such kind of problem. so please help me out.
u can give me the in both vb.net or C# as you wish.
thank in advance.
Dim WSHShell,RegLocation ,RegValue, NewValue
Set WSHShell = WScript.CreateObject("WScript.Shell")
RegBinWrite RegLocation, binstring
RegLocation = "HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet Settings\ProxyServer"
'RegValue = WSHShell.RegRead(RegLocation)
NewValue = "<enter proxy server here> : <enter port here>"
WSHShell.RegWrite RegLocation, NewValue, "REG_SZ"
'WScript.Echo NewValue
RegLocation = "HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet Settings\ProxyEnable"
'RegValue = WSHShell.RegRead(RegLocation)
NewValue = "1"
WSHShell.RegWrite RegLocation, NewValue, "REG_DWORD"
'WScript.Echo NewValue
WScript.Quit
' Write REG_BINARY array
sub RegBinWrite(keyName,value)
ptr=instrRev(keyName,"\")
key="[" & left(keyName,ptr) & "]"
val=chr(34) & right(keyName,len(keyName)-ptr) & chr(34)
valString=val & "=" & value
Set fso=CreateObject("Scripting.FileSystemObject")
Set file=fso.CreateTextFile("temp.reg",true)
file.WriteLine("REGEDIT4")
file.WriteLine(key)
file.WriteLine(valString)
file.close
Set Shell=CreateObject("Wscript.Shell")
Shell.Run "regedit /s temp.reg",1,true
Set Shell=nothing
fso.DeleteFile "temp.reg"
Set fso=nothing
end sub

New Topic/Question
Reply




MultiQuote




|