Hello,
I 'm new to AMS and AMS forums. So, sorry for my ignorance as I m not a developer/programmer.
We use ZCM 11.1 to manage Win 7 Group Policies. Of course, we lock down polcies restricting running CLI, Regedit, MSI and CPL. So, I created a simple app that will use File.RunAs with inputs that populate the admin account so it will run the exe as that account.
The problem is that File.Runas does not launch CPL, MSI etc., and I don't understand why.
Is it possible for File.Open to use username and password? If I have 2 inputs one for username and the other for password. The end user would enter the admin account info and when they click a button it would run the MSI, CPL etc., using file.open and username and password?
Below is the code I used for File.Runas. Can I some how adapt for File.Open? Sorry if this does not make sense. Thanks!
Code:--Get the variables Path = Input.GetText("Path"); Username = Input.GetText("Username"); Password = Input.GetText("Password"); --runs exe files File.RunAs(Path, "", "", SW_SHOWNORMAL, false, Username, Password, "", LOGON_NO_OPTION, nil, nil); -- Check to see if an error occurred when launching the file. error = Application.GetLastError(); -- If an error occurred, display an error message to the user. if (error ~= 0) then Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); end

Reply With Quote




