Hi,
I have created some scripts on my Win7 machine, but they need to be elevated to run properly or launched from an elevated cmd window. Is there a nice way to have them ask for elevation when launched ? Because it is rather cumbersome to manually launch an elevated cmd, then manually to the folder where they are then launch them. When I simply double-click on them using the explorer, there is no elevation and the image fails (it still creates a 2kb file which I have to clear in the backup folder).
Thanks.
Using scripts on Win7
Forum rules
Discussion on the R-Drive Image software
Discussion on the R-Drive Image software
Re: Using scripts on Win7
Right-click a bat file with the script and select Run as Administrator. A prompt will appear asking you to confirm that and the file will start with elevated privileges. If you're an administrator, of course.
Re: Using scripts on Win7
Thanks. I have done the following :
- created a script "mybackup.rdi" in C:\Scripts\
- created a .bat file containing
start "" c:\scripts\mybackup.rdi
Now, when I right-click on the .bat file within the explorer, and chose run as admin, it does work.
Next step is to have the same functionality using double-click, maybe by creating a shortcut to the .bat file.
- created a script "mybackup.rdi" in C:\Scripts\
- created a .bat file containing
start "" c:\scripts\mybackup.rdi
Now, when I right-click on the .bat file within the explorer, and chose run as admin, it does work.
Next step is to have the same functionality using double-click, maybe by creating a shortcut to the .bat file.