4 Replies Latest reply on Jun 6, 2010 9:06 AM by Fnurgg

    Windows 7 & RunAs

    Apprentice

      Hi,

       

      I have some packages that don't want to install as local system (AutoCAD and our GIS software for example). Up till now i used AutoIT and used the runas command to install them silently. Now we are planning to migrate to windows 7 and UAC prevents the runas command to work. Does anyone know a way to work around this issue?

       

      A run-as feature in LANDesk itself would be nice, or is that too much to ask?

       

       

      thanks for your replies

       

      Jo

        • 1. Re: Windows 7 & RunAs
          Expert

          You can specify to use "Current User's rather that local system, but the current logged in user would have to have the appropriate rights to perform the install.

           

          Alternatively, I just read a few articles that say this works. I haven't tried it though.

           

          runas /user:REQUIREDUSERNAME /savecred c:\PATH\TO\APP.exe

          • 2. Re: Windows 7 & RunAs
            zman Master

            Try using

             

            #RequireAdmin
            

             

            In your Autoit script.

            • 3. Re: Windows 7 & RunAs
              Apprentice

              wow, that was simple :-)

              with the #requireadmin, everything works fine an without prompts

               

              thanks Zman :-)

              • 4. Re: Windows 7 & RunAs
                Apprentice

                I was a bit quick to reply. The issue is not solved. The command in the runas does not execute with elevetad permissions.

                 

                The AutoIt script I deploy now looks like this:

                (it's just an example i'm using to test this stuff. I open notepad with elevated permissions, and it requires elevated permissions to close it)

                 

                #requireadmin
                runas("user", "domain", "password", @comspec & " /c " & "taskkill /im notepad.exe", @scriptdir, @sw_hide) 
                
                

                 

                When i try this, the user won't get a pop-up but notepad won't close. If i try the following, notepad will close but the user gets prompted for permission.

                 

                Script 1:

                 

                #requireadmin
                runas("user", "domain", "password", "script2.exe", @scriptdir, @sw_hide) 
                
                


                Script 2:

                
                
                #requireadmin
                run(@comspec & " /c " & "taskkill /im notepad.exe",@scriptdir, @sw_hide) 
                
                

                 

                 

                Anyone have another suggestion?