SCCM TS that runs a net use command in WinPE
I need to make a TS that boots the machine into WinPE and then runs some commands equivalent to a startnet.cmd file like a traditional wds would but not immediately restart and require user interaction to move forward. When I gave sccm the boot.wim
that had a custom startnet.cmd file in it from our existing wds the task sequence pushed the pc into winpe and then just restarted without running the startnet.cmd. The startnet.cmd file goes as such...
x:> net use \\server\share /u:domain\user password >nul
x:>set paht=%path%;x:\bin;y:\bin\
y:>bin\start.cmd
When we boot to our wds the boot.wim and startnet.cmd works just fine. I then tried to add the commands as part of the task sequence but that caused it to fail and drop out of the TS when it ran the net use command, log below...
http://i.imgur.com/yXRiaxR.png
I tried both the wim file from our wds server (pe 4.0) and the one in sccm (pe 5.0), I also updated the drivers in the 5.0 wim file thinking maybe it was unable to resolve the unc but as you can see from the log it looks like its rejecting the command all
together.
The simple solution would be to make a TS that runs the wds stuff or boot to our existing wds server but due to long and stupid reasons neither are an option for this specific scenario. Any input or advice would be excellent.
Why not using the built in task sequence step to connect to a share?
Torsten Meringer | http://www.mssccmfaq.de
Similar Messages
-
How to use Net use command in SAP
Dear All,
Any one knows how to user Net use command in SAP to connect to other system i have Created in SM69. when i am executing the program it is asking login Details of other system.
Regards
SNBHi,
What is the exact command you exceuting?
Message was edited by:
Pavel sheynkman -
How to run ODI scenario using command prompt
Hi expets
Please let me know if we can run ODI scenario using command prompt or any way other than operator.
Regards
JanakiramGo to <ODI_HOME>/oracledi/bin in command prompt and invoke startscen command with teh below parameters.
Edited by: Guru Sankar on Feb 28, 2011 4:19 PM -
SCCM 2012 - Problems running vbscript or simple command line
Hey everybody, I'm having a heck of a time trying to get SCCM 2012 to deploy some very simple Vbscripts or even a simple command line. I need to deploy some registry fixes across the company as well as a Vbscript that uninstalls some old applications.
If I run these scripts/commands outside of SCCM everything works fine, inside of SCCM it always shows "succeeded" but it doesn't actually run correct on the client.
What's confusing to me is the use of distribution points when you're running a command line that doesn't actually have any source files. For instance this is what I'm trying to run "regedit /s \\servername\folder\registryfix.reg". I've also tried
a similar bat file as well with the same result. I've tried it with a source folder specified, I've tried it using Run Program From Server or Download locally. I've gone through everything I can think of but can't get it to work.
Similarly with a vbscript I'm trying "cscript.exe /s \\servername\folder\uninstallapps.wsf" and various different settings in the package deployment.
I'm really confused here guys so any help would be greatly appreciated. ThanksWhat I have found is that if you try and run the REG.EXE command line directly, either as a program or via a CMD/BAT file, the 64-bit redirection will occur. So, if you had something like this in a program or via a CMD/BAT file that ran against a 64-bit
system:
REG ADD HKLM\Software\Microsoft\Test /v Test /d Test
You would end up with this registry entry existing under:
HKLM\Software\Wow6432Node\Microsoft\Test
That's because SCCM uses the 32-bit launcher to take care of this and redirection occurs - You can see this via the "CCM32BitLauncher.log" on the client.
To work around this problem, I have done the following:
On a reference machine, create/export the registry entry I want into a *.reg file - An example export of "Test.reg" for the above mentioned registry entry would look something like this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Test]
"Test"="Test"
2. Stick our "Test.reg" file in a source share, create a package with the share as the source content, and distribute it
3. Create a program for the package with a command line like this:
REG IMPORT Test.reg
This is obviously not as clean as having a command line with a package to distribute, but I find it works fine for me and gets around the redirection for registry entries. -
Running Unit Test from test manager that run bat file from command line
Hi ,
I am trying to run Jsystem (java framewotk) from command line using runScenario.bat thru unit test that i associated to test in test manager.
the idea is that when i ran the automated test from MTM - it will run the the unit test that will run the appropriate test case in java.
i wrote the code like this :
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestProject3
[TestClass]
public class UnitTest1
[TestMethod]
public void TestMethod1()
try
String command = "c:\\JSYSTEM\\runner\\runScenario.bat
c:\\Users\\ryeshua\\Source\\Workspaces\\Auto1\\my-tests-project\\target\\classes scenarios\\feature1 RoeySetup.xml ";
System.Diagnostics.ProcessStartInfo procStartInfo =
new System.Diagnostics.ProcessStartInfo("cmd", "/c " + command);
procStartInfo.RedirectStandardOutput = true;
procStartInfo.UseShellExecute = false;
//procStartInfo.CreateNoWindow = true;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo = procStartInfo;
proc.Start();
string result = proc.StandardOutput.ReadToEnd();
Console.WriteLine(result);
catch (Exception objException)
// Log the exception
and when i ran it from visual studio it worked perfect. and update the Jsystem logs of the junit test in the jsystem/runner/log folder.
but when i added it to associated test and ran it from MTM - it pass but it does not update the logs in jsystem folder.
the problem that i dont know what is not working. i cant see the output of it when i ran from mtm but can see when i ran from VS.
i am using VS 2013 Pro with MTM 2013.
please advice
RoeyHi Roey,
Thank you for posting in MSDN forum.
Based on your issue, could you please tell me how you generate the log file under the jsystem folder?
Generally, I know that when we run unit test from VS IDE, the file will be saved into the local machine. But when we run unit test from MTM, the unit test method will be run on the test agent machine, so the file will be saved into the test agent machine.
Therefore, I suggest you could check if you did not see the updated logs file in jsystem folder on the test agent machine.
In addition, I suggest you could try to copy this unit test project on this test agent machine and then run the unit test method using mstest.exe in command line and then check if you can update the logs file.
https://msdn.microsoft.com/en-us/library/ms182489.aspx?f=255&MSPPError=-2147217396
If you have any updated message about this issue, please tell me.
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Native Installer works with Net Use, but AIR File does not.
I'm building an AIR application that runs a "net use" command in windows 7.
Strangely, the installer type appears to impact run permissions:
+ Export release build to "Native Installer" -> "Net Use" works and I see all my test alert boxes.
+ Export release build to "AIR File" --> animations run and the app is responsive, but I don't see any of my alert boxes and the "Net Use" command shows no sign of running.Update - partial resolution:
Apparently you have to use a Native Install to use native functionality (don't know why this includes Alert Boxes).
I just found this bit on Adobe's web site:
Packaging an AIR application in a native installer
http://help.adobe.com/en_US/air/build/WS789ea67d3e73a8b22388411123785d839c-8000.html
Adobe, please work to address this. I'd like to release cross-compatible code and this creates a situation where the user has to choose a different installer based on their platform. Minor, but annoying when an AIR file works for both in other instances.
It would also be nice to get some sort of error message. I had no idea why things weren't working (even my Alert boxes were being swallowed). -
"Net use" not working in application that runs as "system"
Hello,
I am trying to create an application object to distribute a program which
during the setup procedure creates two local users on the workstation. I
tried to set up the application to run as an unsecure system user and
start the setup.exe. This method worked fine for quite a number of apps in
the past.
However this app needs a drive mapping to a windows 2003 server to start
the setup.exe. Apparently under windows 2003 it is no longer possible to
use the "net use" command when running a script as system user. I get
system error 1312 "A specified logon session does not exist. It may have
already been terminated". There seems to be no solution from microsoft
since this is probably working as designed.
In another similar situation I copied the complete setup directory to a
novell drive, but in this case the setup procedure needs to write
information into a database located on the windows server. I might be able
to set up the application via snapshot and create the user accounts using
a distribution script. But I would need the consent of the windows
administrators since I need the passwords for those user accounts, and I
am not sure that they are cooperative in this respect. Furthermore I get
the feeling that this program is going to present a number of other
problems and surprises which probably will make the snapshot method very
tricky.
Is there any solution or workaround for this problem?
Any suggestions would be appreciated.1) It should not be an issue to run "Net Use" to authenticate to a Windows
2003 server from an "Unsecure System Prompt". This is quite common.
2) If the PC is in the domain already, this may be part of the issue since
you are already authenticated to the domain. Try adding the Domain
Workstation Object the proper rights.
3) Does the "Setup.exe" expand to an MSI install in the temp directory? In
such a case you could like create an MSI install that runs as a normal user
but the Windows Install will allow for the elevated rights.
Craig Wilson - MCNE, MCSE, CCNA
Novell Support Forums Volunteer Sysop
Novell does not officially monitor these forums.
Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared either Novell or any rational human.
"Anna Schmitz" <[email protected]> wrote in message
news:BBvdi.3656$%[email protected]...
> Hello,
>
> I am trying to create an application object to distribute a program which
> during the setup procedure creates two local users on the workstation. I
> tried to set up the application to run as an unsecure system user and
> start the setup.exe. This method worked fine for quite a number of apps in
> the past.
>
> However this app needs a drive mapping to a windows 2003 server to start
> the setup.exe. Apparently under windows 2003 it is no longer possible to
> use the "net use" command when running a script as system user. I get
> system error 1312 "A specified logon session does not exist. It may have
> already been terminated". There seems to be no solution from microsoft
> since this is probably working as designed.
>
> In another similar situation I copied the complete setup directory to a
> novell drive, but in this case the setup procedure needs to write
> information into a database located on the windows server. I might be able
> to set up the application via snapshot and create the user accounts using
> a distribution script. But I would need the consent of the windows
> administrators since I need the passwords for those user accounts, and I
> am not sure that they are cooperative in this respect. Furthermore I get
> the feeling that this program is going to present a number of other
> problems and surprises which probably will make the snapshot method very
> tricky.
>
> Is there any solution or workaround for this problem?
>
> Any suggestions would be appreciated.
>
>
>
> -
Running a Program in JDeveloper using Command Prompt
Hi,
I downoladed Oracle JDeveloper 10g. I had written a simple java class called Echo. java. I want to run the file using command prompt. My JDK has the following path:
F:\Sowmya
My java file has the following path:
F:\Sowmya\jdev\mywork\1\1\src\pkg1
So, in order to compile the file, I gave the following command:
F:\Sowmya\jdk\bin>javac F:\Sowmya\jdev\mywork\1\1\src\pkg1\Echo.java
It worked and the Echo.class file was created.
But, when I tried to run the file using the following command,
F:\Sowmya\jdk\bin>java F:\Sowmya\jdev\mywork\1\1\src\pkg1\Echo
Iam getting the following error:
Exception in thread "main" java.lang.NOClassDefFoundError: F:\Sowmya\jdev\mywork\1\1\src\pkg1\Echo
This didnt work either:
F:\Sowmya\jdk\bin>java F:\Sowmya\jdev\mywork\1\1\classes\pkg1\Echo
Iam getting the same error.
Can any one please help me regarding this.
Thank you,
Sowmya.Yes, my class contains a main. It runs if I click run in JDeveloper. But, there is no output displayed. The following is the code:
public class Echo {
public static void main (String[] args) {
for (String s: args) {
System.out.println(s);
} -
Can't execute net use with CF9
On our win 2003 dev server we cfexecute a batch file which in turn calls another batch file, CONNECT.COM which temporarily connects to each of our production servers so that we can copy new files over to production using BeyondCompare. This has been working fine for years.
CONNECT.COM is like this but of course encrypted:
REM %1 is drive letter, e.g. X: $2 is sharename, e.g. "\\dw1\dw"
net use %1 %2 {synchuser password here} /USER:domainname\synchuser /persistent:no
We recently upgraded from CF7 to CF9 and at the same time switched to using a non-administrative account to run CF under. Now our synchronization script won't complete, i.e. it runs the batch file to the point where CONNECT.COM is called then times out while trying to make the connection.
We also run this script as a CF scheduled task and have the same problem so we tried running the task using an admin username/password.. That didn't help.
I'm an administrator and can run the batch file with no problem. I can also run it using a windows scheduled task running under the admin uesrname/password we tried with the CF scheduled task. It just seems that ColdFusion can no longer execute the NET USE command.
Any ideas?
ThanksIt sounds like the account used to start the ColdFusion service does not have the rights it needs on the servers in question. Either change the account that the CF service runs under, or give the CF account the necessary priviledges to the files in question.
-
I'm running Netware 3.2, with rprinter and a Netgear rprinter emulator. I've
been told I need to abandon Client for Netware on my XP machine, which means
moving from capture to net use.
My capture command is-
capture q=reports nb nff na ti=2
What would the equivalent net use command be (one that won't print form
feeds & banners).
Thanks-
--Mike--
Chain Reaction Bicycles>> What would the equivalent net use command be (one that won't print
>> form feeds & banners).
>
> Somthing like this:
>
> net use lpt1: \\devicename\printername
>
> where devicename is the network name of your printer (you can also use
> the IP address) and pritnername is an intrenal name which is typically
> predefined by the printner manufacturer.
Thanks, I'll give it a try!
--Mike Jacoubowsky
Chain Reaction Bicycles
www.ChainReaction.com
Redwood City & Los Altos, CA USA -
Net use map drive is working with built-in admin account only
I currently have a windows 7 PC that I use
net use in cmd file to map drive to Windows server 2008.
It works if I use built-in admin account/password but I've tried another account that's in the administrator group on the server and I get errors.
NET USE X: \\IPADD\c$\inetpub\ftproot password /User:adminuseraccount
NET USE X: \\IPADD\c$\inetpub\ftproot password /User:server\adminuseraccount
After tweaking the net use command a number of ways, the 2 following errors are what I'm getting for the most part:
System error 1219 has occurred.
Multiple connections to a server or shared resource by the same user, using more
than one user name, are not allowed. Disconnect all previous connections to the
server or shared resource and try again.
OR
System error 5 has occurred.
Access is denied.
I've looked at many searches on this but can't get this to work.
Also, one thing I'm thinking of doing is changing the built-in admin name and password. Is this a safe thing to do?
Thanks,
DaveHi,
Can you check this link?
http://support.microsoft.com/kb/938120
Thanks,
Umesh.S.K -
Hello TechNeter,
I have a small network running with a DOS legacy invoice application with a shared DOT printer connected to a Windows 08 server. This script is triggered once the computers started:
net use LPT2 /delete
net use LPT2 \\ServerName\PrinterName /persistent:yes
exit
Everything has been working well for years on all Windows XP clients until I replaced one of the PC with Windows 7, the printing job stopped running on this PC. Message read like "Printer not found...". It took me days to work around and search, but
still no luck.
Anyone knows why Windows 7 doesn't like this "net use" command and how to fix it?
I really appreciate it.Hi Vinhng,
You may also take a try with the command below:
NET USE LPT2: \\ServerName\PrinterName /USER:username userpasswd
/persistent:yes
Add the user account and the password and then check if issue insists.
For more reference, you may check this thread:
net use LPT access denied
Net use
Best regards
Michael Shao
TechNet Community Support -
Environment:
OS: Windows 7 32/64 bit, Windows 2008 Server 64
bit/ Windows 2012 Server 64 bit
Priority:
- Critical
Requirement: - Since
the Windows Service is running under the Local System Account, we would like to emulate this same behaviour.
Basically, we would like to run CMD.EXE under the Local System Account. So that we can map a network drive to be used by a service using following
command
net use z: \\servername\sharedfolder /persistent:yes.
Already Attempt:
We tried to launch the CMD.exe using the DOS Task Scheduler AT command. Here’s a sample command:
AT 10:36 /interactive cmd.exe
But I received a warning that “due
to security enhancements, this task will run at the time excepted but not interactively.”
It turns out that this approach will work for XP, 2000 and Server 2003 but due to session isolation
Interactive services no longer work on Windows 7, Windows Server 2008 and above.
2. We
tried to create a secondary Windows Service via the Service Control (sc.exe) which merely launches CMD.exe.
<Drive>:\sc create RunCMDAsLSA binpath= "cmd" type=own type=interact <Drive>:\sc
start RunCMDAsLSA
In this case the service fails to start and results it the following error message:
FAILED 1053: The service did not respond to the start or control request in a timely fashion.
3. One
suggestion, we found to launch CMD.exe via a Scheduled Task, but
it is not giving any option to launch CMD.exe in interactive mode; so that I can map network drive using net command.
4. I read an article, which
demonstrates the use of PSTools from SysInternals. I launched the command line and executed following command
psexec -i -s cmd.exe
PSTools worked fine, but It seems that in scope of Sysinternals Software License
Terms. You may not "use the software for commercial software hosting services."
Application will deploy on client, which will be like commercial,
so we are not able to use PSTools.
Kindly assist us for achieving the requirement. We have tried all the ways, but nothing is working for us. Kindly suggest.
I will be really thankful.Hi Sir,
Nothing worked from above for us. You can see our remarks on posted query.
That’s why, we posted on forum.
And there will not be any vulnerability, because, if we will use "net
use ..."
in network domain; definitely,
we will provide username and password of mapped drive system.
And, that system, itself is given by client; so that, there must not be any vulnerability; they are ready to provide user name and password.
We need a way; by which we can complete the requirement. Kindly assist.
Regards,
S. P. Singh -
How do I set up my air port extreme to do port forwarding? Running 10.7.4 I have a IP camera on my local wireless net work that I want to use from my iPhone 4s and other computers.
In most cable systems, the router you have will plug into your modem and just work automatically. A NAT (Network Address Translation) router takes your external IP and hands out LAN (Local Area Network) based IPs. All of the devices you are working with right now should handle the change automatically unless you've changed from the default automatic configuration.
The problem with your wireless end of this is that the iPhone is not yet 802.11n, only 802.11g. Because that router is not dual band, all of your wifi devices will be forced to slow down to 802.11g speeds. This won't matter much for each device that's connecting to the internet, as your bottleneck is still going to be there. Where you will see slowdowns is device to device connections, like transferring data between the devices. -
How to use addKeyListener in a program running using command prompt
Does anyone have any idea how to add the addKeyListener to a program running using command prompt.
Let me explain how the program run.
The program is start and accept call from other program. But from time to time, I need to issue some command by pressing the keyboard, let say, ESC is closed the program, F1 is showing the stated. F2.... (This is all need to run in the command prompt windows)
My problem is this program does not have any gui interface, so how can it be added?
i do it this way
public void key(){
addKeyListener(this);
But it have compile error.
mainServerImpl.java:87: cannot resolve symbol
symbol : method addKeyListener (mainServerImpl)
location: class mainServerImpl
addKeyListener(this);
I did implement KeyListener. But just don't know how to solve this error.
can anyone tell me how to solve it or point me a source that can help.
Thank in advance!
Regards,
Tai TanWrite your own Thread, to do this:
public class KeyThread extends Thread {
public void run {
while(true) {
int i = System.in.read();
if(i == 123) {
break; // to stop the thread
// in your main:
Thread keyThread = new KeyThread();
keyThread.start(); // calls run() of the thread
Maybe you are looking for
-
I have the following Lenovo notebook : Product: ThinkPad T61 8898-55G [change] Operating system: All [change] Original description: T7100(1.8GHz), 1GB RAM, 120GB 5400rpm HD, 14.1in 1024x768 LCD, Intel X3100, CDRW/DVDRW, Intel 802.11abg wireless, Blue
-
Can't get new music from iTunes to iPod
I currently have an iPod Touch. Have downloaded the most current iTunes. Have the latest software update for the iPod. For numbers sake, I have 75 songs on the computer iTunes, 300 on the iPod. Want to get music and playlists from iTunes onto iPo
-
Anyone using Sybase SQL Anywhere 10?
Post Author: gchambers01 CA Forum: Data Connectivity and SQL I'm having issues with Crystal Reports
-
Two button with single function
I want to create two buttons for single function and one button for one function. For example, I click button1, the screen will show "clicked1" If I clicked button2, the screen will show "clicked2". If I click button1 and then click button2, it will
-
Multiple selection of checkbox in jtable
hi I am using jtable in which first coloumn is using checbox.Ihave used celleditor and cell renderer for that.I want to check multiple checboxes at a time and on click of update button wanto send that information to database.But i m not able to check