Jump to content

Installing Dameware Service in Windows 7 with UAC


vrocco
 Share

Recommended Posts

I need to push out a script to install the dameware mini remote service on machines running Windows 7 with UAC enabled (disabling UAC is not an option). I need the script to be able to be run by the user without elevating. User has write access to C:, so I created a temp directory, copied all files there, then tried to do the elevated part by using a RunAs @comspec. The problem is, it's not working at all. What am I missing here. The script just exits with no errors, but doesn't even create the directory.

Thanks for the help

DirCreate("C:\dwrcs")

;Copy files needed for Dameware NT Utilities
FileInstall("DNTUS26.exe", "C:\dwrcs\DNTUS26.exe")

;Copy files needed for Dameware Mini Remote
FileInstall("DWRCK.dll", "C:\dwrcs\DWRCK.dll")
FileInstall("DWRCRSS.dll", "C:\dwrcs\DWRCRSS.dll")
FileInstall("DWRCS.exe", "C:\dwrcs\DWRCS.exe")
FileInstall("DWRCSET.dll", "C:\dwrcs\DWRCSET.dll")
FileInstall("DWRCSh.dll", "C:\dwrcs\DWRCSh.dll")
FileInstall("DWRCST.exe", "C:\dwrcs\DWRCST.exe")
FileInstall("DWRCWXL.dll", "C:\dwrcs\DWRCWXL.dll")

;Copy files needed for FIPS modules
FileInstall("ccme_base.dll", "C:\dwrcs\ccme_base.dll")
FileInstall("ccme_ecc.dll", "C:\dwrcs\ccme_ecc.dll")
FileInstall("ccme_eccaccel.dll", "C:\dwrcs\ccme_eccaccel.dll")
FileInstall("ccme_eccnistaccel.dll", "C:\dwrcs\ccme_eccnistaccel.dll")
FileInstall("cryptocme2.dll", "C:\dwrcs\cryptocme2.dll")
FileInstall("cryptocme2.sig", "C:\dwrcs\cryptocme2.sig")
FileInstall("DWRCRSA.dll", "C:\dwrcs\DWRCRSA.dll")

;Move files to proper directories and install services
RunAs("admin", @ComputerName, "passwords", 0, @ComSpec & "mkdir C:\Windows\dwrcs")
RunAs("admin", @ComputerName, "passwords", 0, @ComSpec & "copy C:\dwrcs\*.* C:\Windows\dwrcs")
RunAs("admin", @ComputerName, "passwords", 0, @ComSpec & "move C:\Windows\dwrcs\DNTUS26.exe C:\Windows\system32 /Y")
RunAs("admin", @ComputerName, "passwords", 0, @ComSpec & "C:\Windows\dwrcs\DWRCS.exe -install")
RunAs("admin", @ComputerName, "passwords", 0, @ComSpec & "C:\Windows\system32\DNTUS26.exe -install")

;Start services
RunAs("admin", @ComputerName, "passwords", 0, @ComSpec & "net start DWMRCS")
RunAs("admin", @ComputerName, "passwords", 0, @ComSpec & "net start DNTUS26")

;Cleanup
DirRemove("C:\dwrcs", 1)
Exit
Link to comment
Share on other sites

Can't you install the files from the DameWare console to the target machines?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

No for some reason it doesn't work in Windows 7 (at least not with our combination of GPO, settings, etc). In XP, as soon as you tried to connect to the target, it would detect if the service was installed or not and install it if needed.

Now, the only way we could get it to connect is if the service is installed beforehand and already running. Hence the need to script the service install.

If you know another way I can try from the dameware console, I am open to suggestions.

Edited by vrocco
Link to comment
Share on other sites

Viocco,

for one thing, your script is wrong...

RunAs("admin", @ComputerName, "passwords", 0, @ComSpec & "mkdir C:Windowsdwrcs")

should be

RunAs("admin", @ComputerName, "passwords", 0, @ComSpec & " /c mkdir C:Windowsdwrcs")

However, I think that even if you correct that it will not work. I have tried to solve the exact same

problem for registering a program in Windows 7. All error returns are 0, but it does not do anything.

Is there anybody who has ever gotten AutoIt RunAs to work with admin priviledges on Windows 7?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...