Unable to supress UAC prompt
I have to register an .ocx file which gets registered only when it has admin priviliges.
So i used below script
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\ISIS")
Set objFolderItem = objFolder.ParseName("test.cmd")
objFolderItem.InvokeVerb "runas"
Using the above script but at the end it prompts the window where I have to click Yes, can we suppress that as well.
Is there any other way to get it done.
Please suggest.
So i used below script
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\ISIS")
Set objFolderItem = objFolder.ParseName("test.cmd")
objFolderItem.InvokeVerb "runas"
Using the above script but at the end it prompts the window where I have to click Yes, can we suppress that as well.
Is there any other way to get it done.
Please suggest.
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
SandeepPanat
12 years ago
ORIGINAL: shweta_kar
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\ISIS")
Set objFolderItem = objFolder.ParseName("test.cmd")
objFolderItem.InvokeVerb "runas"
Using the above script but at the end it prompts the window where I have to click Yes, can we suppress that as well.
I believe, using the above code : you only make the the cmd to run as admin, the UAC would still prompt. To add, 'Run As' to the vbscript, you can include reg settings like
HKEY_CLASSES_ROOT\VBSFile\Shell\runas.
Are you using this script inside msi?
Posted by:
jmaclaurin
12 years ago
The whole purpose of UAC is that it can't be bypassed, otherwise it would be copletely useless. If you wrap what you have into an MSI and deploy via GPO or whatever you are using for mass distribution, you might be able to get passed it. If your running it manually or with an exe, you are going to have a much harder time.
Posted by:
stmasi
12 years ago
Server: Windows 2008 R2 Standard SP1
Distribution Method: SCCM 2007
Workstations: Windows 7 Enterprise x86 and x64
I'm attempting to utilize SCCM for distribution to Windows 7 machines, but it doesn't seem to matter what I push to them. If it's at all executable, then UAC stops it. I've tried .BAT, .CMD, .EXE, .VBS, and every combination of those (one launching another, etc.). Sure there are utilities you can find out there that sneak your executable around UAC, but I want to be able to use the proper tools (DP) and nothing more. There has to be an easier way to do this. Am I just out of luck with this one?
Distribution Method: SCCM 2007
Workstations: Windows 7 Enterprise x86 and x64
I'm attempting to utilize SCCM for distribution to Windows 7 machines, but it doesn't seem to matter what I push to them. If it's at all executable, then UAC stops it. I've tried .BAT, .CMD, .EXE, .VBS, and every combination of those (one launching another, etc.). Sure there are utilities you can find out there that sneak your executable around UAC, but I want to be able to use the proper tools (DP) and nothing more. There has to be an easier way to do this. Am I just out of luck with this one?
Posted by:
kardock
12 years ago
we are distributing packages with sccm 2007 and never had problems with UAC.
in sccm, make sure that your packages are set to install as local system account and you should be good!
in sccm, go to your program, open the property window, navigate to Environment tab and make sure that "Run with administrative rights" is checked.
in sccm, make sure that your packages are set to install as local system account and you should be good!
in sccm, go to your program, open the property window, navigate to Environment tab and make sure that "Run with administrative rights" is checked.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.