Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3619926
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:56:24+00:00 2026-05-18T22:56:24+00:00

I use the following script in Npackd to uninstall Dropbox. It works on XP

  • 0

I use the following script in Npackd to uninstall Dropbox. It works on XP and Vista, but fails on Windows 7/64. Instead of showing the taskbar (the one that is normally at the bottom of the screen) it shows a Windows Explorer window with the content of C:/. This is not Dropbox related as removing other packages with DLL based shell extensions also shows the same effect.

Uninstall.exe /S _?=%CD%
taskkill /f /fi "IMAGENAME eq explorer.exe"
del DropboxExt.13.dll
del DropboxExt64.13.dll
rem start explorer from the root directory so it does not lock this one
start "" /D\ explorer.exe

What is wrong with the script? How can it be modified to work correctly on Windows 7 too?

Thanks

EDIT: I am really tired of this problem. The following batch file works either started as a normal user or “As Administrator”:

taskkill /f /fi "IMAGENAME eq explorer.exe"
ping -n 5 127.0.0.1
pushd \
rem runas /trustlevel:0x20000 
start "" /D\ explorer.exe
popd

Here is the code that starts the .bat from my program (path=”Uninstall.bat”, only 2 new environment variables are defined):

QDir d = this->getDirectory();
QProcess p(0);
p.setProcessChannelMode(QProcess::MergedChannels);
QStringList params;
p.setWorkingDirectory(d.absolutePath());
QString exe = d.absolutePath() + "\\" + path;
for (int i = 0; i < env.count(); i += 2) {
    p.processEnvironment().insert(env.at(i), env.at(i + 1));
}
p.start(exe, params);

The corresponding code in Qt/qprocess_win.cpp:

DWORD dwCreationFlags = CREATE_NO_WINDOW;
dwCreationFlags |= CREATE_UNICODE_ENVIRONMENT;
STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0,
                             (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
                             (ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
                             0, 0, 0,
                             STARTF_USESTDHANDLES,
                             0, 0, 0,
                             stdinChannel.pipe[0], stdoutChannel.pipe[1], stderrChannel.pipe[1]
};
success = CreateProcess(0, (wchar_t*)args.utf16(),
                        0, 0, TRUE, dwCreationFlags,
                        environment.isEmpty() ? 0 : envlist.data(),
                        workingDirectory.isEmpty() ? 0 : (wchar_t*)QDir::toNativeSeparators(workingDirectory).utf16(),
                        &startupInfo, pid);

Why does the Explorer think there is already a taskbar?

EDIT2: I know what is wrong now. After the Explorer is killed a new is automatically started by an svchost.exe process with the following parameters: /factory,{682159d9-c321-47ca-b3f1-30e36b2ec8b9}. The GUID is for DesktopExplorerFactory. This is probably a crash-protection for a COM service. My calls to explorer.exe do not start a new Explorer as there is already one. After a minute or two this process will be automatically closed if no windows are opened. So I think Ben Voigt is right and “There’s really no good way to unload the shell completely without logging off all users.”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:56:24+00:00Added an answer on May 18, 2026 at 10:56 pm

    What is wrong with the script is quite simple: The shell is loaded into many many applications besides just Windows Explorer. Every application that uses the common open/save file dialogs hosts the shell.

    To address your immediate question of how to control the working directory of Windows Explorer without passing arguments that open a window, just set the working directory:

    pushd C:\
    start explorer.exe
    popd
    

    But this still will not let you reliably delete the extension. There’s really no good way to unload the shell completely without logging off all users.

    EDIT: Is your script running at the same integrity level as the original explorer.exe you killed? Same elevation level? The shell runs with medium (normal) integrity level and unelevated token, you need to match this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following script is for finding one motif in protein sequence. use strict; use
The following script works fine: #!/usr/bin/env perl use strict; use warnings; use Data::Dumper; use
I am trying to use the following script in asp.net: <script language=javascript type=text/javascript> function
Getting an error when i use the following script to show a div when
I have an image uploading script in which i use the following setup to
The mysqltuner.pl script gives me the following recommendation: query_cache_limit (> 1M, or use smaller
I am writing a custom .pac script for use with Firefox. Following numerous examples
I am trying to use the following script by duckrowing ( http://www.duckrowing.com/2010/03/18/documenting-objective-c-with-doxygen-part-ii/ ), to
I use the latest version of numpy/scipy. The following script does not work: import
The following script gives me what I want but Perl also throws me a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.