Ted

  You might what to try creating a startup batch file, this would be the
batch file you launch from R:Base which in turn calls your custom batch
file.

R>LAUNCH StartupBatch.BAT

****************Start up Startup batch file*********

RUNAS /noprofile /user:mymachine\administrator custom.bat

*****************End of Startup batch file*********

The user will prompted for a administrator password.

You can get more information on the RUNAS by type runas /? at the
command prompt.

Buddy

 

From: [email protected] [mailto:[email protected]] On Behalf Of Ted
Lienhard
Sent: Thursday, April 30, 2009 10:13 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Launch command parameter question

 

Hi Razzak,

I am using a LAUNCH command to run a batch file which is dynamically
created in an application.  The batch file is used to create a folder
structure for each application user.   It is contained in the "On Before
Start" EEP of an External Form.

 

Installing and running in XP- No problem.  The batch file runs and
creates the folder structure without errors.

 

Installing and running in Vista- Application experiences an error due to
the file/folders not existing; the folder structure cannot be created
unless the creation or deletion of folders is done under the Vista "Run
As Administrator" elevation of rights.  This is true even if the user is
part of the Administrator group or if it is an actual user named
"Administrator".  

 

This is a function of the User Access Control "feature" of Vista.  

 

The clients are interpreting the error in the application as a fault
with the application.  As I am sure you have experienced, even a nicely
done instruction sheet/file and the readme in the installer are ignored
by most users.  So, I am attempting to bypass the client's ability to
make a mistake!  

 

Obviously, this is a difficult task at best!!

 

Here are my instructions, taken from a PDF with screenshots (removed for
this email):

 

Right-click on the Application_Setup.exe and
select "Run as Administrator".
Then, Double-Click the Application_Setup.exe, and complete the
installation.


Before Running Application:

Before running the application, Windows Vista users must set the "Run as
Adminstrator" property on
the Application shortcut on your desktop. Again, this must be done
before running the Application. Just follow these easy instructions:
1. Right-click on the Application shortcut, then
2. Click the Advanced button on the Shortcut page to get to the Advanced
Properties dialog.  You'll see the Advanced Properties page, with a
checkbox for "Run as administrator":
3. Check the "Run as Administrator" box and
4. Click OK.
That's all there is to it!

Anyway, that is the situation, Razzak.  I was wondering if the
parameters function of LAUNCH was able to be used to Run As
Administrator under Vista.  I was also thinking that the ability to
pre-set the compiled application to "Run As Administrator" during the
compiling process would be a tremendous asset in a Vista/Windows7 world.
Likewise, having this same ability to be settable on the compiled
"setup" file itself would fix the installation problem entirely.  

 

Thank you for hearing me on this, my friend!

 

Best Regards,

Ted

 

 

 

Ted Lienhard CNE NCT

Golden Valley Consulting


>>> A. Razzak Memon<[email protected]> 4/29/2009 7:57 PM >>>
At 09:42 PM 4/29/2009, Ted Lienhard wrote:

>Does the LAUNCH command have the capability of the "Run As
Administrator"
>parameter in Windows Vista?


Ted,

The LAUNCH command as well as all I/O functionality of R:BASE follow the
the same access privileges of Windows logged in user. However, the
Administrator may assign special privileges to specific file and/or
folder.

Having said that, what specifically are you trying to execute, using the
LAUNCH command?

If you need to execute an external file, first you can use the 'Run As'
command by following these instructions:

01. Right-click on the file or program you wish to run (you can
right-click
     on executable file names in a Windows Explorer window, or you can
right-
     click on programs listed in the Start menu).

02. Click the radio button next to "The following user:"

03. Enter the username of the account you wish to log in as (you can
also
     click arrow on the drop-down box for a list of available user
accounts).

04. Enter the password for the account being used

You do not need to do anything to "turn off" that access. Only the
program
you execute using 'Run As' will run using the account you choose. Once
you
exit that program, everything is still just as it was when you started.

After following these steps successfully, now you use the LAUNCH command
(from within R:BASE session) to achieve your goal.

Hope that helps!

Very Best R:egards,

Razzak.




Reply via email to