Using RUNAS to Install an Upgrade

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • centsoft
    Forum Member
    • Mar 2002
    • 24

    Using RUNAS to Install an Upgrade

    Hi,

    I would like to bypass the need for the user to log off and back on as an ADMINISTRATOR when doing UPGRADES.

    There is an inbuilt utility in XP/W2K called RUNAS. So in theory you can use %SysDir%\RUNAS.EXE /ENV /USER:Admin "%CDROM%\Upgrade.exe" and it will run the upgrade with no problems.

    The biggest problem is that it prompts for a password. I have got around this problem by using WSCRIPT to put in the password, but, then NORTONS AV picks up the fact that this is a malicious script and prompts you to make a decision.

    Any advice on how to stop AV programs from stopping scripts or any other advice on how to go about this would be great.

    Regards
    David
    Centaur Software
  • Adam
    Indigo Rose Staff Member
    • May 2000
    • 2149

    #2
    Re: Using RUNAS to Install an Upgrade

    I do not know of any other built in way to accomplish this. Although you have good intentions the antivirus software is doing its job. I suggest that you use the runas alone and have the user enter the password. It is fairly intrusive to fudge the password in the runas command. I can see some angry network admins if you fudge the runas password.

    I don't know of any way around this.

    Anyone else??

    Comment

    • DaTaSPiKe
      Forum Member
      • Dec 2003
      • 2

      #3
      I would say use this program call RunAS Professional, but there seems to be some sort of problem with running SetupFactory applications and using this utility. The utility can be found at



      The problems seem to revolve around the way SF runs the created EXE files. I don't know if it's two files that actually run, (compiler + setup file), or a truely compiled EXE file. :confused:

      So... good luck and please let me know if you get this to work.

      Chris

      Comment

      • GregThompson
        Indigo Rose Customer
        • Aug 2002
        • 4

        #4
        I do this presently at my company by employing an AutoIT v3 Script I wrote with the following.

        Code:
        $exeloc = IniRead("C:\Temp\vpnxp\exeloc.ini", "Section", "Value", "NotFound")
        $exeloc2 = $exeloc & "\vpnxp.exe"
        IniWrite("C:\Temp\vpnxp\exeloc.ini", "Section", "Value2", $exeloc2)
        
        		RunAsSet("ADMINACCOUNTHERE", @Computername, "PASSWORDHERE")
        		Run($exeloc2)
        		RunAsSet()
        Here's how it works..

        In the beginning of the SF6 package I check to see if it can read "Value2" of that .ini file. If not, it writes "Value" using the SF6 variable of %SrcDir%, executes the AutoIT script above, and aborts setup.

        When the AutoIT script executes (fyi AutoIT & SF6 you can do ANYTHING to a machine, it's an AWESOME combination, and the AutoIT script is compiled as an .exe, so no A/V issues) it checks "Value", adds the "\vpnxp.exe" to the end as a second variable, and runs the vpnxp.exe AS the admin account. FYI, vpnxp is the SF6 package. So basically it creates a loop in the beginning that once exited, is actually running the SF6 package AS the admin from wherever the user copy/pasted it to. At the end the last thing the SF6 package executes is an AutoIT cleanup script that basically erases it's tracks. I use the ini files to pass variables between the 2 programs. I'm no programmer, more a tech, but I write tons of stuff this way to make my life and our users lives easier. Kind of a "jack of all trades, master of none"

        Greg Thompson
        Estee Lauder Companies, Inc.
        Last edited by GregThompson; 06-24-2004, 09:16 AM.

        Comment

        Working...
        X