Hi guys may i ask if you can help me convert this script to auto it
; <AUT2EXE VERSION: 3.2.2.0>
#NoTrayIcon
RunWait("Set WshShell = WScript.CreateObject("WScript.Shell")
checkOSArch= WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE")
'Wscript.Echo checkOSArch
if Err Then
Err.Clear
'WScript.Echo "The OS Architecture is unable to find ,so it was assumed to be 32 bit"
regkey = "HKEY_LOCAL_MACHINE\SOFTWARE\AdventNet\DesktopCentral\DCAgent\"
else
if checkOSArch = "x86" Then
'Wscript.Echo "The OS Architecture is 32 bit"
regkey = "HKEY_LOCAL_MACHINE\SOFTWARE\AdventNet\DesktopCentral\DCAgent\"
else
'Wscript.Echo "The OS Architecture is 64 bit"
regkey = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AdventNet\DesktopCentral\DCAgent\"
End IF
end if
regkey=regkey & "DCAgentInstallDir"
'Wscript.Echo regkey
AgentInsallDir = WshShell.RegRead(regkey)
'Wscript.Echo AgentInsallDir
swmeterdir = "bin\dcswmeter.exe"
'Wscript.Echo swmeterdir
wshShell.CurrentDirectory = AgentInsallDir
wshshell.run swmeterdir&" -s"&" ET_CUR_SUM"
set wshshell = nothing
", "", @SW_HIDE)
I tried to use also this script to run it silently but cmd will always pop up.
I had created a batch file to run like this
echo off
start c:\sw-meter-Instant-Report1.vbs
and load it in an auto it script
#NoTrayIcon
filecopy("\\hpmds2\Scripts\Software Metering script\sw-meter-Instant-Report1.vbs", "c:\")
filecopy("\\hpmds2\Scripts\Software Metering script\sw.bat", "c:\")
RunWait("c:\sw.bat", "", @SW_HIDE)