Click to See Complete Forum and Search --> : Vista security error


markh47
June 18th, 2009, 05:41 AM
Hi all,

I wondered if someone would be able to help me.

I have created a very basic program in VB that will run a batch file that writes a reg file to the registry (see code below) . In XP it works fine with no problems. However, with vista it comes up with a security error and does not run the batch file.

The error it says is:

"The application attempted to perform an operation that was not allowed by the security policy. The operation required the Security Exception. To grant this application the required permission please contact your systems administrator, or use the Microsoft.NET security policy administration tool"

activate.bat

regedit /s "reg/activateProxy.reg"

deactivate.bat

regedit /s "reg/deactivateProxy.reg"

Code from the VB application
Private Sub cmdActivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdActivate.Click
Process.Start("reg\activate.bat")
MsgBox("Your College settings are now activated!", MsgBoxStyle.Information, "ACTIVATE")
End Sub

Private Sub cmdDeactivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDeactivate.Click
Process.Start("reg\deactivate.bat")
MsgBox("Your Home settings are now de-activated!", MsgBoxStyle.Information, "DE-ACTIVATE")
End Sub

Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
End
End Sub

will I have to have different reg files for Vista than XP or would they be universal?

The aim on both is to activate the proxy settings and exceptions on IE and have an option to deactivate them aswell.

The registary files just contain the settings for IE both on and off.

Any suggestions would be appricated as I am not the best at programming but least at all when it comes to vista.

Thanks

Mark

dglienna
June 18th, 2009, 01:31 PM
Just create two GROUP POLICY settings, and use two logins. You won't get around the Vista Security Settings, without getting a digital certificate.

markh47
June 24th, 2009, 06:42 AM
The only problem with that idea is that we are hoping to use this program on Student and staff personal laptops aswell to save time and problems with human error. Any ideas on how I could achieve this using a basic program like the one I suggested?

Thanks

Mark

dglienna
June 24th, 2009, 11:55 PM
"Use the Microsoft.NET security policy administration tool"