Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using AT command with %systemroot% variable

Status
Not open for further replies.

eggohead

Technical User
Oct 19, 2003
25
US
Hello,

I am having some touble using %systemroot% or %windir% in an AT command to schedule a remote software installation. It works fine if use a static maping such as the c:\winnt\sytem32 or d:\winnt\sytem32. I would like to use these variables as some machines have different windows directories. Can this be done, Do I have the wrong syntax? - thanks for your time

This will not launch:

at \\REMOTECOMPUTER 12:25 %SYSTEMROOT%\system32\msiexec.exe /i "\\REMOTESHARE\Microsoft Apps\visio.msi" /qn

The static drive mapping below works fine:

at \\REMOTECOMPUTER 12:25 e:\winnt\system32\msiexec.exe /i "\\REMOTESHARE\Microsoft Apps\visio.msi" /qn
 
I am curious how the envionmental variable expansion would work. It may be expanding the variable and reflecting the computer on which the command is run, rather than the remote computer.

I suspect you can drop the pathing completely, as %WINDIR%\SYSTEM32 is going to be in the Path already:

at \\REMOTECOMPUTER 12:25 msiexec.exe /i "\\REMOTESHARE\Microsoft Apps\visio.msi" /qn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top