Quantcast
Channel: LANDESK User Community : Popular Discussions - Software Distribution
Viewing all articles
Browse latest Browse all 2282

Windows 7 and RunAs (the sequel)

$
0
0

I recently started a discussion about the same topic but incorrectly marked it as 'answered'

http://community.landesk.com/support/message/46029#46029

 

Here's the original question:

I have some packages that don't want to install as local system (AutoCAD and our GIS software for example). Up till now i used AutoIT and used the runas command to install them silently. Now we are planning to migrate to windows 7 and UAC prevents the runas command to work. Does anyone know a way to work around this issue?

 

Here's the result of some testing:

The AutoIt script I deploy now looks like this:

(it's just an example i'm using to test this stuff. I open notepad with elevated permissions, and it requires elevated permissions to close it)

 

#requireadmin
runas("user", "domain", "password", @comspec & " /c " & "taskkill /im notepad.exe", @scriptdir, @sw_hide)

 

When i try this, the user won't get a pop-up but notepad won't close. If i try the following, notepad will close but the user gets prompted for permission.

 

Script 1:

#requireadmin
runas("user", "domain", "password", "script2.exe", @scriptdir, @sw_hide)


Script 2:
#requireadmin
run(@comspec & " /c " & "taskkill /im notepad.exe",@scriptdir, @sw_hide)

 

Anyone have another suggestion?

 


Viewing all articles
Browse latest Browse all 2282

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>