Hi all
I have a question to use file.runAs, how can I prevent from a pc connected into a network seeing the temp folder when ams is open? I mean, I try to disable temporaly the netman service only if ams 8 app exe is open, Anybody can tell me which commandline should I use to disable the network.
Note: I am referring to a network with several PCs I dont want cut the internet connection to the final user where is the ams8's exe being executed at.
Example:
Any idea why is not being changed when I go to my regedit and that value is still not changed?
Thanks
I have a question to use file.runAs, how can I prevent from a pc connected into a network seeing the temp folder when ams is open? I mean, I try to disable temporaly the netman service only if ams 8 app exe is open, Anybody can tell me which commandline should I use to disable the network.
Note: I am referring to a network with several PCs I dont want cut the internet connection to the final user where is the ams8's exe being executed at.
Example:
Code:
[COLOR="magenta"]cmdReg[/COLOR] =[COLOR="seagreen"] 'REG add \"HKLM\\SYSTEM\\CurrentControlSet\\services\\Netman\\" /v Start /t REG_DWORD /d 4 /f';[/COLOR] [COLOR="red"]if[/COLOR] File.DoesExist([COLOR="blue"]_WindowsFolder.."\\regedit.exe[/COLOR]") [COLOR="red"]then[/COLOR] nResult = File.RunAs(_WindowsFolder.."\\regedit.exe", [COLOR="magenta"]cmdReg[/COLOR], _WindowsFolder, SW_SHOWNORMAL, true, "Administrador", "", "", LOGON_WITH_PROFILE); [COLOR="red"]end[/COLOR]
Thanks
Comment