Announcement

Collapse
No announcement yet.

Bat file run as administrator.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bat file run as administrator.

    Hello,

    I'm using setupfactory 9.0 version.

    After successful program installation I need to run a bat file as administrator. I know how to using "file.open" method. but I don't know how to make code for run as administrator.

    Please guide me.

    thanks,
    thenndral

  • #2
    Use File.Run() to execute CMD.EXE (in the SystemFolder) with the command line parameters /C CALL "filename.bat" ... like this:

    Code:
    nRet = File.Run(SessionVar.Expand("%SystemFolder%\\cmd.exe"), "/C CALL \"" .. sPathToBatchFile .. "\"", "", SW_SHOWNORMAL, true);
    Ulrich

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎